Skip to content

Commit 6d16769

Browse files
committed
test(ui): drag-to-unpin targets the sessions surface
The empty Threads section only materializes mid-drag, so Playwright cannot pre-resolve it as a drop target; the sessions container's drop handler owns the unpin and sends {pinned:false} without a category reset.
1 parent 2083d3b commit 6d16769

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎ui/src/e2e/session-management.e2e.test.ts‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,14 +1318,16 @@ describeControlUiE2e("Control UI session management mocked Gateway E2E", () => {
13181318
.toEqual(["Pinned only"]);
13191319
await expect.poll(() => chatsGroup.locator(".sidebar-recent-session").count()).toBe(0);
13201320
await expect.poll(() => page.locator(".sidebar-recent-session--active").count()).toBe(1);
1321-
await pinnedEntry.locator(".sidebar-recent-session").dragTo(chatsGroup);
1321+
// The empty Threads section only materializes once the drag is in
1322+
// flight, so target the whole sessions surface (its drop handler unpins).
1323+
await pinnedEntry
1324+
.locator(".sidebar-recent-session")
1325+
.dragTo(page.locator(".sidebar-sessions"));
13221326
const unpinPatch = await waitForPatch(
13231327
gateway,
1324-
(params) =>
1325-
params.key === "agent:main:pinned" && params.category === null && params.pinned === false,
1328+
(params) => params.key === "agent:main:pinned" && params.pinned === false,
13261329
);
13271330
expect(requireRecord(unpinPatch.params)).toMatchObject({
1328-
category: null,
13291331
key: "agent:main:pinned",
13301332
pinned: false,
13311333
});

0 commit comments

Comments
 (0)