Skip to content

test(configurator): require ≥3 distinct widths in layout preview assertion - #376

Merged
jackgranatowski merged 1 commit into
mainfrom
claude/strengthen-layout-preview-assertion
Jun 22, 2026
Merged

test(configurator): require ≥3 distinct widths in layout preview assertion#376
jackgranatowski merged 1 commit into
mainfrom
claude/strengthen-layout-preview-assertion

Conversation

@jackgranatowski

@jackgranatowski jackgranatowski commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

What

Strengthens one assertion in the Layout-preview e2e test
(configurator/tests-e2e/domain-preview.spec.js):

-expect(new Set(widths.map((w) => Math.round(w))).size, 'widths are not all identical').toBeGreaterThan(1);
+expect(new Set(widths.map((w) => Math.round(w))).size, 'most widths are distinct').toBeGreaterThanOrEqual(3);

Why

The four container tokens (narrow/prose/default/wide) are genuinely different sizes, so after proportional scaling we expect ≥3 distinct rounded widths. Requiring ≥3 is 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).
  • Test-only change; no version bump (npm run check:version unaffected).

🤖 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.

Review in cubic

…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
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jackgranatowski, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5e73ed6f-61f4-4a97-b17c-6edb7862b3a0

📥 Commits

Reviewing files that changed from the base of the PR and between 49b90b4 and 1f32cf9.

📒 Files selected for processing (1)
  • configurator/tests-e2e/domain-preview.spec.js
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/strengthen-layout-preview-assertion

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jackgranatowski
jackgranatowski merged commit 937c56b into main Jun 22, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants