Add Screenshots to E2E Tests#339
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThis PR establishes an end-to-end documentation screenshot workflow. It introduces a 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Temporarily trigger on every PR push for testing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/sync-docs-screenshots.yml:
- Line 5: The workflow currently triggers on PR events (types: [opened,
synchronize, closed]) which causes the "Find CI run" step to race against an
in-progress CI; change the trigger to use a workflow_run trigger for the CI
workflow (trigger on completed runs) or revert the types to only [closed] as
originally intended, and update the job condition so it only runs when
github.event.workflow_run.conclusion == 'success' (or when github.event.action
== 'closed' if using closed-only). Locate the triggers block and the job with
the "Find CI run" step and update the event types and job condition accordingly
to ensure the job runs only after the CI workflow completes successfully.
- Around line 3-5: Add GitHub Actions concurrency to the workflow that triggers
on pull_request to prevent overlapping runs: add a top-level concurrency block
with a stable group (e.g., use github.head_ref or github.ref and github.workflow
to uniquely identify the PR/run) and set cancel-in-progress: true so a new run
cancels any in-flight run for the same PR; update the workflow that contains the
"on: pull_request" trigger and ensure the concurrency group name is
deterministic (for example referencing github.head_ref) to avoid simultaneous
pushes to the same static-site branch.
In `@test/helpers/screenshot.ts`:
- Around line 8-14: The waitForFunction callback can hang when an animation's
timing or timing.iterations is undefined; update the predicate inside
page.waitForFunction (which iterates document.getAnimations()) to explicitly
guard that timing is defined and iterations is a finite number before treating
the animation as a blocking running animation — e.g., use the KeyframeEffect
timing only when (a.effect as KeyframeEffect | null)?.getTiming() returns an
object and timing.iterations is not undefined and not Infinity (or use
Number.isFinite(timing.iterations)); if timing or iterations is absent, treat
that animation as non-blocking so the wait can complete.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 376688f6-fb44-4664-8318-00e5ca94c76c
📒 Files selected for processing (7)
.github/workflows/ci.yml.github/workflows/sync-docs-screenshots.yml.gitignoreplaywright.config.tssrc/components/ToastProvider/ToastProvider.tsxtest/helpers/screenshot.tstest/tournament-pairings.spec.ts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary by CodeRabbit
Chores
Tests