test(configurator): require ≥3 distinct widths in layout preview assertion - #376
Conversation
…rtion Strengthen the Layout-preview distinctness check from "not all identical" (>1) to "most widths distinct" (≥3). The four container tokens (narrow/prose/default/wide) are genuinely different sizes, so this is a safe, stronger guard against the clamp-to-100% regression the test exists to catch. Addresses a post-merge CodeRabbit nitpick on #374. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fg7U9rTiqBgbsPuz9kdWea
|
Warning Review limit reached
More reviews will be available in 45 minutes and 32 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
Strengthens one assertion in the Layout-preview e2e test
(
configurator/tests-e2e/domain-preview.spec.js):Why
The four container tokens (narrow/prose/default/wide) are genuinely different sizes, so after proportional scaling we expect ≥3 distinct rounded widths. Requiring
≥3is a stronger guard against the clamp-to-100% regression this test exists to catch than merely "not all identical" (>1).Addresses the lone post-merge CodeRabbit nitpick on #374 (rated trivial/optional there; landing it as a tiny standalone follow-up).
Verification
cd configurator && npm run test:e2e -- domain-preview— Layout test stays green (widths are distinct by design).npm run check:versionunaffected).🤖 Generated with Claude Code
Generated by Claude Code
Summary by cubic
Strengthen the Layout preview e2e test by requiring at least 3 distinct rounded widths among the four containers, replacing the old “>1” check. This better detects the clamp-to-100% regression while matching that narrow/prose/default/wide are truly different sizes.
Written for commit 1f32cf9. Summary will update on new commits.