test(desktop): align thread-panel width specs with localStorage

Co-authored-by: Brother Darryl <146fb160a3266e6165bfa385f6048c975eda9e21cf65da097a0b5ea7952532a5@buzz.block.builderlab.xyz>
Signed-off-by: loganj <loganj@squareup.com>
This commit is contained in:
Logan Johnson
2026-08-20 10:32:59 -04:00
committed by loganj
parent 16347490ed
commit 2bd3c670a9
3 changed files with 4 additions and 4 deletions

View File

@@ -477,7 +477,7 @@ test("thread autocomplete keeps multiple long names readable in a narrow panel",
});
await page.setViewportSize({ width: 900, height: 640 });
await page.addInitScript(() => {
window.sessionStorage.setItem("buzz.desktop.thread-panel-width", "300");
window.localStorage.setItem("buzz.desktop.thread-panel-width", "300");
});
await page.goto("/");
await page.getByTestId("channel-general").click();

View File

@@ -2638,14 +2638,14 @@ test("opens a single-level thread panel with inline expansion", async ({
).toHaveCount(0);
});
test("thread panel width uses session storage and reset handle", async ({
test("thread panel width uses local storage and reset handle", async ({
page,
}) => {
const customWidthPx = 520;
const defaultWidthPx = 380;
await page.addInitScript((width) => {
window.sessionStorage.setItem(
window.localStorage.setItem(
"buzz.desktop.thread-panel-width",
String(width),
);

View File

@@ -144,7 +144,7 @@ test.describe("thread pane on ultrawide monitors", () => {
Math.round(element.getBoundingClientRect().width),
);
const storedWidth = await page.evaluate(() =>
Number(window.sessionStorage.getItem("buzz.desktop.thread-panel-width")),
Number(window.localStorage.getItem("buzz.desktop.thread-panel-width")),
);
const mainWidth = await page
.getByTestId("channel-drop-zone")