@@ -9,7 +9,7 @@ import type { Frameworks } from '@wdio/types'
99type TestTargets = 'workspace' | 'mocha' | 'jasmine' | 'cucumber'
1010
1111const __dirname = path . dirname ( url . fileURLToPath ( import . meta. url ) )
12- const target = ( process . env . VSCODE_WDIO_E2E_FRAMEWORK || 'mocha' ) as TestTargets
12+ const target = ( process . env . VSCODE_WDIO_E2E_SCENARIO || 'mocha' ) as TestTargets
1313
1414const minimumVersion = minVersion ( pkg . engines . vscode ) ?. version || 'stable'
1515
@@ -33,7 +33,15 @@ function defineSpecs(target: TestTargets) {
3333const specs = defineSpecs ( target )
3434let screenshotCount = 0
3535
36- export function createBaseConfig ( workspacePath : string ) : WebdriverIO . Config {
36+ export function createBaseConfig ( workspacePath : string , userSettings = { } ) : WebdriverIO . Config {
37+ const resolvedUserSettings = Object . assign (
38+ { } ,
39+ {
40+ 'webdriverio.logLevel' : 'trace' ,
41+ } ,
42+ userSettings
43+ )
44+
3745 return {
3846 runner : 'local' ,
3947 tsConfigPath : './tsconfig.json' ,
@@ -47,9 +55,7 @@ export function createBaseConfig(workspacePath: string): WebdriverIO.Config {
4755 // points to directory where extension package.json is located
4856 extensionPath : path . resolve ( '../packages/vscode-webdriverio' ) ,
4957 // optional VS Code settings
50- userSettings : {
51- 'webdriverio.logLevel' : 'trace' ,
52- } ,
58+ userSettings : resolvedUserSettings ,
5359 workspacePath : path . resolve ( workspacePath ) ,
5460 } ,
5561 'wdio:enforceWebDriverClassic' : true ,
0 commit comments