-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Problem
E2E Playwright tests are failing because Dashboard tab buttons lack data-testid attributes. Tests expect to click tabs to navigate to different sections, but cannot locate them.
Current State
Dashboard has 2 tabs (Overview, Context) at web-ui/src/components/Dashboard.tsx:295-320:
- Overview tab (line 295): No data-testid
- Context tab (line 308): No data-testid
Expected Behavior
Tests expect the following data-testid values:
checkpoint-tab- To navigate to checkpoint sectionmetrics-tab- To navigate to metrics section
Issue
Current design has only 2 tabs (Overview/Context), but tests expect separate tabs for each feature section (Checkpoints, Metrics). All feature panels (Checkpoints, Metrics, Quality Gates) are currently stacked on the Overview tab.
Impact
Blocks 11/12 failed E2E tests:
- 8 checkpoint UI tests (
test_checkpoint_ui.spec.ts) - 3 metrics UI tests (
test_metrics_ui.spec.ts)
Solution Options
Option A: Add data-testid to existing tabs (Quick - 5 minutes)
// Line 295
<button
data-testid="overview-tab"
role="tab"
...
>
Overview
</button>
// Line 308
<button
data-testid="context-tab"
role="tab"
...
>
Context
</button>Then update tests to use overview-tab instead of checkpoint-tab and metrics-tab.
Option B: Add separate tabs for features (Recommended - 1-2 hours)
Create dedicated tabs:
- Overview (existing)
- Checkpoints (new - contains CheckpointList)
- Metrics (new - contains CostDashboard)
- Quality Gates (new - contains QualityGatesPanel)
- Context (existing)
Each tab shows only its relevant content.
Recommendation
Option B - Better UX, cleaner navigation, matches test expectations without modifying tests.
Files to Modify
web-ui/src/components/Dashboard.tsx:295-320- Add new tabsweb-ui/src/types/dashboard.ts- UpdateDashboardTabtype- Tests: No changes needed if Option B
Acceptance Criteria
- Dashboard tabs have data-testid attributes
- Tests can locate and click tabs
- Checkpoint panel visible after clicking checkpoint tab
- Metrics panel visible after clicking metrics tab
- All 11 blocked E2E tests pass
Related Files
web-ui/src/components/Dashboard.tsx:53-activeTabstateweb-ui/src/components/Dashboard.tsx:295-320- Tab buttonsweb-ui/src/components/Dashboard.tsx:327-559- Tab panelstests/e2e/test_checkpoint_ui.spec.ts:29- Expectscheckpoint-tabtests/e2e/test_metrics_ui.spec.ts:32- Expectsmetrics-tab