Skip to content

Commit 5654f03

Browse files
committed
Relax resumed session status assertion
1 parent 16535f6 commit 5654f03

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

tests/e2e/transport.spec.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -764,9 +764,17 @@ test.describe('workspace transport baseline', () => {
764764
await page.reload();
765765
await expect(page.getByTestId('workspace-topbar')).toBeVisible();
766766
await waitForBackendSocket(page);
767-
await expect.poll(async () =>
768-
page.locator(`.agent-pane-card[data-session-id="${session.id}"]`).first().getAttribute('data-session-status')
769-
).toBe('running');
767+
let resumedStatus: string | null = null;
768+
await expect.poll(async () => {
769+
resumedStatus = await page
770+
.locator(`.agent-pane-card[data-session-id="${session.id}"]`)
771+
.first()
772+
.getAttribute('data-session-status');
773+
return resumedStatus === 'running' || resumedStatus === 'background';
774+
}, {
775+
timeout: 5000,
776+
message: `resumed session status after reload: ${resumedStatus ?? 'null'}`,
777+
}).toBe(true);
770778
} finally {
771779
await context.close();
772780
}

0 commit comments

Comments
 (0)