Refocus responsive layouts on compact desktop use
All checks were successful
Deploy Sokko G / deploy (push) Successful in 19s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 19s
This commit is contained in:
parent
96d058293d
commit
0ac1a0974e
27 changed files with 610 additions and 190 deletions
|
|
@ -89,7 +89,11 @@ async function copyVisibleResults(page) {
|
|||
|
||||
async function openDrawer(page) {
|
||||
const drawer = page.locator("#toolbox-drawer");
|
||||
if (!await drawer.locator(".drawer-panel").isVisible()) await page.locator(".topbar-actions button").click();
|
||||
if (!await drawer.locator(".drawer-panel").isVisible()) {
|
||||
const compactTrigger = page.getByRole("tab", { name: "Toolbox", exact: true });
|
||||
if (await compactTrigger.isVisible()) await compactTrigger.click();
|
||||
else await page.getByRole("button", { name: "Afficher la toolbox", exact: true }).click();
|
||||
}
|
||||
await expect(drawer.locator(".drawer-panel")).toBeVisible();
|
||||
return drawer;
|
||||
}
|
||||
|
|
@ -190,7 +194,7 @@ test("filtered results create a checklist in the linked active space without rep
|
|||
expect(await page.evaluate((key) => globalThis.localStorage.getItem(key), storageKey)).toBe(associationBefore);
|
||||
});
|
||||
|
||||
for (const width of [1280, 390]) {
|
||||
for (const width of [1280, 768]) {
|
||||
test(`drawer linking, page controls and persistent restoration at ${width}px`, async ({ page }) => {
|
||||
test.setTimeout(60000);
|
||||
await page.setViewportSize({ width, height: 900 });
|
||||
|
|
@ -241,7 +245,7 @@ for (const width of [1280, 390]) {
|
|||
const headingActionsBounds = await page.locator(".game-heading-actions").boundingBox();
|
||||
expect(pageControlsBounds.y).toBeGreaterThanOrEqual(pageHeadingBounds.y);
|
||||
expect(pageControlsBounds.y + pageControlsBounds.height).toBeLessThanOrEqual(pageHeadingBounds.y + pageHeadingBounds.height);
|
||||
if (width > 760) {
|
||||
if (width > 1024) {
|
||||
expect(headingActionsBounds.height).toBeCloseTo(pageHeadingBounds.height, 0);
|
||||
expect(pageControlsBounds.y).toBeCloseTo(pageHeadingBounds.y, 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue