-
Notifications
You must be signed in to change notification settings - Fork 155
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
chore: Fixes flakiness in dropdown width test #2883
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2883 +/- ##
========================================
Coverage 96.20% 96.20%
========================================
Files 761 761
Lines 21445 21445
Branches 7340 6943 -397
========================================
Hits 20631 20631
- Misses 761 806 +45
+ Partials 53 8 -45 ☔ View full report in Codecov by Sentry. |
const [loading, setLoading] = useState(asyncLoading); | ||
const onOpen = () => { | ||
if (asyncLoading) { | ||
setLoading(true); | ||
setTimeout(() => setLoading(false), 500); | ||
if (manualServerMock) { | ||
window.__pendingCallbacks.push(() => setLoading(false)); |
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.
wouldn't it be easier to configure a synchronous response or to create an additional page with synchronous data flow instead of introducing these race condition handling?
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.
This page seems quite complex and I think it is likely that copying it would result in a lot of duplicated code. The manualServerMock only replaces the timeout with an explicit command to simplify integ tests and eliminate flakiness.
Description
Removing dependency on test page timeout in dropdown width integ tests.
Similar fix: #2882
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md
.CONTRIBUTING.md
.Security
checkSafeUrl
function.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.