test(e2e): run the net on WebKit and an iPad profile; opt the account out of Home
The Playwright net now runs every flow in three projects: chromium (Desktop Chrome), webkit (Desktop Safari) and ipad (iPad gen 7 landscape: touch, mobile viewport). WebKit catches the engine-level differences every iOS browser inherits; the config and the README say plainly what it does NOT catch: iPad media refusals. Playwright's WebKit decodes through the host OS, and on Windows it played an mp3-in-mp4 and an AV1 mp4 that a real iPad refuses, so media formats are checked on a real iPad against the dev stack over the LAN. global.setup opts the e2e account out of starting on Home (the Startup setting), which the feed, channel and player specs need since E24. It only takes effect with the new-tab boot fix: before it, all twelve of those specs landed on Home in every project. 49/49 green on :8080 across the three projects.
This commit is contained in:
@@ -67,13 +67,17 @@ setup("seed + authenticate", async ({ page }) => {
|
||||
const me = await (await page.request.get("/api/me")).json();
|
||||
expect(me.authenticated, "session not established after login").toBeTruthy();
|
||||
|
||||
// 4. Pin the UI locale and suppress the first-login onboarding wizard (a full-screen overlay
|
||||
// 4. Pin the UI locale, suppress the first-login onboarding wizard (a full-screen overlay
|
||||
// that would intercept every click — the test account has no YouTube connection, so it
|
||||
// auto-opens). The dismissed flag is per-account: `siftlode.onboarding.dismissed.<id>`.
|
||||
// auto-opens), and opt the account out of starting on Home. Since E24 a bare URL lands on
|
||||
// Home, and the feed, channel and player flows this net locks all open "/" expecting the
|
||||
// feed; the opt-out is the one Settings → Appearance → Startup writes. Both flags are
|
||||
// per-account: `siftlode.onboarding.dismissed.<id>`, `siftlode.startOnHome.<id>`.
|
||||
await page.goto("/");
|
||||
await page.evaluate((id: number) => {
|
||||
localStorage.setItem("siftlode.lang", "en");
|
||||
localStorage.setItem(`siftlode.onboarding.dismissed.${id}`, "1");
|
||||
localStorage.setItem(`siftlode.startOnHome.${id}`, "0");
|
||||
}, me.id);
|
||||
mkdirSync(dirname(STORAGE), { recursive: true });
|
||||
await page.context().storageState({ path: STORAGE });
|
||||
|
||||
Reference in New Issue
Block a user