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