Skip to content

Add e2e tests for the Decodable Reader setup dialog (BL-16607) - #8396

Merged
andrew-polk merged 1 commit into
masterfrom
readerSetupE2eTests
Sep 24, 2026
Merged

andrew-polk merged 1 commit into
masterfrom
readerSetupE2eTests

Conversation

@andrew-polk

@andrew-polk andrew-polk commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Bloom production code changes

Test hooks only, no change in behavior, in src/BloomBrowserUI/bookEdit/toolbox/readers/readerSetup/:

  • SampleWordsTab.tsx: a test id on the typed-words box and on each Sample Texts file row, a data-valid-type attribute on each row, and an id on the "no sample texts yet" message.
  • MatchingWordsPanel.tsx: a test id on each matching-word chip.
  • ReaderDialogPhaseSection.tsx: a test id on the Remove Stage button.

Problem

The React Decodable Reader setup dialog (#8132) shipped with one end-to-end test, a happy-path journey. Its riskiest parts had no automated coverage: the Sample Texts listing and matching-words preview, which cross from the dialog into the toolbox frame; what OK saves and Cancel discards; and living alongside the Leveled Reader's legacy dialog.

What the PR does

Adds seven Playwright spec files (17 tests) that drive the real Bloom:

  • Sample texts: unreadable files are listed with a reason, a capitalised .TXT counts, an empty folder says so, and the matching-words preview gains a word when its letter is taught.
  • Saving: sample words typed one per line are saved as separate words; an empty stage is dropped on save and the rest renumbered.
  • Cancel leaves the saved settings untouched.
  • Stage list: removing the selected stage and dragging a stage to a new position.
  • Coexisting: the legacy Levels dialog and the React Stages dialog each open and close on their own.
  • Notion test cases: 444 (sample words from typed words, the Sample Texts folder, or both, including a non-ASCII word) and 472 (# and * as letters).

Shared steps live in src/BloomE2E/helpers/readerSetup.ts. One limitation is recorded in AUTOMATION-DEBT.md: saving reader settings costs the next test in a file its shell document.

Automates Notion test cases 444 (Sample Words From Sources) and 472 (Non-Alphabetic Letters Allowed).

Intermittent failures: in the first ~15 minutes after a fresh Bloom build, the coexist test failed several times: Set Up Levels was clicked and its dialog never opened. It has passed every run since, and the cause is not known.

Ref: https://issues.bloomlibrary.org/youtrack/issue/BL-16607

🤖 Generated with Claude Code

Devin review


This change is Reviewable

Comment thread src/BloomE2E/tests/reader-setup-dialogs-coexist.spec.ts
@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5.5 from Andrew Polk's machine during preflight]

Consulted Devin up to 0f1a60f3d5. No bugs. One Investigate flag, about the coexist test failing about half the time: thread. It appears to be a real problem in the merged Stages dialog rather than a test fault, so the thread stays open for the developer's decision. CI (pr-automation) passes.

Comment thread src/BloomE2E/tests/decodable-reader-sample-texts.spec.ts
Seven Playwright spec files (17 tests) drive the real Bloom through the
React setup dialog: the Sample Texts listing and matching-words preview,
what OK saves and Cancel discards, dropping an empty stage, removing and
reordering stages, and coexisting with the legacy Levels dialog. They
automate Notion test cases 444 and 472.

Shared steps live in src/BloomE2E/helpers/readerSetup.ts. The only
production change is six test hooks in the dialog's components.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@andrew-polk
andrew-polk marked this pull request as ready for review September 24, 2026 04:38
@andrew-polk
andrew-polk merged commit ec80bd9 into master Sep 24, 2026
1 check passed
@andrew-polk
andrew-polk deleted the readerSetupE2eTests branch September 24, 2026 04:39
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