Skip to content

Commit 426b396

Browse files
authored
Revert "DevTool dependencies update (#111)" (#113)
This reverts commit 9b6323f.
1 parent 9b6323f commit 426b396

File tree

26 files changed

+4087
-6447
lines changed

26 files changed

+4087
-6447
lines changed
Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Given, When, Then, After } from '@wdio/cucumber-framework'
2-
import { browser, expect } from '@wdio/globals'
1+
import { Given, When, Then } from '@wdio/cucumber-framework'
2+
import { expect } from '@wdio/globals'
33

44
import LoginPage from '../pageobjects/login.page.js'
55
import SecurePage from '../pageobjects/secure.page.js'
@@ -8,10 +8,6 @@ const pages = {
88
login: LoginPage
99
} as const
1010

11-
After(async () => {
12-
await browser.reloadSession()
13-
})
14-
1511
Given(/^I am on the (\w+) page$/, async (page: keyof typeof pages) => {
1612
await pages[page].open()
1713
})
@@ -21,9 +17,8 @@ When(/^I login with (\w+) and (.+)$/, async (username, password) => {
2117
})
2218

2319
Then(/^I should see a flash message saying (.*)$/, async (message) => {
24-
const el = await SecurePage.flashAlert
25-
await expect(el).toBeExisting()
26-
await expect(el).toHaveText(expect.stringContaining(message))
20+
await expect(SecurePage.flashAlert).toBeExisting()
21+
await expect(SecurePage.flashAlert).toHaveTextContaining(message)
2722
await browser.pause(15000)
2823
})
2924

example/package.json

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,16 @@
22
"name": "examples",
33
"type": "module",
44
"devDependencies": {
5-
"@wdio/cli": "9.18.0",
6-
"@wdio/cucumber-framework": "9.18.0",
7-
"@wdio/devtools-service": "workspace:*",
8-
"@wdio/globals": "9.17.0",
9-
"@wdio/local-runner": "9.18.0",
10-
"@wdio/spec-reporter": "9.18.0",
11-
"@wdio/types": "9.16.2",
12-
"expect-webdriverio": "^5.4.0",
5+
"@wdio/cli": "8.39.0",
6+
"@wdio/cucumber-framework": "^8.39.0",
7+
"@wdio/devtools-service": "workspace:^",
8+
"@wdio/globals": "^8.39.0",
9+
"@wdio/local-runner": "^8.39.0",
10+
"@wdio/spec-reporter": "^8.39.0",
11+
"@wdio/types": "^8.39.0",
12+
"expect-webdriverio": "^4.15.1",
1313
"ts-node": "^10.9.2",
14-
"tsconfig-paths": "^4.2.0",
15-
"tsx": "^4.20.3",
16-
"typescript": "^5.8.3"
14+
"typescript": "^5.4.5"
1715
},
1816
"scripts": {
1917
"wdio": "wdio run ./wdio.conf.ts"

package.json

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,27 @@
1010
"watch": "pnpm build --watch"
1111
},
1212
"devDependencies": {
13-
"@types/node": "^24.3.0",
14-
"@typescript-eslint/eslint-plugin": "^8.40.0",
15-
"@typescript-eslint/parser": "^8.40.0",
16-
"@typescript-eslint/utils": "^8.40.0",
17-
"@vitest/browser": "^3.2.4",
18-
"autoprefixer": "^10.4.21",
19-
"eslint": "^9.33.0",
20-
"eslint-plugin-import": "^2.32.0",
21-
"eslint-plugin-unicorn": "^59.0.1",
13+
"@types/node": "^20.14.5",
14+
"@typescript-eslint/eslint-plugin": "^6.9.0",
15+
"@typescript-eslint/parser": "^6.9.0",
16+
"@typescript-eslint/utils": "^6.9.0",
17+
"@vitest/browser": "^0.34.6",
18+
"autoprefixer": "^10.4.19",
19+
"eslint": "^8.52.0",
20+
"eslint-plugin-import": "^2.29.1",
21+
"eslint-plugin-unicorn": "^48.0.1",
2222
"npm-run-all": "^4.1.5",
23-
"postcss": "^8.5.6",
24-
"postcss-lit": "^1.2.0",
25-
"tailwindcss": "^4.1.12",
23+
"postcss": "^8.4.38",
24+
"postcss-lit": "^1.1.1",
25+
"tailwindcss": "^3.4.4",
2626
"ts-node": "^10.9.2",
27-
"tsx": "^4.20.4",
28-
"typescript": "^5.9.2",
29-
"unplugin-icons": "^22.2.0",
30-
"vite": "^7.1.3",
31-
"vitest": "^3.2.4",
32-
"webdriverio": "^9.19.1"
27+
"typescript": "^5.0.2",
28+
"unplugin-icons": "^0.19.0",
29+
"vite": "^4.4.5",
30+
"vitest": "^0.34.6",
31+
"webdriverio": "^8.39.0"
3332
},
3433
"dependencies": {
35-
"@wdio/cli": "9.18.0"
34+
"@wdio/cli": "8.39.0"
3635
}
3736
}

packages/app/package.json

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,22 @@
1111
"test": "eslint ."
1212
},
1313
"dependencies": {
14-
"@codemirror/lang-javascript": "^6.2.4",
15-
"@codemirror/theme-one-dark": "^6.1.3",
16-
"@codemirror/view": "^6.38.1",
17-
"@iconify-json/mdi": "^1.2.3",
18-
"@lit/context": "^1.1.6",
19-
"@wdio/protocols": "9.16.2",
20-
"codemirror": "^6.0.2",
21-
"lit": "^3.3.1",
22-
"placeholder-loading": "^0.7.0",
14+
"@codemirror/lang-javascript": "^6.2.1",
15+
"@codemirror/theme-one-dark": "^6.1.2",
16+
"@codemirror/view": "^6.22.0",
17+
"@iconify-json/mdi": "^1.1.54",
18+
"@lit/context": "^1.0.1",
19+
"@wdio/protocols": "^8.23.0",
20+
"codemirror": "^6.0.1",
21+
"lit": "^2.7.6",
22+
"placeholder-loading": "^0.6.0",
2323
"pointer-tracker": "^2.5.3",
24-
"preact": "^10.27.1"
24+
"preact": "^10.18.1"
2525
},
2626
"author": "Christian Bromann <[email protected]>",
2727
"license": "MIT",
2828
"devDependencies": {
29-
"@tailwindcss/postcss": "^4.1.12",
30-
"@wdio/devtools-service": "workspace:*",
31-
"@wdio/reporter": "9.18.0",
32-
"autoprefixer": "^10.4.21",
33-
"postcss": "^8.5.6",
34-
"rollup": "^4.47.0",
35-
"stylelint": "^16.24.0",
36-
"stylelint-config-recommended": "^17.0.0",
37-
"stylelint-config-tailwindcss": "^1.0.0",
38-
"tailwindcss": "~3.4.17"
29+
"@wdio/devtools-service": "workspace:^",
30+
"@wdio/reporter": "^8.23.0"
3931
}
4032
}

packages/app/postcss.config.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// eslint-disable-next-line no-undef
12
module.exports = {
23
plugins: {
34
tailwindcss: {},

packages/app/src/app.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,9 @@ export class WebdriverIODevtoolsApplication extends Element {
3838
@query('section')
3939
window?: HTMLElement
4040

41-
@query('section[data-resizer-window]')
42-
resizerWindow?: HTMLElement
43-
4441
async #getWindow() {
4542
await this.updateComplete
46-
return this.resizerWindow as Element
43+
return this.window as Element
4744
}
4845

4946
connectedCallback(): void {
@@ -69,15 +66,16 @@ export class WebdriverIODevtoolsApplication extends Element {
6966
}
7067

7168
return html`
72-
<section data-resizer-window class="flex h-[calc(100%-40px)] w-full relative">
69+
<section class="flex h-[calc(100%-40px)] w-full relative">
7370
${
7471
// only render sidebar if trace file is captured using testrunner
7572
this.dataManager.traceType === TraceType.Testrunner
76-
? html`<wdio-devtools-sidebar style="${this.#drag?.getPosition()}"></wdio-devtools-sidebar>`
73+
? html`<wdio-devtools-sidebar style="${this.#drag.getPosition()}"></wdio-devtools-sidebar>`
7774
: nothing
7875
}
79-
${this.#drag.getSlider('z-10 h-full')}
76+
8077
<wdio-devtools-workbench class="basis-auto"></wdio-devtools-workbench>
78+
${this.#drag.getSlider()}
8179
</section>
8280
`
8381
}

packages/app/src/components/browser/snapshot.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { consume } from '@lit/context'
44

55
import { type ComponentChildren, h, render, type VNode } from 'preact'
66
import { customElement, query } from 'lit/decorators.js'
7-
import type { SimplifiedVNode } from '../../../../script/types'
87

98
import { mutationContext, type TraceMutation, metadataContext, type Metadata } from '../../controller/DataManager.js'
109

@@ -50,20 +49,11 @@ export class DevtoolsBrowser extends Element {
5049
width: 100%;
5150
height: 100%;
5251
display: flex;
53-
padding: 2rem;
52+
margin: 2rem;
5453
align-items: center;
5554
justify-content: center;
5655
}
5756
58-
section {
59-
box-sizing: border-box;
60-
width: calc(100% - 0px); /* host padding already applied */
61-
height: calc(100% - 0px);
62-
display: flex;
63-
flex-direction: column;
64-
overflow: hidden;
65-
}
66-
6757
.frame-dot {
6858
border-radius: 50%;
6959
height: 12px;
@@ -97,6 +87,9 @@ export class DevtoolsBrowser extends Element {
9787
return
9888
}
9989

90+
this.section.style.width = 'auto'
91+
this.section.style.height = 'auto'
92+
10093
this.iframe.removeAttribute('style')
10194
const viewportWidth = metadata.viewport.width
10295
const viewportHeight = metadata.viewport.height
@@ -308,7 +301,7 @@ export class DevtoolsBrowser extends Element {
308301
}
309302

310303
return html`
311-
<section class="w-full h-full bg-sideBarBackground rounded-t-md shadow-md">
304+
<section class="w-full bg-sideBarBackground rounded-t-md shadow-md">
312305
<header class="flex block mx-2">
313306
<div class="frame-dot bg-notificationsErrorIconForeground"></div>
314307
<div class="frame-dot bg-notificationsWarningIconForeground"></div>
@@ -319,7 +312,7 @@ export class DevtoolsBrowser extends Element {
319312
</div>
320313
</header>
321314
${this.mutations && this.mutations.length
322-
? html`<iframe class="origin-top-left h-full w-full"></iframe>`
315+
? html`<iframe class="origin-top-left"></iframe>`
323316
: html`<wdio-devtools-placeholder style="height: 100%"></wdio-devtools-placeholder>`
324317
}
325318
</section>

packages/app/src/components/sidebar/explorer.ts

Lines changed: 8 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { html, css, nothing, type TemplateResult } from 'lit'
33
import { customElement } from 'lit/decorators.js'
44
import { consume } from '@lit/context'
55
import type { TestStats, SuiteStats } from '@wdio/reporter'
6-
import { repeat } from 'lit/directives/repeat.js'
6+
77
import { TestState } from './test-suite.js'
88
import { suiteContext } from '../../controller/DataManager.js'
99

@@ -20,7 +20,6 @@ import type { DevtoolsSidebarFilter } from './filter.js'
2020
const EXPLORER = 'wdio-devtools-sidebar-explorer'
2121

2222
interface TestEntry {
23-
uid: string
2423
state?: string
2524
label: string
2625
children: TestEntry[]
@@ -33,21 +32,7 @@ export class DevtoolsSidebarExplorer extends CollapseableEntry {
3332
static styles = [...Element.styles, css`
3433
:host {
3534
width: 100%;
36-
display: flex;
37-
flex-direction: column;
38-
min-height: 0;
39-
}
40-
41-
header {
42-
flex: 0 0 auto;
43-
}
44-
45-
wdio-test-suite {
46-
flex: 1 1 auto;
47-
overflow-y: auto;
48-
overflow-x: hidden;
49-
min-height: 0;
50-
scrollbar-width: none;
35+
display: block;
5136
}
5237
`]
5338

@@ -68,16 +53,10 @@ export class DevtoolsSidebarExplorer extends CollapseableEntry {
6853
return html`
6954
<wdio-test-entry state="${entry.state as any}">
7055
<label slot="label">${entry.label}</label>
71-
${entry.children && entry.children.length
72-
? html`
73-
<wdio-test-suite slot="children">
74-
${repeat(
75-
entry.children,
76-
child => child.uid,
77-
child => this.#renderEntry(child)
78-
)}
79-
</wdio-test-suite>
80-
`
56+
${entry.children && entry.children.length ?
57+
html`
58+
<wdio-test-suite slot="children">${entry.children.map(this.#renderEntry.bind(this))}</wdio-test-suite>
59+
`
8160
: nothing
8261
}
8362
</wdio-test-entry>
@@ -109,7 +88,6 @@ export class DevtoolsSidebarExplorer extends CollapseableEntry {
10988
if ('tests' in entry) {
11089
const entries = [...entry.tests, ...entry.suites]
11190
return {
112-
uid: entry.uid,
11391
label: entry.title,
11492
state: entry.tests.some((t) => !t.end)
11593
? TestState.RUNNING
@@ -122,7 +100,6 @@ export class DevtoolsSidebarExplorer extends CollapseableEntry {
122100
}
123101
}
124102
return {
125-
uid: entry.uid,
126103
label: entry.title,
127104
state: !entry.end
128105
? TestState.RUNNING
@@ -137,18 +114,7 @@ export class DevtoolsSidebarExplorer extends CollapseableEntry {
137114
if (!this.suites) {
138115
return
139116
}
140-
141-
// ✅ Only root suites (no parent = true top-level suite)
142-
const rootSuites = this.suites
143-
.flatMap(s => Object.values(s))
144-
.filter(suite => !suite.parent)
145-
146-
// Deduplicate by uid (in case some frameworks still push duplicates)
147-
const uniqueSuites = Array.from(
148-
new Map(rootSuites.map(suite => [suite.uid, suite])).values()
149-
)
150-
151-
const suites = uniqueSuites
117+
const suites = Object.values(this.suites[0])
152118
.map(this.#getTestEntry.bind(this))
153119
.filter(this.#filterEntry.bind(this))
154120

@@ -166,11 +132,7 @@ export class DevtoolsSidebarExplorer extends CollapseableEntry {
166132
</header>
167133
<wdio-test-suite>
168134
${suites.length
169-
? repeat(
170-
suites,
171-
suite => suite.uid,
172-
suite => this.#renderEntry(suite)
173-
)
135+
? suites.map(this.#renderEntry.bind(this))
174136
: html`<p class="text-disabledForeground text-sm px-4 py-2">No tests found</p>`
175137
}
176138
</wdio-test-suite>

packages/app/src/components/tabs.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export class DevtoolsTabs extends Element {
1515
:host {
1616
width: 100%;
1717
flex-grow: 1;
18-
min-height: 0;
1918
display: flex;
2019
flex-direction: column;
2120
color: var(--vscode-foreground);
@@ -131,9 +130,7 @@ export class DevtoolsTab extends Element {
131130
:host {
132131
display: none;
133132
flex-grow: 1;
134-
min-height: 0;
135-
overflow-y: auto;
136-
scrollbar-width: none;
133+
overflow-y: scroll;
137134
}
138135
139136
:host([active]) {

0 commit comments

Comments
 (0)