-
Notifications
You must be signed in to change notification settings - Fork 2
Fix flaky input selection in k6 browser tests #395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughThe PR modifies the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #395 +/- ##
=======================================
Coverage 41.11% 41.11%
=======================================
Files 40 40
Lines 2668 2668
=======================================
Hits 1097 1097
Misses 1571 1571 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2126334 to
2f3f0eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@e2e/script.js`:
- Around line 189-193: The waitForSelector call using
page.waitForSelector("input.input", { timeout: 10000 }) can throw on timeout, so
wrap that call in a try-catch (following the pattern used around lines 212-217)
to catch the timeout/error, call check(false, { [`Input exists on ${path}`]: ()
=> false }) or similar to record the failure, and then continue to the next
iteration; ensure the input variable is only used after successful await in the
try block and remove the now-unreachable if (!input) continue; check and logic
from the catch should mirror the existing error handling pattern.
Summary of changes
Changes introduced in this pull request:
waitForSelectorwith a timeout instead ofpage.$()selector to fix flaky k6 browser test.Reference issue to close (if applicable)
Closes #394
Other information and links
Change checklist
adheres to the team's
documentation standards,
(if possible),
should be reflected in this document.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.