Pin the toolbox's behavior with e2e tests before its rewrite (Notion test cases 436, 441, 442, 460, 517) - #8397
Merged
Merged
Conversation
Characterization tests for the toolbox infrastructure rewrite: they pass on master today, so the rewrite has to keep them passing. - toolbox-sections: turning tools on and off under "More..." (the real check box), section order, clicking the open tool's header, and the book remembering which tool was open. No manual card covered these. - reader-tool-stage-and-level: each book keeps its own stage and level; a new book starts on the stage or level last chosen, not the one last seen (Notion test cases 441, 442, 460). - decodable-reader-template: a book from the Decodable Reader template opens on that tool, on stage 1 (Notion test case 436). - talking-book-paste: pasting a marked sentence with Talking Book open does not nest its markers (Notion test case 517, BL-10291). Bloom production code: test ids on the reader tools' stage/level stepper and on the "More..." check box rows. Helper fix: makeBookFromTemplate now starts from the Collections tab, as a person does. Making a book while the Edit tab showed one with a reader tool on left the Edit tab showing the template, so a test's second book hung. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Also make the remembered-tool test check, before opening the Leveled Reader, that the book would not have opened it anyway; the old check ran after opening it and could not fail. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Devin pointed out that reopening the same book could pass on an in-memory setting alone. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
andrew-polk
commented
Sep 24, 2026
andrew-polk
commented
Sep 24, 2026
Contributor
Author
Contributor
Author
|
[Claude Opus 5.5 following a prompt from Andrew] Consulted Devin on 2026-09-23 up to commit 3d79d48: no bugs; it marks the open-tool persistence flag resolved; the reader-restore flag is carried over unchanged (answered on its thread); no informational items. |
andrew-polk
commented
Sep 24, 2026
andrew-polk
left a comment
Contributor
Author
There was a problem hiding this comment.
@andrew-polk reviewed 11 files and all commit messages, and resolved 2 discussions.
Reviewable status: 0 of 11 files reviewed, all discussions resolved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The toolbox infrastructure is being rewritten (BL-16608: the jQuery accordion, the hidden legacy toolbox, and the state and lifecycle code all change), but the toolbox's user-visible behavior had almost no automated coverage: no manual card even described turning tools on and off (there is one now: test case 830), and nothing automated checked that a book remembers its reader stage or level.
What the PR does
Adds characterization tests, run against the real Bloom.exe, that pass on master today, so the rewrite has to keep them passing:
toolbox-sections.spec.ts): turning a tool on through the real "More..." check box adds its section in order and opens it; turning it off removes it; clicking the open tool's header leaves it open; a book reopens on the tool it was left on.reader-tool-stage-and-level.spec.ts): each book keeps its own decodable stage and leveled level; a new book starts on the stage or level last chosen, not the one last looked at.decodable-reader-template.spec.ts).talking-book-paste.spec.ts, BL-10291).New helpers cover the reader tools' stage/level stepper (
readerTools.ts) and turning tools on and off (toolbox.ts). The sharedmakeBookFromTemplatenow starts from the Collections tab, as a person does: making a second book while the Edit tab showed one with a reader tool on left the Edit tab on the template, so the test hung.Bloom production code changes
Two
data-testids, no behavior change: on the reader tools' stage/level stepper (with the numbers as data attributes, since the visible text is localized) inReaderToolNav.tsx, and on each "More..." check box row inSettingsToolControls.tsx.Automates Notion test case 436 (New Decodable Book Stage): https://app.notion.com/p/New-Decodable-Book-Stage-3904bb19df1281d58e8ec7ccec967169
Automates Notion test case 441 (New Book Inherits Stage [Automated portion]): https://app.notion.com/p/New-Book-Inherits-Stage-3904bb19df1281c5afd2d91537be1be0 (its BloomPack step, which needs a BloomPack template, moved to manual test case 829: https://app.notion.com/p/New-Book-Inherits-Stage-Manual-portion-3e54bb19df128122ae48dd9ae00b39bb)
Automates Notion test case 442 (Book Remembers Its Stage): https://app.notion.com/p/Book-Remembers-Its-Stage-3904bb19df128169a8a4c33807dbed76
Automates Notion test case 460 (New Book Inherits Level): https://app.notion.com/p/New-Book-Inherits-Level-3904bb19df128157a03cc91627fd1e9a
Automates Notion test case 517 (Pasting With the Tool Open Doesn't Corrupt Audio Markup): https://app.notion.com/p/Pasting-With-the-Tool-Open-Doesn-t-Corrupt-Audio-Markup-3904bb19df1281a597d0d16f9e574812
Automates Notion test case 830 (Toolbox: turning tools on and off, and which tool is open): https://app.notion.com/p/Toolbox-turning-tools-on-and-off-and-which-tool-is-open-3e54bb19df128178873ce6cdb32cf20e
Ref: https://issues.bloomlibrary.org/youtrack/issue/BL-16608
🤖 Generated with Claude Code
Devin review
This change is