Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions tests/e2e/export.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ const expectImageWasLoaded = async (locator: Locator) => {
expect(await locator.evaluate((img: HTMLImageElement) => img.naturalHeight)).toBeGreaterThan(0)
}
test('Renders the Home page correctly with output export', async ({ page, outputExport }) => {
const response = await page.goto(outputExport.url)
const headers = response?.headers() || {}
await page.goto(outputExport.url)

await expect(page).toHaveTitle('Simple Next App')

expect(headers['cache-status']).toBe('"Netlify Edge"; fwd=miss')

const h1 = page.locator('h1')
await expect(h1).toHaveText('Home')

Expand All @@ -22,13 +19,10 @@ test('Renders the Home page correctly with output export and publish set to out'
page,
ouputExportPublishOut,
}) => {
const response = await page.goto(ouputExportPublishOut.url)
const headers = response?.headers() || {}
await page.goto(ouputExportPublishOut.url)

await expect(page).toHaveTitle('Simple Next App')

expect(headers['cache-status']).toBe('"Netlify Edge"; fwd=miss')

const h1 = page.locator('h1')
await expect(h1).toHaveText('Home')

Expand All @@ -39,13 +33,10 @@ test('Renders the Home page correctly with output export and custom dist dir', a
page,
outputExportCustomDist,
}) => {
const response = await page.goto(outputExportCustomDist.url)
const headers = response?.headers() || {}
await page.goto(outputExportCustomDist.url)

await expect(page).toHaveTitle('Simple Next App')

expect(headers['cache-status']).toBe('"Netlify Edge"; fwd=miss')

const h1 = page.locator('h1')
await expect(h1).toHaveText('Home')

Expand Down
Loading