diff --git a/src/server/cli/test-runner.js b/src/server/cli/test-runner.js index 4fc938e3..91baee43 100755 --- a/src/server/cli/test-runner.js +++ b/src/server/cli/test-runner.js @@ -70,7 +70,7 @@ async function getTestRunnerOptions(argv = []) { name: 'golden', type: Boolean, description: 'Generate new golden screenshots. Ignored unless group is "vdiff".', - order: 12 + order: 13 }, { name: 'grep', @@ -83,7 +83,7 @@ async function getTestRunnerOptions(argv = []) { name: 'help', type: Boolean, description: 'Print usage information and exit', - order: 13 + order: 14 }, { name: 'open', @@ -96,6 +96,12 @@ async function getTestRunnerOptions(argv = []) { longAlias: 'webkit', type: Boolean }, + { + name: 'slowmo', + type: Number, + description: 'Slows down test operations by the specified number of milliseconds. Useful so that you can see what is going on.', + order: 12 + }, { name: 'timeout', alias: 't', diff --git a/src/server/wtr-config.js b/src/server/wtr-config.js index 9998499a..1ae9bc17 100644 --- a/src/server/wtr-config.js +++ b/src/server/wtr-config.js @@ -211,7 +211,8 @@ export class WTRConfig { createBrowserContext: ({ browser }) => browser.newContext({ deviceScaleFactor: 2, reducedMotion: 'reduce' }), launchOptions: { headless: !this.#cliArgs.open, - devtools: false + devtools: false, + slowMo: this.#cliArgs.slowmo || 0 } })); }