Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e4b1dd7
Initial dev test update
vishnuv688 Jul 21, 2025
02d63f3
Live interaction on main screen
vishnuv688 Jul 22, 2025
1957aac
Refined commands that are shown in Actions tab specific to the test c…
vishnuv688 Aug 1, 2025
7446386
UI - Border fix
vishnuv688 Aug 5, 2025
eec8316
Example test case update
vishnuv688 Aug 6, 2025
f4044f8
Close the browser only when the user manages to close it manually and…
vishnuv688 Aug 8, 2025
116b118
Action tab cleanup
vishnuv688 Aug 8, 2025
198cb11
Removed dummy browser pause
vishnuv688 Aug 8, 2025
4fa9190
Slider UI update
vishnuv688 Aug 11, 2025
6cd72f8
Logger update
vishnuv688 Aug 11, 2025
ff6064f
Horizontal slider update
vishnuv688 Aug 12, 2025
e277482
Ignore all retries command in case of failure test case
vishnuv688 Aug 18, 2025
3a6c115
Added documentation
vishnuv688 Aug 19, 2025
b8e503a
Removed duplicates when importing trace file
vishnuv688 Aug 20, 2025
6ac647e
Dependencies update
vishnuv688 Aug 21, 2025
260ed6e
Improved the generic working of commands recorder
vishnuv688 Aug 29, 2025
1c84a48
Revert "Improved the generic working of commands recorder"
vishnuv688 Sep 1, 2025
9a2c8db
Trace data update
vishnuv688 Sep 2, 2025
08e2320
Fixed top level commands trace
vishnuv688 Sep 3, 2025
9e511ae
Updated browser context injection
vishnuv688 Sep 8, 2025
b0d7f0a
Metadata tab UI changes
vishnuv688 Sep 8, 2025
65c21f7
Tailwind and major UI updates
vishnuv688 Sep 9, 2025
42c1998
Test-suit scroll bar
vishnuv688 Sep 9, 2025
beb09f9
Iframe UI update
vishnuv688 Sep 10, 2025
49c0580
Hide scrollbar
vishnuv688 Sep 11, 2025
e58a2a2
Fix for wdio-devtools-tab scrollbar issue
vishnuv688 Sep 11, 2025
2bd5d33
Fix for horizontal slider
vishnuv688 Sep 12, 2025
cdfb954
Horizontal slider updates
vishnuv688 Sep 12, 2025
73b0927
Slider fixes
vishnuv688 Sep 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions example/features/step-definitions/steps.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Given, When, Then } from '@wdio/cucumber-framework'
import { expect } from '@wdio/globals'
import { Given, When, Then, After } from '@wdio/cucumber-framework'
import { browser, expect } from '@wdio/globals'

import LoginPage from '../pageobjects/login.page.js'
import SecurePage from '../pageobjects/secure.page.js'
Expand All @@ -8,6 +8,10 @@ const pages = {
login: LoginPage
} as const

After(async () => {
await browser.reloadSession()
})

Given(/^I am on the (\w+) page$/, async (page: keyof typeof pages) => {
await pages[page].open()
})
Expand All @@ -17,8 +21,9 @@ When(/^I login with (\w+) and (.+)$/, async (username, password) => {
})

Then(/^I should see a flash message saying (.*)$/, async (message) => {
await expect(SecurePage.flashAlert).toBeExisting()
await expect(SecurePage.flashAlert).toHaveTextContaining(message)
const el = await SecurePage.flashAlert
await expect(el).toBeExisting()
await expect(el).toHaveText(expect.stringContaining(message))
await browser.pause(15000)
})

20 changes: 11 additions & 9 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@
"name": "examples",
"type": "module",
"devDependencies": {
"@wdio/cli": "8.39.0",
"@wdio/cucumber-framework": "^8.39.0",
"@wdio/devtools-service": "workspace:^",
"@wdio/globals": "^8.39.0",
"@wdio/local-runner": "^8.39.0",
"@wdio/spec-reporter": "^8.39.0",
"@wdio/types": "^8.39.0",
"expect-webdriverio": "^4.15.1",
"@wdio/cli": "9.18.0",
"@wdio/cucumber-framework": "9.18.0",
"@wdio/devtools-service": "workspace:*",
"@wdio/globals": "9.17.0",
"@wdio/local-runner": "9.18.0",
"@wdio/spec-reporter": "9.18.0",
"@wdio/types": "9.16.2",
"expect-webdriverio": "^5.4.0",
"ts-node": "^10.9.2",
"typescript": "^5.4.5"
"tsconfig-paths": "^4.2.0",
"tsx": "^4.20.3",
"typescript": "^5.8.3"
},
"scripts": {
"wdio": "wdio run ./wdio.conf.ts"
Expand Down
37 changes: 19 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,28 @@
"watch": "pnpm build --watch"
},
"devDependencies": {
"@types/node": "^20.14.5",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@typescript-eslint/utils": "^6.9.0",
"@vitest/browser": "^0.34.6",
"autoprefixer": "^10.4.19",
"eslint": "^8.52.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-unicorn": "^48.0.1",
"@types/node": "^24.3.0",
"@typescript-eslint/eslint-plugin": "^8.40.0",
"@typescript-eslint/parser": "^8.40.0",
"@typescript-eslint/utils": "^8.40.0",
"@vitest/browser": "^3.2.4",
"autoprefixer": "^10.4.21",
"eslint": "^9.33.0",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-unicorn": "^59.0.1",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.38",
"postcss-lit": "^1.1.1",
"tailwindcss": "^3.4.4",
"postcss": "^8.5.6",
"postcss-lit": "^1.2.0",
"tailwindcss": "^4.1.12",
"ts-node": "^10.9.2",
"typescript": "^5.0.2",
"unplugin-icons": "^0.19.0",
"vite": "^4.4.5",
"vitest": "^0.34.6",
"webdriverio": "^8.39.0"
"tsx": "^4.20.4",
"typescript": "^5.9.2",
"unplugin-icons": "^22.2.0",
"vite": "^7.1.3",
"vitest": "^3.2.4",
"webdriverio": "^9.19.1"
},
"dependencies": {
"@wdio/cli": "8.39.0"
"@wdio/cli": "9.18.0"
}
}
32 changes: 20 additions & 12 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,30 @@
"test": "eslint ."
},
"dependencies": {
"@codemirror/lang-javascript": "^6.2.1",
"@codemirror/theme-one-dark": "^6.1.2",
"@codemirror/view": "^6.22.0",
"@iconify-json/mdi": "^1.1.54",
"@lit/context": "^1.0.1",
"@wdio/protocols": "^8.23.0",
"codemirror": "^6.0.1",
"lit": "^2.7.6",
"placeholder-loading": "^0.6.0",
"@codemirror/lang-javascript": "^6.2.4",
"@codemirror/theme-one-dark": "^6.1.3",
"@codemirror/view": "^6.38.1",
"@iconify-json/mdi": "^1.2.3",
"@lit/context": "^1.1.6",
"@wdio/protocols": "9.16.2",
"codemirror": "^6.0.2",
"lit": "^3.3.1",
"placeholder-loading": "^0.7.0",
"pointer-tracker": "^2.5.3",
"preact": "^10.18.1"
"preact": "^10.27.1"
},
"author": "Christian Bromann <[email protected]>",
"license": "MIT",
"devDependencies": {
"@wdio/devtools-service": "workspace:^",
"@wdio/reporter": "^8.23.0"
"@tailwindcss/postcss": "^4.1.12",
"@wdio/devtools-service": "workspace:*",
"@wdio/reporter": "9.18.0",
"autoprefixer": "^10.4.21",
"postcss": "^8.5.6",
"rollup": "^4.47.0",
"stylelint": "^16.24.0",
"stylelint-config-recommended": "^17.0.0",
"stylelint-config-tailwindcss": "^1.0.0",
"tailwindcss": "~3.4.17"
}
}
1 change: 0 additions & 1 deletion packages/app/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line no-undef
module.exports = {
plugins: {
tailwindcss: {},
Expand Down
12 changes: 7 additions & 5 deletions packages/app/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ export class WebdriverIODevtoolsApplication extends Element {
@query('section')
window?: HTMLElement

@query('section[data-resizer-window]')
resizerWindow?: HTMLElement

async #getWindow() {
await this.updateComplete
return this.window as Element
return this.resizerWindow as Element
}

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

return html`
<section class="flex h-[calc(100%-40px)] w-full relative">
<section data-resizer-window class="flex h-[calc(100%-40px)] w-full relative">
${
// only render sidebar if trace file is captured using testrunner
this.dataManager.traceType === TraceType.Testrunner
? html`<wdio-devtools-sidebar style="${this.#drag.getPosition()}"></wdio-devtools-sidebar>`
? html`<wdio-devtools-sidebar style="${this.#drag?.getPosition()}"></wdio-devtools-sidebar>`
: nothing
}

${this.#drag.getSlider('z-10 h-full')}
<wdio-devtools-workbench class="basis-auto"></wdio-devtools-workbench>
${this.#drag.getSlider()}
</section>
`
}
Expand Down
19 changes: 13 additions & 6 deletions packages/app/src/components/browser/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { consume } from '@lit/context'

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

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

Expand Down Expand Up @@ -49,11 +50,20 @@ export class DevtoolsBrowser extends Element {
width: 100%;
height: 100%;
display: flex;
margin: 2rem;
padding: 2rem;
align-items: center;
justify-content: center;
}

section {
box-sizing: border-box;
width: calc(100% - 0px); /* host padding already applied */
height: calc(100% - 0px);
display: flex;
flex-direction: column;
overflow: hidden;
}

.frame-dot {
border-radius: 50%;
height: 12px;
Expand Down Expand Up @@ -87,9 +97,6 @@ export class DevtoolsBrowser extends Element {
return
}

this.section.style.width = 'auto'
this.section.style.height = 'auto'

this.iframe.removeAttribute('style')
const viewportWidth = metadata.viewport.width
const viewportHeight = metadata.viewport.height
Expand Down Expand Up @@ -301,7 +308,7 @@ export class DevtoolsBrowser extends Element {
}

return html`
<section class="w-full bg-sideBarBackground rounded-t-md shadow-md">
<section class="w-full h-full bg-sideBarBackground rounded-t-md shadow-md">
<header class="flex block mx-2">
<div class="frame-dot bg-notificationsErrorIconForeground"></div>
<div class="frame-dot bg-notificationsWarningIconForeground"></div>
Expand All @@ -312,7 +319,7 @@ export class DevtoolsBrowser extends Element {
</div>
</header>
${this.mutations && this.mutations.length
? html`<iframe class="origin-top-left"></iframe>`
? html`<iframe class="origin-top-left h-full w-full"></iframe>`
: html`<wdio-devtools-placeholder style="height: 100%"></wdio-devtools-placeholder>`
}
</section>
Expand Down
54 changes: 46 additions & 8 deletions packages/app/src/components/sidebar/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { html, css, nothing, type TemplateResult } from 'lit'
import { customElement } from 'lit/decorators.js'
import { consume } from '@lit/context'
import type { TestStats, SuiteStats } from '@wdio/reporter'

import { repeat } from 'lit/directives/repeat.js'
import { TestState } from './test-suite.js'
import { suiteContext } from '../../controller/DataManager.js'

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

interface TestEntry {
uid: string
state?: string
label: string
children: TestEntry[]
Expand All @@ -32,7 +33,21 @@ export class DevtoolsSidebarExplorer extends CollapseableEntry {
static styles = [...Element.styles, css`
:host {
width: 100%;
display: block;
display: flex;
flex-direction: column;
min-height: 0;
}

header {
flex: 0 0 auto;
}

wdio-test-suite {
flex: 1 1 auto;
overflow-y: auto;
overflow-x: hidden;
min-height: 0;
scrollbar-width: none;
}
`]

Expand All @@ -53,10 +68,16 @@ export class DevtoolsSidebarExplorer extends CollapseableEntry {
return html`
<wdio-test-entry state="${entry.state as any}">
<label slot="label">${entry.label}</label>
${entry.children && entry.children.length ?
html`
<wdio-test-suite slot="children">${entry.children.map(this.#renderEntry.bind(this))}</wdio-test-suite>
`
${entry.children && entry.children.length
? html`
<wdio-test-suite slot="children">
${repeat(
entry.children,
child => child.uid,
child => this.#renderEntry(child)
)}
</wdio-test-suite>
`
: nothing
}
</wdio-test-entry>
Expand Down Expand Up @@ -88,6 +109,7 @@ export class DevtoolsSidebarExplorer extends CollapseableEntry {
if ('tests' in entry) {
const entries = [...entry.tests, ...entry.suites]
return {
uid: entry.uid,
label: entry.title,
state: entry.tests.some((t) => !t.end)
? TestState.RUNNING
Expand All @@ -100,6 +122,7 @@ export class DevtoolsSidebarExplorer extends CollapseableEntry {
}
}
return {
uid: entry.uid,
label: entry.title,
state: !entry.end
? TestState.RUNNING
Expand All @@ -114,7 +137,18 @@ export class DevtoolsSidebarExplorer extends CollapseableEntry {
if (!this.suites) {
return
}
const suites = Object.values(this.suites[0])

// ✅ Only root suites (no parent = true top-level suite)
const rootSuites = this.suites
.flatMap(s => Object.values(s))
.filter(suite => !suite.parent)

// Deduplicate by uid (in case some frameworks still push duplicates)
const uniqueSuites = Array.from(
new Map(rootSuites.map(suite => [suite.uid, suite])).values()
)

const suites = uniqueSuites
.map(this.#getTestEntry.bind(this))
.filter(this.#filterEntry.bind(this))

Expand All @@ -132,7 +166,11 @@ export class DevtoolsSidebarExplorer extends CollapseableEntry {
</header>
<wdio-test-suite>
${suites.length
? suites.map(this.#renderEntry.bind(this))
? repeat(
suites,
suite => suite.uid,
suite => this.#renderEntry(suite)
)
: html`<p class="text-disabledForeground text-sm px-4 py-2">No tests found</p>`
}
</wdio-test-suite>
Expand Down
5 changes: 4 additions & 1 deletion packages/app/src/components/tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export class DevtoolsTabs extends Element {
:host {
width: 100%;
flex-grow: 1;
min-height: 0;
display: flex;
flex-direction: column;
color: var(--vscode-foreground);
Expand Down Expand Up @@ -130,7 +131,9 @@ export class DevtoolsTab extends Element {
:host {
display: none;
flex-grow: 1;
overflow-y: scroll;
min-height: 0;
overflow-y: auto;
scrollbar-width: none;
}

:host([active]) {
Expand Down
Loading
Loading