Auto picks panes from 900 px wide, a laptop's window too, not 1600
One pane and the stack of earlier ones beside it read well from there. The browser tests start in the column (playwright.config.ts) where they mean it; a panes test lets the layout follow the window (helpers.ts autoLayout). New: auto gives panes at 1366 and the column at 820 and 390. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
1 parent
f8d663ebc1
commit
5f6ea8e5c9
13 files changed
+53
-19
No files matched your search
@@ -5,18 +5,21 @@
|
||||
* again in a later revision, or listed as detached when its words are gone.
|
||||
*/
|
||||
import { expect, test, type Page } from "@playwright/test";
|
||||
import { command, idle, jump, keys, seedLinks, selected, settle, state } from "./helpers";
|
||||
import { autoLayout, command, idle, jump, keys, seedLinks, selected, settle, state } from "./helpers";
|
||||
|
||||
const panes = (page: Page) => page.locator(".strip .pane");
|
||||
|
||||
async function wide(page: Page, path = "/doc/fixed-points") {
|
||||
await page.setViewportSize({ width: 1920, height: 1080 });
|
||||
await autoLayout(page);
|
||||
await page.goto(path);
|
||||
await page.waitForSelector(".strip .pane");
|
||||
await page.evaluate(() => document.fonts.ready);
|
||||
}
|
||||
async function column(page: Page, path: string) {
|
||||
await page.setViewportSize({ width: 1440, height: 900 });
|
||||
// After wide(), this page's layout follows the window, and 1440 px is wide enough for panes.
|
||||
if (page.url().startsWith("http")) await page.evaluate(() => localStorage.setItem("ie:settings", JSON.stringify({ ...JSON.parse(localStorage.getItem("ie:settings") ?? "{}"), view: "column" })));
|
||||
await page.goto(path);
|
||||
await page.waitForFunction(() => (globalThis as any).__ie?.ready);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user