Skip to content
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: Reduce mobile note screen test flakiness #11145

Conversation

personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented Sep 28, 2024

Summary

This pull request attempts to fix CI failures related to recent changes to mobile tests. These failures seem related to the recent switch to fake timers in screens/Note.test.tsx. This pull request attempts to enable fake timers only for the parts of the tests that relate to performance, while preventing test warnings that were previously resolved by switching to fake timers.

Notes

  • When state changes aren't wrapped in act (or waitFor, or certain react-native-testing-library queries) during testing, react-test-renderer (used by react-native-testing-library) produces a warning. Several added waitFors and acts are intended to prevent warnings related to background state changes.
    • One example of this is the check that the menu component has finished moving focus to itself before continuing — the focus change is caused by a delayed state change.

@personalizedrefrigerator personalizedrefrigerator changed the title Chore: Attempting to fix mobile test CI failures Chore: Reduce mobile test flakiness Sep 28, 2024
@personalizedrefrigerator personalizedrefrigerator changed the title Chore: Reduce mobile test flakiness Chore: Reduce mobile note screen test flakiness Sep 28, 2024
@laurent22 laurent22 merged commit 5fceb5a into laurent22:dev Sep 28, 2024
10 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