test(blog): 404 page title
This commit is contained in:
parent
71c8c98baa
commit
5d61043ed1
1 changed files with 7 additions and 2 deletions
|
@ -1,9 +1,14 @@
|
||||||
import { expect, test } from "@playwright/test"
|
import { expect, test } from "@playwright/test"
|
||||||
|
|
||||||
|
const prefix = "pomp's blog | "
|
||||||
|
|
||||||
test("should have proper title", async ({ page }) => {
|
test("should have proper title", async ({ page }) => {
|
||||||
await page.goto("/")
|
await page.goto("/")
|
||||||
expect(await page.title()).toEqual("pomp's blog | Home")
|
expect(await page.title()).toEqual(`${prefix}Home`)
|
||||||
|
|
||||||
await page.goto("/posts/test-post")
|
await page.goto("/posts/test-post")
|
||||||
expect(await page.title()).toEqual("pomp's blog | Test post")
|
expect(await page.title()).toEqual(`${prefix}Test post`)
|
||||||
|
|
||||||
|
await page.goto("/404")
|
||||||
|
expect(await page.title()).toEqual(`${prefix}Page Not Found`)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue