Automate "Copy Page Preserves Everything" (Test Case ID 348) - #8274
Draft
hatton wants to merge 2 commits into
Draft
Automate "Copy Page Preserves Everything" (Test Case ID 348)#8274hatton wants to merge 2 commits into
hatton wants to merge 2 commits into
Conversation
An e2e test that copies a page through the real page menu and pastes it, first back into its own book and then into a second book in the same Bloom. For each paste it checks the five things the manual case names: the user-defined style class and its rule, the image file, the Talking Book recording file, the video file, and the custom origami layout. The original page is checked first, so the test cannot pass on an empty page. The page under test comes prebuilt from the new page-copy collection in bloom-testing-inputs, because adding an image, a recording, or a video through the UI needs a native dialog or a microphone. Until that collection merges and the pin advances, run with BLOOM_TESTING_INPUTS_DIR pointed at a checkout of it. Two new helpers: pageThumbnails.ts drives the page thumbnail menu, and bookHtml.ts reads a saved book from disk and reports each page's ingredients. Copying between two Bloom instances, the manual case's last step, is not covered: the page clipboard is a field on the one EditingModel, so nothing crosses a process boundary. AUTOMATION-DEBT.md records that, the missing test ids on the page menu items, and a product gap the test exposed: Copy Page and Paste Page silently do nothing while a page is loading, though the menu shows them enabled. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
|
| Filename | Overview |
|---|---|
| src/BloomE2E/helpers/bookHtml.ts | Adds focused parsing and polling helpers for inspecting saved page content and referenced assets. |
| src/BloomE2E/helpers/pageThumbnails.ts | Adds thumbnail-menu automation, but its DOM readiness signal does not guarantee that the C# editing state can accept Copy Page. |
| src/BloomE2E/tests/copy-page.spec.ts | Adds broad copy-preservation coverage, though audio and video identity are not compared with the original page. |
| src/BloomE2E/AUTOMATION-DEBT.md | Documents menu-selector, page-loading, and cross-instance automation limitations. |
Reviews (1): Last reviewed commit: "Automate "Copy Page Preserves Everything..." | Re-trigger Greptile
Comment on lines
+127
to
+141
| await expect | ||
| .poll( | ||
| () => | ||
| page.evaluate(() => { | ||
| const frame = document.querySelector( | ||
| "#page", | ||
| ) as HTMLIFrameElement | null; | ||
| return frame?.contentDocument?.readyState ?? "none"; | ||
| }), | ||
| { | ||
| timeout: timeoutMs, | ||
| message: `The Edit tab never finished loading page ${pageId}.`, | ||
| }, | ||
| ) | ||
| .toBe("complete"); |
Contributor
There was a problem hiding this comment.
When the iframe reaches readyState === "complete" before C# processes pageDomLoaded, this helper returns while EditingModel is still Navigating. The menu reports Copy Page enabled anyway, but SaveThen silently rejects it, leaving the clipboard empty and causing the test to fail during the subsequent paste.
The copy-page e2e test (Test Case ID 348) reads its books from the page-copy collection, which merged into bloom-testing-inputs as aa2e7c2. With the pin at that commit the test runs from output/testing-inputs with no override variable. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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 manual test Copy Page Preserves Everything (Notion Test Case ID 348, the one case in the 6.5 run marked
Plannedfor automation) is run by hand every release. Nothing checks automatically that copying a page keeps its style, image, recording, video, and layout.What this PR does
Adds
src/BloomE2E/tests/copy-page.spec.ts. It copies a page through the real page menu and pastes it, first back into its own book and then into a second book in the same Bloom. For each paste it checks the user-defined style class and its rule, the image file, the Talking Book recording file, the video file, and the custom origami layout. The original page is checked first, so the test cannot pass on an empty page.New helpers:
helpers/pageThumbnails.ts(drives the page thumbnail menu) andhelpers/bookHtml.ts(reads a saved book from disk and reports each page's ingredients).Test inputs
The page comes prebuilt from the new
page-copycollection in bloom-testing-inputs, because adding an image, a recording, or a video through the UI needs a native dialog or a microphone.build/testing-inputs.pinnow points at its merge commit (aa2e7c2), so the test runs fromoutput/testing-inputswith no override variable.Not covered
Copy between two Bloom instances (the manual case's last step). The page clipboard is a field on the one
EditingModel, so nothing crosses a process boundary, and the feature is known not to work in 6.5. The Notion card will be set toPartialwhen this merges.Debt recorded in
AUTOMATION-DEBT.mddata-testid, so the helper matches English labels (aseen againon the existing top-bar entry).Verification
pnpm -C src/BloomE2E test tests/copy-page.spec.tswithBLOOM_TESTING_INPUTS_DIR=D:/bloom-testing-inputs: passed four times in a row on current master with the override variable, and once more against the pinned inputs, about 20 s each.pnpm typecheckinsrc/BloomE2Epasses. No Bloom.exe survives the run.🤖 Generated with Claude Code
Devin review
This change is