Skip to content

Commit 95cb068

Browse files
test(web): sidebar drag test ignores a fading row clone after folder collapse (#35817)
1 parent 36371de commit 95cb068

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/web/src/components/Sidebar.drag.browser.test.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,13 @@ it("keeps the title when dragging a search result from a collapsed folder", asyn
5151
});
5252
const folder = page.getByRole("button", { name: /^render/ });
5353
await expect.element(folder).toHaveAttribute("aria-expanded", "true");
54+
// A removed row fades out as a clone without its test id, so match the live row only.
55+
const secondRow = page.getByTestId("sidebar-row-folder").filter({ hasText: second.title });
56+
await expect.element(secondRow).toBeInTheDocument();
5457
// The shift guard drops pointer presses on a row that appeared under 500ms ago; keys pass.
5558
folder.element().focus();
5659
await userEvent.keyboard("{Enter}");
57-
await expect.element(page.getByText(second.title, { exact: true })).not.toBeInTheDocument();
60+
await expect.element(secondRow).not.toBeInTheDocument();
5861
await userEvent.fill(page.getByRole("combobox", { name: "Search threads" }), "search-target");
5962
const result = page.getByRole("option", { name: /Thread search-target/ });
6063
await expect.element(result).toBeVisible();

0 commit comments

Comments
 (0)