Skip to content

Commit bfccb89

Browse files
committed
fix: Added code to fix pipeline
1 parent 2678dea commit bfccb89

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.github/workflows/playwright.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
jobs:
1313
playwright:
1414
name: Run Playwright
15-
runs-on: ubuntu-latest
15+
runs-on: macos-latest
1616
steps:
1717
# Checkout the repository so the workflow has access to the code
1818
- name: Checkout code

tests/playwright.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default defineConfig({
1414
screenshots: 'only-on-failure',
1515
video: 'retain-on-failure',
1616
trace: 'on-first-retry',
17+
timezoneId: 'America/Los_Angeles',
1718
},
1819
projects: [
1920
{

tests/src/visual-regression.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ test.describe('Testing old theme', () => {
99
await page.evaluate(() => {
1010
// switch to old theme
1111
useNewTheme(false);
12+
window.scrollTo(0, 0);
1213
});
13-
await page.waitForTimeout(500);
14+
await page.waitForFunction(() => window.scrollY === 0);
1415
await page.screenshot({
1516
path: './test-results/example-site-snapshot.png',
1617
fullPage: true,

0 commit comments

Comments
 (0)