Skip to content

Commit f5f071f

Browse files
authored
RI-7108: Fix E2E pipeline (#282)
1 parent 181677b commit f5f071f

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

tests/e2e/src/vscode.runner.ts

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,33 @@ import { VScodeScripts } from './helpers/scripts/vscodeScripts'
4040
// Install VSCode and Chromedriver
4141
await exTester.downloadCode()
4242
await exTester.downloadChromeDriver()
43+
44+
console.log(`${DEFAULT_STORAGE_FOLDER} contents:`)
45+
const testResources = fs.readdirSync(DEFAULT_STORAGE_FOLDER)
46+
testResources.forEach(item => {
47+
const fullPath = path.join(DEFAULT_STORAGE_FOLDER, item)
48+
const stats = fs.statSync(fullPath)
49+
const type = stats.isDirectory() ? '(directory)' : '(file)'
50+
console.log(`${type} ${item}`)
51+
})
52+
53+
// Fix ChromeDriver path for selenium
54+
const chromedriverSource = path.join(
55+
DEFAULT_STORAGE_FOLDER,
56+
'chromedriver-linux64',
57+
'chromedriver',
58+
)
59+
const chromedriverTarget = path.join(DEFAULT_STORAGE_FOLDER, 'chromedriver')
60+
61+
if (fs.existsSync(chromedriverSource)) {
62+
fs.copyFileSync(chromedriverSource, chromedriverTarget)
63+
fs.chmodSync(chromedriverTarget, 0o755)
64+
console.log(`ChromeDriver moved to expected path: ${chromedriverTarget}`)
65+
} else {
66+
console.error(`ChromeDriver binary not found at: ${chromedriverSource}`)
67+
process.exit(1)
68+
}
69+
4370
// Install vsix if not installed yet
4471
if (!fs.existsSync(extensionDir)) {
4572
await exTester.installVsix({
@@ -58,9 +85,11 @@ import { VScodeScripts } from './helpers/scripts/vscodeScripts'
5885

5986
let testFilesEnv: string | string[] = process.env.TEST_FILES!
6087
if (process.env.TEST_FILES) {
61-
testFilesEnv = process.env.TEST_FILES.split('\n').map(file => file.trim()).map((file) => {
62-
return path.join(__dirname, '..', file)
63-
})
88+
testFilesEnv = process.env.TEST_FILES.split('\n')
89+
.map(file => file.trim())
90+
.map(file => {
91+
return path.join(__dirname, '..', file)
92+
})
6493

6594
// Always prepend setup.js
6695
const setupTestPath = path.join(

0 commit comments

Comments
 (0)