Test: the tidy card tests that need the phone group run in Both view
The On a phone group is drawn in the phone views alone, so TestTidyCardFollowsSelection and TestTidyCardFloats switch to Both view (te.view) before selecting a box; the floats test returns to Desktop for the re-centring check.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 file changed,
+7
−0
internal/slidestest/browser_editor_tidy_test.go+7 −0
diff --git a/internal/slidestest/browser_editor_tidy_test.go b/internal/slidestest/browser_editor_tidy_test.go| index 7e770de..f5989b8 100644 |
| --- a/internal/slidestest/browser_editor_tidy_test.go |
| +++ b/internal/slidestest/browser_editor_tidy_test.go |
| @@ -897,7 +897,10 @@ func TestTidyCardFloats(t *testing.T) { |
| // shape's, the longest a box has) in a short window: the card |
| // scrolls inside itself, and the page does not. |
| canvas := te.addCanvasShape(t) |
| + // Its On a phone group is part of what makes it tall, and only the |
| + // phone views draw it (Q6): the test is in Both view. |
| te.openOn(canvas) |
| + te.view("both") |
| te.selectBox("shape") |
| te.size(1280, 480) |
| c = te.card() |
| @@ -915,6 +918,7 @@ func TestTidyCardFloats(t *testing.T) { |
| te.rig.Screen(`[slides-editor]`, "1280x480, a shape selected, the card scrolled") |
| te.size(1280, 720) |
| te.rig.Run(chromedp.Evaluate(`document.querySelector('[slides-inspector]').scrollTop = 0`, nil)) |
| + te.view("desktop") // the one stage that re-centres alone |
| // Format hides it: the frame re-centres in the desk (the strip's |
| // edge to the desk's end), and the cookie says closed. |
| @@ -1225,6 +1229,9 @@ func TestTidyCardFollowsSelection(t *testing.T) { |
| te.inspect().onSlideOptions(t, "opening the editor") |
| te.openOn(slide) |
| te.inspect().onSlideOptions(t, "opening the canvas slide") |
| + // The On a phone group is in the card in the phone views alone (Q6), |
| + // and each kind's want list holds it: the test is in Both view. |
| + te.view("both") |
| var kinds []string |
| te.rig.Run(chromedp.Evaluate(`[...document.querySelectorAll('[slides-menu="insert"] [data-insert-block]')].map(b => b.dataset.insertBlock)`, &kinds)) |