mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-09 18:04:55 +00:00
Wait for sidebar label rows before moving a workspace in CI (#9199)
* test(app): wait for sidebar label rows before moving workspace * test(app): identify the rendered label before checking row readiness --------- Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
This commit is contained in:
@@ -110,6 +110,18 @@ function sidebarViews(
|
||||
label: { name: "Unlabelled", color: "red" },
|
||||
assigned: true,
|
||||
});
|
||||
// Wait for the named label folder alongside the built-in unlabelled bucket.
|
||||
// Counts alone can match stale Inbox/Later rows from the preceding move.
|
||||
await expect(
|
||||
slot.getByRole("button", { name: "Toggle Unlabelled", exact: true }),
|
||||
).toHaveCount(2);
|
||||
// Observe both label rows before removing Later so a stale single row
|
||||
// cannot satisfy the final readiness check.
|
||||
const moveWorkspace = slot.getByRole("button", {
|
||||
name: `Move workspace ${workspaceId}`,
|
||||
exact: true,
|
||||
});
|
||||
await expect(moveWorkspace).toHaveCount(2);
|
||||
await client.setWorkspaceLabel({
|
||||
workspaceId,
|
||||
label: { name: "Later", color: "red" },
|
||||
@@ -122,9 +134,9 @@ function sidebarViews(
|
||||
?.labels,
|
||||
)
|
||||
.toEqual(["Unlabelled"]);
|
||||
await slot
|
||||
.getByRole("button", { name: `Move workspace ${workspaceId}`, exact: true })
|
||||
.click();
|
||||
// The daemon reply does not guarantee the browser has applied the removal.
|
||||
await expect(moveWorkspace).toHaveCount(1);
|
||||
await moveWorkspace.click();
|
||||
await slot.getByRole("button", { name: "Move to Inbox", exact: true }).click();
|
||||
await expect
|
||||
.poll(
|
||||
|
||||
Reference in New Issue
Block a user