Skip to content

test: fix test flakiness - #2760

Merged
serhalp merged 3 commits into
npmx-dev:mainfrom
gameroman:fix-test-flakiness
May 17, 2026
Merged

test: fix test flakiness#2760
serhalp merged 3 commits into
npmx-dev:mainfrom
gameroman:fix-test-flakiness

Conversation

@gameroman

Copy link
Copy Markdown
Member

🔗 Linked issue

🧭 Context

📚 Description

@vercel

vercelBot commented May 17, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
npmx.devReadyReadyPreview, CommentMay 17, 2026 1:20pm
2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devIgnoredIgnoredPreviewMay 17, 2026 1:20pm
npmx-lunariaIgnoredIgnoredMay 17, 2026 1:20pm

Request Review

@coderabbitai

coderabbitaiBot commented May 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e07035d2-188a-4d9b-a58a-40b7cac19056

📥 Commits

Reviewing files that changed from the base of the PR and between dfa8658 and 30006e1.

📒 Files selected for processing (1)
  • test/e2e/interactions.spec.ts

📝 Walkthrough

Summary by CodeRabbit

  • Tests
    • Enhanced copy button visibility validation in end-to-end testing.

Walkthrough

The E2E test for copy-button occlusion is updated to improve reliability: the visibility timeout is extended, the button is explicitly hovered before validation, and a configurable OFFSET constant replaces the hardcoded offset when sampling corner and centre points to verify the copy button remains the topmost element.

Changes

Copy Button Occlusion Testing

Layer / File(s)Summary
Improved occlusion detection with configurable offset sampling
test/e2e/interactions.spec.ts
The "CopyToClipboardButton is fully unoccluded" test now waits longer for visibility, adds an explicit hover action, introduces an OFFSET = 3 constant, and reconfigures the five-point sampling coordinates (four corners and centre) to use the offset for corner checks instead of a hardcoded value of 1.
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Description check⚠️ WarningThe PR description is empty, containing only an unfilled template with no actual context, rationale, or explanation of the changes made to address test flakiness.Provide a meaningful description explaining why the test was flaky, what specific issues were causing failures, and how the changes (wait logic, hover action, configurable offset) resolve the problem.
✅ Passed checks (3 passed)
Check nameStatusExplanation
Title check✅ PassedThe title 'test: fix test flakiness' directly relates to the changeset, which updates a test to address flakiness through improved occlusion checking and wait mechanisms.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@codecov

codecovBot commented May 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@serhalp
serhalp added this pull request to the merge queueMay 17, 2026
Merged via the queue into npmx-dev:main with commit fe95911May 17, 2026
33 checks passed
@github-actionsgithub-actionsBot mentioned this pull request May 17, 2026
@gameroman
gameroman deleted the fix-test-flakiness branch May 17, 2026 19:06
ayo-run pushed a commit to ayo-run/npmx.dev that referenced this pull request Aug 5, 2026
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Sign up for freeto 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

@gameroman@serhalp