Speculative fix for hour_of_code_starwars flaky test - #51278
Merged
Conversation
molly-moen
marked this pull request as ready for review
April 12, 2023 22:38
breville
approved these changes
Apr 12, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
iPhone_hour_code_code_starwars has been flaky. I was able to find two failure cases--one where the page was not reloading as expected (saucelabs link) and one where it seemed like we weren't switching droplet to text mode (saucelabs link). I think what was actually happening in that case was the page was finally loading while or after we tried to switch modes, so the mode switch didn't take.
When the page didn't reload, we were stuck on the continue modal from the previous page, and therefore could not find the run button to run. I think this is happening because we are checking for the reloaded page before the page has had a chance to refresh the screen, so we see the previous level, which looks to us like a loaded page. To avoid this issue I added a check to wait until the page is loaded. Brendan saw a similar problem in a different test and fixed it this way
While looking into the second issue before realizing it was the same as the first issue, I ran the script in our existing logic, and it passed for both droplet block and text mode, so it seems like that check is no longer valid. I updated the text mode check to be the opposite of the block mode check; that the gutter display is
none. This should just help us in the future to accurately determine if droplet is in text mode or not.Link
Testing story
Tested this change on saucelabs and it is passing. This test is pretty intermittently flaky, and takes a while to run so I only ran it 3 times and it passed every time.
PR Checklist: