Skip to content

Commit 4893c84

Browse files
authored
Pass optional vscode version (#2147)
Signed-off-by: Sebastian (Tiedtke) Huckleberry <sebastiantiedtke@gmail.com>
1 parent b65ea35 commit 4893c84

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

dagger/src/index.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,12 @@ export class VscodeRunme {
157157
* @returns Returns the container running the tests.
158158
*/
159159
@func()
160-
async integrationTest(runmeTestToken?: Secret, debug = false, spec?: string): Promise<Container> {
160+
async integrationTest(
161+
runmeTestToken?: Secret,
162+
debug = false,
163+
spec?: string,
164+
vscodeVersion?: string,
165+
): Promise<Container> {
161166
await this.base()
162167

163168
const e2eTestCommand = ['xvfb-run', 'npx wdio run ./wdio.conf.ts']
@@ -180,6 +185,10 @@ export class VscodeRunme {
180185
.withEnvVariable('RUNME_TEST_EXTENSION', path)
181186
}
182187

188+
if (vscodeVersion) {
189+
container = container.withEnvVariable('RUNME_TEST_VSCODE_VERSION', vscodeVersion)
190+
}
191+
183192
return (
184193
container
185194
// Run e2e tests exclusively from bundle not source/dependencies

tests/e2e/wdio.conf.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
99
const workspacePath = path.join(__dirname, '..', '..')
1010
const extensionPath = process.env.RUNME_TEST_EXTENSION || workspacePath
1111
const specFileRetries = Number(process.env.RUNME_TEST_SPEC_RETRIES) ?? 1
12+
const browserVersion = process.env.RUNME_TEST_VSCODE_VERSION || 'stable'
1213

1314
export const config: Options.Testrunner = {
1415
//
@@ -94,7 +95,7 @@ export const config: Options.Testrunner = {
9495
capabilities: [
9596
{
9697
browserName: 'vscode',
97-
browserVersion: 'stable',
98+
browserVersion,
9899
'wdio:vscodeOptions': {
99100
extensionPath,
100101
workspacePath,

0 commit comments

Comments
 (0)