Skip to content

Commit

Permalink
Attempt to fix navbar inconsistency
Browse files Browse the repository at this point in the history
Added waitFor: 'network-idle' in an attempt to wait for the JS to load.

Also removed tests for blog page since there is currently no way of running the Playwright tests with DEBUG_MODE_ENABLED sadly.
  • Loading branch information
EthanThatOneKid committed Oct 12, 2022
1 parent deee127 commit 312e3b3
Show file tree
Hide file tree
Showing 27 changed files with 5 additions and 61 deletions.
2 changes: 1 addition & 1 deletion src/routes/(site)/1st/page.test.ts
Expand Up @@ -47,7 +47,7 @@ test('first contributions page matches screenshot', async ({ page }, testInfo) =
});
}

await page.goto('/1st');
await page.goto('/1st', { waitUntil: 'networkidle' });
expect(await page.screenshot({ fullPage: true, scale: 'css' })).toMatchSnapshot({
name: `page-${data.projectName}.png`,
});
Expand Down
Binary file modified src/routes/(site)/1st/screenshots/page-dark-desktop.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/routes/(site)/1st/screenshots/page-dark-mobile.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/routes/(site)/1st/screenshots/page-dark-tablet.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/routes/(site)/1st/screenshots/page-light-desktop.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/routes/(site)/1st/screenshots/page-light-mobile.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/routes/(site)/1st/screenshots/page-light-tablet.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/routes/(site)/about/page.test.ts
Expand Up @@ -47,7 +47,7 @@ test('about page matches screenshot', async ({ page }, testInfo) => {
});
}

await page.goto('/about');
await page.goto('/about', { waitUntil: 'networkidle' });
expect(await page.screenshot({ fullPage: true, scale: 'css' })).toMatchSnapshot({
name: `page-${data.projectName}.png`,
});
Expand Down
Binary file modified src/routes/(site)/about/screenshots/page-dark-mobile.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/routes/(site)/about/screenshots/page-light-mobile.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/routes/(site)/blog/[id]/page.test.ts
Expand Up @@ -47,7 +47,7 @@ test('blog post page matches screenshot', async ({ page }, testInfo) => {
});
}

await page.goto('/blog/272');
await page.goto('/blog/272', { waitUntil: 'networkidle' });
expect(await page.screenshot({ fullPage: true, scale: 'css' })).toMatchSnapshot({
name: `page-${data.projectName}.png`,
});
Expand Down
Binary file modified src/routes/(site)/blog/[id]/screenshots/page-light-desktop.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/routes/(site)/blog/[id]/screenshots/page-light-mobile.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/routes/(site)/blog/[id]/screenshots/page-light-tablet.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 0 additions & 56 deletions src/routes/(site)/blog/page.test.ts

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion src/routes/(site)/events/page.test.ts
Expand Up @@ -47,7 +47,7 @@ test('events page matches screenshot', async ({ page }, testInfo) => {
});
}

await page.goto('/events');
await page.goto('/events', { waitUntil: 'networkidle' });
expect(await page.screenshot({ fullPage: true, scale: 'css' })).toMatchSnapshot({
name: `page-${data.projectName}.png`,
});
Expand Down
Binary file modified src/routes/(site)/events/screenshots/page-dark-desktop.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/routes/(site)/events/screenshots/page-dark-mobile.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/routes/(site)/events/screenshots/page-dark-tablet.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/routes/(site)/events/screenshots/page-light-mobile.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/routes/error.test.ts
Expand Up @@ -47,7 +47,7 @@ test('error page matches screenshot', async ({ page }, testInfo) => {
});
}

await page.goto('/this-page/does-not/exist');
await page.goto('/this-page/does-not/exist', { waitUntil: 'networkidle' });

expect(await page.screenshot({ fullPage: true, scale: 'css' })).toMatchSnapshot({
name: `error-${data.projectName}.png`,
Expand Down

0 comments on commit 312e3b3

Please sign in to comment.