refactor: handle Gatsby's dev page conditionally (#54723)

pull/54719/head
Oliver Eyton-Williams 2024-05-10 00:19:33 +02:00 committed by GitHub
parent 0d3d599b95
commit ae1bc60cab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 8 deletions

View File

@ -87,10 +87,12 @@ test.describe('Profile component', () => {
test.beforeEach(async ({ page }) => { test.beforeEach(async ({ page }) => {
await page.goto('/certifieduser'); await page.goto('/certifieduser');
// The following line is required if you're running the test in local development // If you build the client locally, delete the button click below.
// await page if (!process.env.CI) {
// .getByRole('button', { name: 'Preview custom 404 page' }) await page
// .click(); .getByRole('button', { name: 'Preview custom 404 page' })
.click();
}
}); });
test('renders the camper profile correctly', async ({ page }) => { test('renders the camper profile correctly', async ({ page }) => {
@ -193,10 +195,12 @@ test.describe('Profile component', () => {
test.beforeEach(async ({ page }) => { test.beforeEach(async ({ page }) => {
await page.goto('/publicUser'); await page.goto('/publicUser');
// The following line is required if you're running the test in local development // If you build the client locally, delete the button click below.
// await page if (!process.env.CI) {
// .getByRole('button', { name: 'Preview custom 404 page' }) await page
// .click(); .getByRole('button', { name: 'Preview custom 404 page' })
.click();
}
}); });
test.describe('while logged in', () => { test.describe('while logged in', () => {