Skip to content

test(e2e): NeuroPage locators reference stale #btn-*-sticky IDs #18

Description

@alikahwaji

Summary

tests/pages/NeuroPage.ts:71-74 still targets #btn-start-sticky, #btn-pause-sticky, #btn-step-sticky, #btn-reset-sticky — none of those IDs exist anywhere in src/ or index.html. The current DOM uses #btn-start, #btn-pause, #btn-step, #btn-reset (no -sticky suffix), as defined in index.html:192-203 and src/utils/UIFactory.ts:105-108.

Effect: every E2E spec that touches startButton / pauseButton / stepButton / resetButton through the page object resolves to an empty locator, the await expect(...).toBeVisible() call hangs for 30s, the retry kicks in, and the e2e job burns its full 15-minute timeout on main. Documented in docs/CICD_AUDIT_REPORT.md (commit 240b143).

This is pre-existing drift from the f1e5c2f controllers refactor, not a regression from the recent CI/CD overhaul (0493999).

Repro

```bash
grep -n "btn-.*-sticky" tests/pages/NeuroPage.ts

tests/pages/NeuroPage.ts:71: this.startButton = page.locator('#btn-start-sticky');

tests/pages/NeuroPage.ts:72: this.pauseButton = page.locator('#btn-pause-sticky');

tests/pages/NeuroPage.ts:73: this.stepButton = page.locator('#btn-step-sticky');

tests/pages/NeuroPage.ts:74: this.resetButton = page.locator('#btn-reset-sticky');

grep -rn "btn-.*-sticky" src/ index.html

(no matches — the sticky variant does not exist)

```

Fix

Update tests/pages/NeuroPage.ts:71-74 to drop the -sticky suffix:

```ts
this.startButton = page.locator('#btn-start');
this.pauseButton = page.locator('#btn-pause');
this.stepButton = page.locator('#btn-step');
this.resetButton = page.locator('#btn-reset');
```

After fixing, audit the rest of NeuroPage.ts and each tests/e2e/*.spec.ts for other drift against the post-f1e5c2f DOM. Known-stable IDs (confirmed via grep): #status-accuracy, #status-loss, #status-val-loss, #status-epoch, #viz-container, .dataset-preview-card, #dataset-select.

Acceptance criteria

  • tests/pages/NeuroPage.ts uses only IDs that exist in index.html / src/
  • npx playwright test runs locally against vite preview and passes or fails on real assertions (not on locator-wait timeouts)
  • The e2e job in CI completes well under its 15m budget on main
  • No regression — the workflow's continue-on-error: true escape hatch for main stays in place until this is proven green

Priority

Medium. Deploy is already unblocked (via deploy: needs: [test, build]), so this is quality-of-signal work, not an outage. Once it lands, continue-on-error can be removed from the e2e job on main.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions