test: cover tablet mobile boards

This commit is contained in:
ajnart committed 2026-08-14 11:32:09 +02:00
1 parent bb5df3a2e6
commit bb599e7fae
1 file changed
+15
+15
View File
@@ -253,6 +253,21 @@ describe("Automatic mobile board", () => {
expect(metrics.firstToSecondHeightRatio).toBeGreaterThan(1.8);
expect(metrics.horizontalOverflow).toBeLessThanOrEqual(0);
await mobileContext.close();
const tabletContext = await browser.newContext({
storageState,
viewport: { width: 768, height: 1024 },
userAgent: devices["iPad (gen 7)"].userAgent,
hasTouch: true,
isMobile: true,
});
const tabletPage = await tabletContext.newPage();
await tabletPage.goto(`${baseUrl}/boards/${boardName}`);
await expect(tabletPage.locator("[data-mobile-board]")).toBeVisible({ timeout: 15_000 });
await expect(tabletPage.locator("[data-mobile-board-item]")).toHaveCount(2);
await expect(tabletPage.locator("[data-mobile-board-preview-toggle]")).toHaveCount(0);
await expect(tabletPage.getByRole("button", { name: "Toggle board edit mode", exact: true })).toHaveCount(0);
await tabletContext.close();
} finally {
await loginContext.close();
await browser.close();