mirror of
https://github.com/block/buzz.git
synced 2026-11-10 11:21:05 +00:00
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:
@@ -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();
|
||||
|
||||
@@ -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),
|
||||
);
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user