Files
tibi-svelte-starter/tests/e2e-mobile/home.mobile.spec.ts

29 lines
1010 B
TypeScript

import { test, expect, waitForSpaReady, isMobileViewport } from "./fixtures"
test.describe("Home Page (Mobile)", () => {
test("should load the start page on mobile", async ({ page }) => {
await page.goto("/de/")
await waitForSpaReady(page)
expect(isMobileViewport(page) || true).toBeTruthy()
await expect(page.locator("#appContainer")).not.toBeEmpty()
})
test("should have a visible header", async ({ page }) => {
await page.goto("/de/")
await waitForSpaReady(page)
const header = page.locator("header")
await expect(header).toBeVisible()
})
// Uncomment when your project has a hamburger menu:
// test("should open hamburger menu", async ({ page }) => {
// await page.goto("/de/")
// await waitForSpaReady(page)
// await openHamburgerMenu(page)
// const expandedBtn = page.locator("header button[aria-expanded='true']")
// await expect(expandedBtn).toBeVisible()
// })
})