test: add 404 status code test
This commit is contained in:
parent
9d6ba2ecd3
commit
47ea1af369
3 changed files with 18 additions and 0 deletions
6
apps/blog/e2e/notfound.spec.ts
Normal file
6
apps/blog/e2e/notfound.spec.ts
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
import { expect, test } from "@playwright/test"
|
||||||
|
|
||||||
|
test("Should return 404 for invalid routes", async ({ page }) => {
|
||||||
|
const response = await page.goto("/path/that/does/not/exist")
|
||||||
|
expect(response?.status()).toEqual(404)
|
||||||
|
})
|
6
apps/main/e2e/notfound.spec.ts
Normal file
6
apps/main/e2e/notfound.spec.ts
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
import { expect, test } from "@playwright/test"
|
||||||
|
|
||||||
|
test("Should return 404 for invalid routes", async ({ page }) => {
|
||||||
|
const response = await page.goto("/path/that/does/not/exist")
|
||||||
|
expect(response?.status()).toEqual(404)
|
||||||
|
})
|
6
apps/portfolio/e2e/notfound.spec.ts
Normal file
6
apps/portfolio/e2e/notfound.spec.ts
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
import { expect, test } from "@playwright/test"
|
||||||
|
|
||||||
|
test("Should return 404 for invalid routes", async ({ page }) => {
|
||||||
|
const response = await page.goto("/path/that/does/not/exist")
|
||||||
|
expect(response?.status()).toEqual(404)
|
||||||
|
})
|
Loading…
Add table
Add a link
Reference in a new issue