test: add 404 status code test

This commit is contained in:
Kim, Jimin 2023-08-02 00:57:58 +09:00
parent 9d6ba2ecd3
commit 47ea1af369
Signed by: pomp
GPG key ID: CE1DDB8A4A765403
3 changed files with 18 additions and 0 deletions

View 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)
})

View 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)
})

View 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)
})