Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/e2e/test_checkpoint_ui.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ test.describe('Checkpoint UI Workflow', () => {
const checkpointItems = page.locator('[data-testid^="checkpoint-item-"]');
const emptyState = page.locator('[data-testid="checkpoint-empty-state"]');

// Wait for either checkpoint items OR empty state to be visible (prevents race condition)
await expect(checkpointItems.first().or(emptyState)).toBeVisible({ timeout: TIMEOUTS.DOM_UPDATE });

const count = await checkpointItems.count();

if (count > 0) {
Expand Down Expand Up @@ -310,6 +313,9 @@ test.describe('Checkpoint UI Workflow', () => {
const checkpointItems = page.locator('[data-testid^="checkpoint-item-"]');
const emptyState = page.locator('[data-testid="checkpoint-empty-state"]');

// Wait for either checkpoint items OR empty state to be visible (prevents race condition)
await expect(checkpointItems.first().or(emptyState)).toBeVisible({ timeout: TIMEOUTS.DOM_UPDATE });

const count = await checkpointItems.count();

if (count > 0) {
Expand Down Expand Up @@ -352,6 +358,9 @@ test.describe('Checkpoint UI Workflow', () => {
const checkpointItems = page.locator('[data-testid^="checkpoint-item-"]');
const emptyState = page.locator('[data-testid="checkpoint-empty-state"]');

// Wait for either checkpoint items OR empty state to be visible (prevents race condition)
await expect(checkpointItems.first().or(emptyState)).toBeVisible({ timeout: TIMEOUTS.DOM_UPDATE });

const count = await checkpointItems.count();

if (count > 0) {
Expand Down Expand Up @@ -379,6 +388,9 @@ test.describe('Checkpoint UI Workflow', () => {
const checkpointItems = page.locator('[data-testid^="checkpoint-item-"]');
const emptyState = page.locator('[data-testid="checkpoint-empty-state"]');

// Wait for either checkpoint items OR empty state to be visible (prevents race condition)
await expect(checkpointItems.first().or(emptyState)).toBeVisible({ timeout: TIMEOUTS.DOM_UPDATE });

const count = await checkpointItems.count();

if (count > 0) {
Expand Down
Loading