diff --git a/README.md b/README.md index f5b7c974..67ca25f8 100644 --- a/README.md +++ b/README.md @@ -125,28 +125,35 @@ See [ARCHITECTURE.md](./ARCHITECTURE.md) for the full package map and data flow, ## Demo +### ▢️ Test Runner +Test Runner Demo + ### πŸ› οΈ Test Rerunner & Snapshot -Test Rerunner & Snapshot Demo +Test Rerunner & Snapshot Demo ### πŸ›‘ Stop Test Runner -Stop Test Runner Demo +Stop Test Runner Demo -### πŸ”οΈŽ TestLens -TestLens Demo +### ⚑ Actions & Command Logs +Actions & Command Logs Demo ### >_ Console Logs -Console Logs +Console Logs Demo ### 🌐 Network Logs -Network Logs 1 +Network Logs Demo -Network Logs 2 +### πŸ“‹ Metadata +Metadata Demo ### 🎬 Session Screencast -Screencast +Session Screencast Demo ### 🐞 Preserve & Rerun -Preserve & Rerun +Preserve & Rerun Demo + +### πŸ”οΈŽ TestLens +TestLens Demo ## Installation diff --git a/assets/actions-command-logs.gif b/assets/actions-command-logs.gif new file mode 100644 index 00000000..5d7da709 Binary files /dev/null and b/assets/actions-command-logs.gif differ diff --git a/assets/console-logs.gif b/assets/console-logs.gif new file mode 100644 index 00000000..853f383a Binary files /dev/null and b/assets/console-logs.gif differ diff --git a/assets/metadata.gif b/assets/metadata.gif new file mode 100644 index 00000000..2e37c7a3 Binary files /dev/null and b/assets/metadata.gif differ diff --git a/assets/network-logs.gif b/assets/network-logs.gif new file mode 100644 index 00000000..96277ae4 Binary files /dev/null and b/assets/network-logs.gif differ diff --git a/assets/preserve-rerun.gif b/assets/preserve-rerun.gif new file mode 100644 index 00000000..84c86f7a Binary files /dev/null and b/assets/preserve-rerun.gif differ diff --git a/assets/screencast.gif b/assets/screencast.gif new file mode 100644 index 00000000..e0b3887a Binary files /dev/null and b/assets/screencast.gif differ diff --git a/assets/stop-test-runner.gif b/assets/stop-test-runner.gif new file mode 100644 index 00000000..760e6922 Binary files /dev/null and b/assets/stop-test-runner.gif differ diff --git a/assets/test-rerunner.gif b/assets/test-rerunner.gif new file mode 100644 index 00000000..e3fc4e02 Binary files /dev/null and b/assets/test-rerunner.gif differ diff --git a/assets/test-runner.gif b/assets/test-runner.gif new file mode 100644 index 00000000..b2697350 Binary files /dev/null and b/assets/test-runner.gif differ diff --git a/assets/testlens.gif b/assets/testlens.gif new file mode 100644 index 00000000..17d205ec Binary files /dev/null and b/assets/testlens.gif differ diff --git a/examples/nightwatch/nightwatch.conf.cjs b/examples/nightwatch/nightwatch.conf.cjs index 7f14af67..2a969097 100644 --- a/examples/nightwatch/nightwatch.conf.cjs +++ b/examples/nightwatch/nightwatch.conf.cjs @@ -32,7 +32,7 @@ module.exports = { '--headless', '--no-sandbox', '--disable-dev-shm-usage', - '--window-size=1600,1200' + '--window-size=1600,900' ] }, 'goog:loggingPrefs': { performance: 'ALL' } diff --git a/examples/wdio/wdio.conf.ts b/examples/wdio/wdio.conf.ts index 00abe28a..0f7b3470 100644 --- a/examples/wdio/wdio.conf.ts +++ b/examples/wdio/wdio.conf.ts @@ -69,7 +69,7 @@ export const config: Options.Testrunner = { '--headless', '--disable-gpu', '--remote-allow-origins=*', - '--window-size=1600,1200' + '--window-size=1600,900' ] } // }, { diff --git a/packages/app/src/app.ts b/packages/app/src/app.ts index c98fa1cf..788facb2 100644 --- a/packages/app/src/app.ts +++ b/packages/app/src/app.ts @@ -6,7 +6,11 @@ import { TraceType, type TraceLog } from '@wdio/devtools-shared' import { Element } from '@core/element' import { DataManagerController } from './controller/DataManager.js' import { DragController, Direction } from './utils/DragController.js' -import { SIDEBAR_MIN_WIDTH, DARK_MODE_KEY } from './controller/constants.js' +import { + SIDEBAR_MIN_WIDTH, + SIDEBAR_DEFAULT_WIDTH, + DARK_MODE_KEY +} from './controller/constants.js' import { POPOUT_QUERY } from './components/workbench/compare/constants.js' // Bootstrap the dark-mode class on as early as possible so popout @@ -65,7 +69,7 @@ export class WebdriverIODevtoolsApplication extends Element { #drag = new DragController(this, { localStorageKey: 'sidebarWidth', minPosition: SIDEBAR_MIN_WIDTH, - initialPosition: window.innerWidth * 0.2, + initialPosition: SIDEBAR_DEFAULT_WIDTH, getContainerEl: () => this.#getWindow(), direction: Direction.horizontal }) diff --git a/packages/app/src/components/browser/browser-chrome.ts b/packages/app/src/components/browser/browser-chrome.ts new file mode 100644 index 00000000..0aa0a4da --- /dev/null +++ b/packages/app/src/components/browser/browser-chrome.ts @@ -0,0 +1,36 @@ +import type { nothing } from 'lit' +import { html, type TemplateResult } from 'lit' + +import '~icons/mdi/world.js' +import '~icons/mdi/lock.js' + +/** The browser-frame chrome: traffic-light dots, address bar (with a lock for + * https), and a slot for the Snapshot/Screencast view toggle. Extracted from + * the snapshot component so that file stays focused on capture/replay. */ +export function renderBrowserChrome( + displayUrl: string | undefined, + viewToggle: TemplateResult | typeof nothing +): TemplateResult { + return html` +
+
+
+
+
+ ${displayUrl?.startsWith('https') + ? html`` + : html``} + ${displayUrl} +
+ ${viewToggle} +
+ ` +} diff --git a/packages/app/src/components/browser/screencast-player.ts b/packages/app/src/components/browser/screencast-player.ts new file mode 100644 index 00000000..7687d1c3 --- /dev/null +++ b/packages/app/src/components/browser/screencast-player.ts @@ -0,0 +1,343 @@ +import { Element } from '@core/element' +import { css, html } from 'lit' +import { customElement, property, query, state } from 'lit/decorators.js' +import { consume } from '@lit/context' +import type { CommandLog } from '@wdio/devtools-shared' + +import { commandContext } from '../../controller/context.js' +import { computeMarkers, formatClock } from './scrubber.js' + +const COMPONENT = 'wdio-devtools-screencast-player' + +/** + * Screencast video player with a custom scrubber: play/pause, `m:ss / m:ss` + * time, an orange progress bar with drag-seek, and per-command markers pinned + * to the recording timeline. Owns the `