fix(ui): contain mobile article fields and stabilize history checks
This commit is contained in:
1 parent
88790d1a0d
commit
fe1b358ed2
5 files changed
+47
-3
No files matched your search
@@ -65,6 +65,13 @@ test("article form and preview dialog pass accessibility with focus return", asy
|
||||
}) => {
|
||||
await page.goto("/admin/articles/new");
|
||||
await expect(page.locator("iframe.tox-edit-area__iframe")).toBeVisible();
|
||||
await expect
|
||||
.poll(() =>
|
||||
page
|
||||
.locator("form")
|
||||
.evaluate((form) => form.scrollWidth <= form.clientWidth),
|
||||
)
|
||||
.toBe(true);
|
||||
await accessible(page);
|
||||
await page.locator('input[name="title"]').fill("Accessible community update");
|
||||
const preview = page.getByRole("button", { name: "Preview", exact: true });
|
||||
@@ -129,3 +136,27 @@ test("queued synchronization survives reload without duplicate submission", asyn
|
||||
await accessible(page);
|
||||
await expect(page.getByRole("main")).toHaveScreenshot("sync-history.png");
|
||||
});
|
||||
|
||||
test("article editor fits a narrow mobile card without horizontal overflow", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.setViewportSize({ width: 360, height: 844 });
|
||||
await page.goto("/admin/articles/new");
|
||||
await expect(page.locator("iframe.tox-edit-area__iframe")).toBeVisible();
|
||||
await expect
|
||||
.poll(() =>
|
||||
page
|
||||
.locator("form")
|
||||
.evaluate((form) => form.scrollWidth <= form.clientWidth),
|
||||
)
|
||||
.toBe(true);
|
||||
await expect
|
||||
.poll(() =>
|
||||
page.evaluate(
|
||||
() =>
|
||||
document.documentElement.scrollWidth <=
|
||||
document.documentElement.clientWidth,
|
||||
),
|
||||
)
|
||||
.toBe(true);
|
||||
});
|
||||
Reference in new issue
Block a user