Skip to content

Commit 7e21fe1

Browse files
authored
feat: simplification of the startup process (#70)
## Proposed changes Change the startup process for feature extensions. With the initial implementation for worker process startup (controlling the startup process with a semaphore) and the fix for #62 (starting the worker if it was stopped when accessed), there is no longer a need to pre-start all workers. Simplify the logic for the extension startup process and remove unnecessary source code. Additionally, add E2E tests related to changes in the ConfigFilePattern in Settings. ## Types of changes [//]: # 'What types of changes does your code introduce to WebdriverIO?' [//]: # '_Put an `x` in the boxes that apply_' - [X] Polish (an improvement for an existing feature) - [ ] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation update (improvements to the project's docs) - [ ] Internal updates (everything related to internal scripts, governance documentation and CI files) ## Checklist [//]: # "_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._" - [X] I have read the [CONTRIBUTING](https://github.com/webdriverio/vscode-webdriverio/blob/main/CONTRIBUTING.md) doc - [X] I have added tests that prove my fix is effective or that my feature works - [ ] I have added the necessary documentation (if appropriate) - [ ] I have added proper type definitions for new commands (if appropriate) ## Further comments [//]: # 'If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...' ### Reviewers: @webdriverio/project-committers
1 parent cf4115b commit 7e21fe1

31 files changed

Lines changed: 384 additions & 263 deletions

e2e/assertions/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { MatcherContext } from 'expect'
22
import type { BottomBarPanel, TreeItem, Workbench } from 'wdio-vscode-service'
3-
import type { STATUS } from '../helpers/index.ts'
3+
import type { STATUS } from '../helpers/index.js'
44

55
export interface ExpectedTreeItem {
66
text: string

e2e/helpers/constants.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
import * as cucumber from './cucumber.ts'
2-
import { STATUS } from './index.ts'
1+
import * as cucumber from './cucumber.js'
2+
3+
export const STATUS = {
4+
NOT_YET_RUN: 'Not yet run',
5+
PASSED: 'Passed',
6+
FAILED: 'Failed',
7+
SKIPPED: 'Skipped',
8+
} as const
39

410
function createExpectedNotRun(targetFramework: 'mocha' | 'jasmine') {
511
return {

e2e/helpers/cucumber.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { STATUS } from './index.ts'
1+
import { STATUS } from './constants.js'
22

33
export function createExpectedNotRun() {
44
return {

e2e/helpers/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@ import { DefaultTreeSection } from 'wdio-vscode-service'
22
import type { StatusStrings } from 'assertions/index.ts'
33
import type { TreeItem, Workbench, ViewControl, ViewContent, ViewItemAction, ViewTitlePart } from 'wdio-vscode-service'
44

5-
export const STATUS = {
6-
NOT_YET_RUN: 'Not yet run',
7-
PASSED: 'Passed',
8-
FAILED: 'Failed',
9-
SKIPPED: 'Skipped',
10-
} as const
5+
export { STATUS } from './constants.js'
116

127
export async function openTestingView(workbench: Workbench) {
138
const activityBar = workbench.getActivityBar()

e2e/tests/basic.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { browser, expect } from '@wdio/globals'
2-
import { createExpected } from 'helpers/constants.ts'
2+
import { createExpected } from 'helpers/constants.js'
33

44
import {
55
STATUS,
@@ -11,7 +11,7 @@ import {
1111
openTestingView,
1212
waitForResolved,
1313
waitForTestStatus,
14-
} from '../helpers/index.ts'
14+
} from '../helpers/index.js'
1515

1616
import type { SideBarView, ViewControl, Workbench } from 'wdio-vscode-service'
1717

e2e/tests/basicCucumber.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { browser, expect } from '@wdio/globals'
22

3-
import { createCucumberExpected } from '../helpers/cucumber.ts'
3+
import { createCucumberExpected } from '../helpers/cucumber.js'
44
import {
55
STATUS,
66
clearAllTestResults,
@@ -11,7 +11,7 @@ import {
1111
openTestingView,
1212
waitForResolved,
1313
waitForTestStatus,
14-
} from '../helpers/index.ts'
14+
} from '../helpers/index.js'
1515

1616
import type { SideBarView, ViewControl, Workbench } from 'wdio-vscode-service'
1717

e2e/tests/basicWorkspace.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { browser, expect } from '@wdio/globals'
2-
import { createWorkspaceExpected } from 'helpers/constants.ts'
2+
import { createWorkspaceExpected } from 'helpers/constants.js'
33

44
import {
55
STATUS,
@@ -11,7 +11,7 @@ import {
1111
openTestingView,
1212
waitForResolved,
1313
waitForTestStatus,
14-
} from '../helpers/index.ts'
14+
} from '../helpers/index.js'
1515
import type { SideBarView, ViewControl, Workbench } from 'wdio-vscode-service'
1616

1717
const expected = createWorkspaceExpected()

e2e/tests/envEnable.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
openTestingView,
1515
waitForResolved,
1616
waitForTestStatus,
17-
} from '../helpers/index.ts'
17+
} from '../helpers/index.js'
1818

1919
import type { SideBarView, Workbench } from 'wdio-vscode-service'
2020

e2e/tests/updateConfig.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
openTestingView,
1414
waitForResolved,
1515
waitForTestStatus,
16-
} from '../helpers/index.ts'
16+
} from '../helpers/index.js'
1717

1818
import type { SideBarView, Workbench } from 'wdio-vscode-service'
1919

e2e/tests/updateErrorConfig.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
openTestingView,
1414
waitForResolved,
1515
waitForTestStatus,
16-
} from '../helpers/index.ts'
16+
} from '../helpers/index.js'
1717

1818
import type { SideBarView, Workbench } from 'wdio-vscode-service'
1919

0 commit comments

Comments
 (0)