test(desktop): separate markdown history coverage

Signed-off-by: Sol <478bb5a31222ea2b28a3d1afb8b1d598940628f19c2a87efc3c4b822299eeec6@buzz.block.builderlab.xyz>
This commit is contained in:
Sol
2026-09-09 10:14:45 -07:00
parent 812087523f
commit 66b2e9a456

View File

@@ -215,6 +215,21 @@ test("close restores focus to the invoking card when the document appears twice"
await expect(docCards.nth(0)).not.toBeFocused();
});
test("channel rehydration keeps the viewer action", async ({ page }) => {
await sendMarkdownAttachment(page);
// Remount the channel while relay-origin discovery catches up. The known
// markdown attachment must not temporarily downgrade to Download.
await page.getByTestId("channel-random").click();
await expect(page.getByTestId("chat-title")).toHaveText("random");
await page.getByTestId("channel-general").click();
await expect(page.getByTestId("chat-title")).toHaveText("general");
await expect(page.getByTestId("file-card").last()).toHaveAttribute(
"aria-label",
"Open release-notes.md",
);
});
test("open document survives reload and back/forward navigation", async ({
page,
}) => {
@@ -237,12 +252,6 @@ test("open document survives reload and back/forward navigation", async ({
// restores it — the advertised back/forward contract.
await page.goBack();
await expect(page.getByTestId("markdown-doc-panel")).toHaveCount(0);
// Rehydrating the channel must not downgrade a known markdown attachment to
// Download while relay-origin discovery catches up.
await expect(page.getByTestId("file-card").last()).toHaveAttribute(
"aria-label",
"Open release-notes.md",
);
await page.goForward();
await expect(
panel().getByRole("heading", { name: "Release Notes" }),