31907ba651
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
47 lines
2.0 KiB
TypeScript
47 lines
2.0 KiB
TypeScript
import { test, expect } from "../../fixtures/test-base";
|
|
import { expectElementsNotToIntersect } from "../../helpers/layout-assertions";
|
|
import { MobileKanbanPage } from "../../pages/mobile-kanban-page";
|
|
|
|
test("mobile navigation reaches the Message Queue section with touch-safe shared settings layout", async ({
|
|
testPage,
|
|
}) => {
|
|
const mobile = new MobileKanbanPage(testPage);
|
|
await mobile.goto();
|
|
await mobile.mobileMenuButton.click();
|
|
const homeMenu = testPage.getByTestId("mobile-home-menu-card");
|
|
await homeMenu.getByRole("link", { name: "Settings" }).click();
|
|
// Settings lands on the /settings index; the queue lives on Task behavior.
|
|
const index = testPage.getByTestId("settings-index");
|
|
await index.getByRole("link", { name: /^Task Behavior/ }).click();
|
|
|
|
await expect(testPage).toHaveURL(
|
|
(url) => new URL(url).pathname === "/settings/preferences/task-behavior",
|
|
);
|
|
await expect(testPage.getByText("Message Queue").first()).toBeVisible();
|
|
|
|
const input = testPage.getByTestId("message-queue-max-per-session");
|
|
await expect(input).toBeVisible();
|
|
const inputBox = await input.boundingBox();
|
|
expect(inputBox).not.toBeNull();
|
|
expect(inputBox!.height).toBeGreaterThanOrEqual(44);
|
|
|
|
await expect
|
|
.poll(() => testPage.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth))
|
|
.toBe(true);
|
|
await expect(testPage.getByTestId("settings-scroll-container")).toHaveCSS("overflow-y", "auto");
|
|
const nestedScrollOwners = await testPage.getByTestId("message-queue-settings").evaluate(
|
|
(root) =>
|
|
Array.from(root.querySelectorAll("*")).filter((element) => {
|
|
const overflow = getComputedStyle(element).overflowY;
|
|
return overflow === "auto" || overflow === "scroll";
|
|
}).length,
|
|
);
|
|
expect(nestedScrollOwners).toBe(0);
|
|
|
|
const current = await input.inputValue();
|
|
await input.fill(current === "23" ? "24" : "23");
|
|
const saveBar = testPage.getByTestId("settings-floating-save");
|
|
await expect(saveBar).toBeVisible();
|
|
await expectElementsNotToIntersect(input, saveBar);
|
|
});
|