From 7a9f507e2dcb843e9245f84f1d0633ce16f5217a Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Sat, 14 Nov 2026 04:09:20 +1100 Subject: [PATCH] test(e2e): chat-dock-layout uses the v2 stored layout shape (#1964) --- e2e/checks/chat-dock-layout.cjs | 14 +++++++------- e2e/checks/helpers/chat-dock.cjs | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/e2e/checks/chat-dock-layout.cjs b/e2e/checks/chat-dock-layout.cjs index 3707982a5..c98aa9753 100644 --- a/e2e/checks/chat-dock-layout.cjs +++ b/e2e/checks/chat-dock-layout.cjs @@ -1,4 +1,4 @@ -// The saved dock layout: a stored side and width are honoured, widths outside +// The saved dock layout: a stored mode and width are honoured, widths outside // the allowed range are clamped, unreadable JSON falls back to a usable // floating dock that saves again, and visiting phone width never overwrites // the desktop choice. @@ -9,18 +9,18 @@ module.exports = async ({ page, go, shot, tolerate }) => { tolerate(/JSON|SyntaxError/); const dock = h.dockOf(page); - await h.load(page, go, JSON.stringify({ side: 'left', width: 500 })); + await h.load(page, go, JSON.stringify({ mode: 'left', w: 500 })); await h.expand(page); let box = await dock.boundingBox(); - h.near(box.x, 0, 'saved left side'); + h.near(box.x, 0, 'saved left pin'); h.near(box.width, 500, 'saved width'); assert.ok((await h.mainRect(page)).x >= 499, 'page did not reflow beside the restored dock'); - await h.load(page, go, JSON.stringify({ side: 'right', width: -4 })); + await h.load(page, go, JSON.stringify({ mode: 'right', w: -4 })); await h.expand(page); h.near((await dock.boundingBox()).width, 320, 'a negative width clamps to the minimum'); - await h.load(page, go, JSON.stringify({ side: 'right', width: 9999 })); + await h.load(page, go, JSON.stringify({ mode: 'right', w: 9999 })); await h.expand(page); h.near((await dock.boundingBox()).width, 720, 'a huge width clamps to the maximum'); @@ -31,10 +31,10 @@ module.exports = async ({ page, go, shot, tolerate }) => { await h.composerOf(page).fill('still usable'); await h.dragTo(page, 1430); await page.mouse.up(); - await h.until(async () => (await h.saved(page)).side === 'right', 'the dock did not save a layout over the unreadable one'); + await h.until(async () => (await h.saved(page)).mode === 'right', 'the dock did not save a layout over the unreadable one'); await shot('recovered'); - await h.load(page, go, JSON.stringify({ side: 'left', width: 460 })); + await h.load(page, go, JSON.stringify({ mode: 'left', w: 460 })); const layout = await h.stored(page); await page.setViewportSize({ width: 390, height: 844 }); await h.expand(page); diff --git a/e2e/checks/helpers/chat-dock.cjs b/e2e/checks/helpers/chat-dock.cjs index e21b3154a..8575d0b7b 100644 --- a/e2e/checks/helpers/chat-dock.cjs +++ b/e2e/checks/helpers/chat-dock.cjs @@ -2,7 +2,7 @@ // landmarks, and the pointer gestures that pin it. const assert = require('node:assert/strict'); -const KEY = 'archie.chat.dock'; +const KEY = 'archie.chat.dock.v2'; const dockOf = (page) => page.getByRole('complementary', { name: 'Chat with Archie' }); const composerOf = (page) => page.getByRole('combobox', { name: 'Message Archie', exact: true });