Skip to content

Commit

Permalink
Make webdriver screenshot size consistent with default Tauri app size
Browse files Browse the repository at this point in the history
  • Loading branch information
amosjyng committed Aug 6, 2024
1 parent 56e83a4 commit c487a51
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion webdriver/wdio.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ exports.config = {
stdio: [null, process.stdout, process.stderr],
})),

before: (
_capabilities: Record<string, unknown>[],
_specs: string[],
browser: WebdriverIO.Browser,
) => {
browser.setWindowSize(850, 650);
},

// clean up the `tauri-driver` process we spawned at the start of the session
afterSession: () => tauriDriver.kill(),

Expand All @@ -44,7 +52,7 @@ exports.config = {
"image-comparison",
{
baselineFolder: join(process.cwd(), "./screenshots/baseline/"),
formatImageName: "{tag}-{width}x{height}",
formatImageName: "{tag}",
screenshotPath: join(process.cwd(), "./screenshots/testing/"),
savePerInstance: true,
autoSaveBaseline: true,
Expand Down

0 comments on commit c487a51

Please sign in to comment.