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()
    // })
})
