chore: fix flaky debug progress test #28958
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Additional details
We have a debug test that is testing a progress bar. This test is not actually written in a way where we are manually polling the progress bar, then asserting. It just has an interval that ticks the progress bar. Sometimes the tests wouldn't make it to the first 1/3 tests assertions until the progress bar had already gone to 2/3, causing this test to be flaky.
In this PR, I've increased the polling interval from 1 sec to 1.5 sec. I've also rearranged some of the tests and assertions to get to the 1/3 assertion more quickly. I also reduced the number of specs we're looking for from 5 to 3, otherwise we're waiting an extra 3 seconds for the progress bar to finish on things we're not even asserting on. This solution could probably be better, but hopefully this fixes most of the issues.
Failing case
![Screenshot 2024-02-16 at 9 26 19 AM](https://private-user-images.githubusercontent.com/1271364/305460868-53f0bc86-07bd-4264-9fb6-bc137e1c54cb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxODcwMzUsIm5iZiI6MTcyMDE4NjczNSwicGF0aCI6Ii8xMjcxMzY0LzMwNTQ2MDg2OC01M2YwYmM4Ni0wN2JkLTQyNjQtOWZiNi1iYzEzN2UxYzU0Y2IucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDVUMTMzODU1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTMwZjZiYzMwOTkwNDI1NTMxMmZiMDc3ZDU2YmZmOTBkZDhjNjdmZDY5NWY5NjhkNzA1MzEwODNjNDZlNzlmYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.zqfWZzJhZoiQNaEcH5B5sPfvljHD-N-g3-Y11ATtJ1A)
Passing case
![Screenshot 2024-02-16 at 9 26 12 AM](https://private-user-images.githubusercontent.com/1271364/305460981-a264219b-084d-4741-bd03-839d71208a38.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxODcwMzUsIm5iZiI6MTcyMDE4NjczNSwicGF0aCI6Ii8xMjcxMzY0LzMwNTQ2MDk4MS1hMjY0MjE5Yi0wODRkLTQ3NDEtYmQwMy04MzlkNzEyMDhhMzgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDVUMTMzODU1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjA5ODk3MjAwMWZlYWE1NTVmNGQxNDhkODYxZDNhOWMzZTAxNDBkMzE1ODdlMThlNjdiM2E1MTNkODY2NDA5YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.H1blgAzDftkX4A6amX0q-ibQTOJlwpLlMIqmpeBMYp8)
Steps to test
Run the debug.cy.ts test locally.
How has the user experience changed?
N/A