Skip to content

test(editor): repair baseline tab selector so dirty/recovery scenarios run (Refs #1377)#1521

Merged
oscharko merged 2 commits into
feat/keiko-agent-native-editor-foundation-and-runtimefrom
claude/issue-1377-editor-baseline-followup
Jun 25, 2026
Merged

test(editor): repair baseline tab selector so dirty/recovery scenarios run (Refs #1377)#1521
oscharko merged 2 commits into
feat/keiko-agent-native-editor-foundation-and-runtimefrom
claude/issue-1377-editor-baseline-followup

Conversation

@oscharko

Copy link
Copy Markdown
Contributor

Summary

Follow-up to the merged #1519 that lands two test-only commits the squash-merge raced past. PR #1519 was squash-merged from its first commit (d62cb464) before the post-open hardening commits synchronized, so the editor baseline matrix shipped on the feat branch with a tab selector that does not match the real DOM.

Refs #1377 (Parent Epic #1491)

Problem

tests/e2e/support/editorWorkspace.ts defined tab: ".ed-tab[role='tab']", but in the editor DOM the outer span.ed-tab carries data-dirty/active while role='tab' and data-tip/aria-selected live on the inner button.ed-tab-hit. As merged, three baseline scenarios that read the dirty state through that selector fail to find any element:

  • e. dirty buffer marked in tab + status bar
  • f. dirty-close guard dialog
  • g. hot-exit recovery after reload

These are exactly the dirty-close and recovery behaviors named in Issue #1377 AC2, so the gate must be repaired for the acceptance criterion to hold.

Changes (test-infrastructure only)

  • tests/e2e/support/editorWorkspace.ts: tab selector → .ed-tab (the dirty/active-bearing span; role='tab' is on the .ed-tab-hit it wraps).
  • tests/e2e/editor-baseline-1377.spec.ts: tabFor locates the dirty span via .ed-tab:has(.ed-tab-hit[data-tip=...]); adds an explicit dirty-close-dialog aria-labelledby assertion (adversarial a11y-review note); corrects the scenario-j comment — Alt+ArrowRight reorders the active tab rather than switching selection.

No product code, no CI workflow, no dependency, and no other spec is changed.

Verification

npm run test:e2e:editor-baseline-1377   -> 10/10 passed against the real packaged app (rebuilt on current feat HEAD)
npx eslint <spec> <helper>              -> PASS
npx prettier --check <spec> <helper>    -> PASS

The matrix now passes all ten scenarios, including e/f/g, on the current feat base (which also carries the #1520 release-smoke fix).

🤖 Generated with Claude Code

oscharko and others added 2 commits June 25, 2026 21:52
…x (Refs #1377)

The outer `.ed-tab` span carries `data-dirty`/`active`; `role='tab'` and the
`data-tip`/`aria-selected` affordances live on the inner `.ed-tab-hit` button.
Locate the dirty/active state via `.ed-tab:has(.ed-tab-hit[data-tip=...])` so
scenarios e/f/g read the correct element. Full suite now green (10/10) against
the real packaged app.

Refs #1377

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…r note (Refs #1377)

Address adversarial accessibility-review notes on the baseline matrix: assert
the dirty-close modal labels itself via aria-labelledby (heading association),
and correct the scenario-j comment — Alt+ArrowRight reorders the active tab
within the tablist rather than switching selection. Suite remains green (10/10).

Refs #1377

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@oscharko oscharko merged commit 27eff2c into feat/keiko-agent-native-editor-foundation-and-runtime Jun 25, 2026
12 checks passed
@oscharko oscharko deleted the claude/issue-1377-editor-baseline-followup branch June 25, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant