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
Contributor

🔗 Linked issue

🧭 Context

📚 Description

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 17, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment May 17, 2026 1:20pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview May 17, 2026 1:20pm
npmx-lunaria Ignored Ignored May 17, 2026 1:20pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

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 name Status Explanation Resolution
Description check ⚠️ Warning The 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 name Status Explanation
Title check ✅ Passed The 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 ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check 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
Copy link
Copy Markdown

codecov Bot commented May 17, 2026

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 queue May 17, 2026
Merged via the queue into npmx-dev:main with commit fe95911 May 17, 2026
33 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