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:
thalladaandClaude Opus 5.5 committed 2026-11-16 16:31:21 -05:00
1 parent f8d663ebc1
commit 5f6ea8e5c9
13 files changed
+53 -19

No files matched your search

+11
View File
@@ -18,6 +18,17 @@ export interface Sample {
/** Run a function on the page's store and return what it returns. */
export const state = <T>(page: Page, fn: (s: any) => T): Promise<T> => page.evaluate(`(${fn})(globalThis.__ie)`) as Promise<T>;
/**
* Let this page's layout follow the window, as a reader's does (`/view auto`), from its first load:
* the tests start in the column (playwright.config.ts). Later loads keep what the page has set.
*/
export const autoLayout = (page: Page) =>
page.addInitScript(() => {
if (sessionStorage.getItem("e2e:auto")) return;
sessionStorage.setItem("e2e:auto", "1");
localStorage.removeItem("ie:settings");
});
/** Press space-separated keys, in order. */
export const keys = async (page: Page, seq: string) => {
for (const k of seq.split(" ")) await page.keyboard.press(k);