Skip to content

Commit

Permalink
Add --slomo option (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
bearfriend authored Jul 24, 2023
1 parent be71850 commit b6bf57b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/server/cli/test-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -83,7 +83,7 @@ async function getTestRunnerOptions(argv = []) {
name: 'help',
type: Boolean,
description: 'Print usage information and exit',
order: 13
order: 14
},
{
name: 'open',
Expand All @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion src/server/wtr-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}));
}
Expand Down

0 comments on commit b6bf57b

Please sign in to comment.