mirror of
https://github.com/block/buzz.git
synced 2026-10-30 22:11:36 +00:00
test(desktop): align routed root navigation assertions
Co-authored-by: Rivet <a08d9a8418c7ff03afe19964724c8fd87bf1776ab9e9b9cafb8cc920edd02a6e@buzz.block.builderlab.xyz> Signed-off-by: Rivet <a08d9a8418c7ff03afe19964724c8fd87bf1776ab9e9b9cafb8cc920edd02a6e@buzz.block.builderlab.xyz>
This commit is contained in:
@@ -3668,12 +3668,8 @@ test("a refused message deep link retries after the thread edit is canceled", as
|
||||
const routedDestination = page
|
||||
.getByTestId("message-timeline")
|
||||
.locator(`[data-message-id="${destinationId}"]`);
|
||||
await expect(threadPanel).toBeVisible();
|
||||
await expect(threadPanel.getByTestId("message-thread-head")).toContainText(
|
||||
destinationRoot,
|
||||
);
|
||||
await expect(threadPanel).not.toBeVisible();
|
||||
await expect(routedDestination).toBeVisible();
|
||||
await expect(routedDestination).toHaveClass(/route-target-highlight-fade/);
|
||||
});
|
||||
|
||||
test("a refused sent-from-thread link preserves the edit and retries after cancel", async ({
|
||||
@@ -3828,10 +3824,12 @@ test("a refused search result preserves the edit and retries after cancel", asyn
|
||||
await page.getByTestId("search-dialog-input").fill(destinationRoot);
|
||||
await destinationResult.click();
|
||||
await expect(page).not.toHaveURL(threadUrl);
|
||||
await expect(threadPanel.getByTestId("message-thread-head")).toContainText(
|
||||
destinationRoot,
|
||||
const routedDestination = timeline.locator(
|
||||
`[data-message-id="${destinationRootId}"]`,
|
||||
);
|
||||
await expect(page).toHaveURL(new RegExp(`thread=${destinationRootId}`));
|
||||
await expect(threadPanel).not.toBeVisible();
|
||||
await expect(routedDestination).toBeVisible();
|
||||
await expect(routedDestination).toHaveClass(/route-target-highlight-fade/);
|
||||
});
|
||||
|
||||
test("a refused forum search result preserves the edit and retries after cancel", async ({
|
||||
|
||||
@@ -791,7 +791,7 @@ test("message links to visible root messages highlight them in the main timeline
|
||||
await expect(randomChannelLink).toHaveCSS("display", "inline");
|
||||
await expect(
|
||||
randomChannelLink.locator(".inline-chip-leading-fragment"),
|
||||
).toHaveText("r");
|
||||
).toHaveText("rando");
|
||||
await expect(randomChannelLink).not.toHaveAttribute("title");
|
||||
await randomChannelLink.hover();
|
||||
const channelTooltip = page.getByRole("tooltip");
|
||||
|
||||
Reference in New Issue
Block a user