You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The waitForNextUpdate hook in Testing Library is deprecated and will be removed in future versions. To ensure our tests remain compatible with upcoming versions and avoid potential failures, we need to replace instances of waitForNextUpdate with waitFor. This update will improve the maintainability and future-proofing of our test suite.
Fixing those will also help with the #195087, where some tests are falling due to the missing await.
Definition of done
Identify all instances where waitForNextUpdate is used in the cloud_security_posture plugin's test code.
- [ ] Identify all instances where waitForNextUpdate is used in the Agentless scope of fleet plugin's test code.
Replace waitForNextUpdate with waitFor in each identified instance, ensuring that the tests still perform as expected.
Validate that the updated tests pass and behave consistently with the original waitForNextUpdate implementation.
Document any changes made and include notes on the new waitFor approach, if necessary.
Submit a PR with these updates and notify relevant team members for review and feedback.
Out of scope
Refactoring of unrelated tests or additional enhancements beyond updating waitForNextUpdate.
Tests that are outside of the cloud_security_posture plugin or the Agentelss scope in the fleet plugin
opauloh
changed the title
Update Deprecated waitForNextUpdate Hook to waitFor in Testing Library
[Cloud Security] Update Deprecated waitForNextUpdate Hook to waitFor
Oct 31, 2024
opauloh
changed the title
[Cloud Security] Update Deprecated waitForNextUpdate Hook to waitFor
Update Deprecated waitForNextUpdate Hook to waitFor
Oct 31, 2024
Motivation
The
waitForNextUpdate
hook in Testing Library is deprecated and will be removed in future versions. To ensure our tests remain compatible with upcoming versions and avoid potential failures, we need to replace instances ofwaitForNextUpdate
withwaitFor
. This update will improve the maintainability and future-proofing of our test suite.Fixing those will also help with the #195087, where some tests are falling due to the missing await.
Definition of done
waitForNextUpdate
is used in thecloud_security_posture
plugin's test code.waitForNextUpdate
is used in the Agentless scope offleet
plugin's test code.waitForNextUpdate
withwaitFor
in each identified instance, ensuring that the tests still perform as expected.waitForNextUpdate
implementation.waitFor
approach, if necessary.Out of scope
waitForNextUpdate
.cloud_security_posture
plugin or the Agentelss scope in thefleet
pluginRelated tasks/epics
The text was updated successfully, but these errors were encountered: