| index 21b8b4e..9baf03f 100644 |
| --- a/internal/slidestest/browser_editor_tidy_test.go |
| +++ b/internal/slidestest/browser_editor_tidy_test.go |
| @@ -118,6 +118,26 @@ func TestTidyNewSlideStaysInView(t *testing.T) { |
| t.Error("forty slides did not make the strip scroll inside itself: nothing above was measured scrolled") |
| } |
| |
| + // One pill: the outer ends round, the two corners where the button |
| + // meets the chevron square. |
| + var corners string |
| + te.rig.Run(chromedp.Evaluate(`(() => { |
| + const r = q => getComputedStyle(document.querySelector(q)) |
| + const add = r('[slides-strip-add] [data-command="new-slide"]'), chev = r('[slides-layouts-toggle]') |
| + const round = v => parseFloat(v) >= 12, square = v => parseFloat(v) === 0 |
| + const out = [] |
| + for (const [name, v, want] of [ |
| + ['New slide top-left', add.borderTopLeftRadius, round], ['New slide bottom-left', add.borderBottomLeftRadius, round], |
| + ['New slide top-right', add.borderTopRightRadius, square], ['New slide bottom-right', add.borderBottomRightRadius, square], |
| + ['chevron top-left', chev.borderTopLeftRadius, square], ['chevron bottom-left', chev.borderBottomLeftRadius, square], |
| + ['chevron top-right', chev.borderTopRightRadius, round], ['chevron bottom-right', chev.borderBottomRightRadius, round], |
| + ]) if (!want(v)) out.push(name + ' is ' + v + ', want ' + (want === round ? 'round (12px or more)' : '0')) |
| + return out.join('; ') |
| + })()`, &corners)) |
| + if corners != "" { |
| + t.Errorf("New slide and its chevron are not one pill: %s", corners) |
| + } |
| + |
| te.rig.Run( |
| chromedp.Click(`[slides-strip-add] [data-command="new-slide"]`, chromedp.ByQuery), |
| waitFor(`document.querySelectorAll('[slides-strip] > [slides-strip-item]').length === 41`), |