Fix "Replay" buttons (used in craft levels)#9686
Merged
Merged
Conversation
Contributor
Author
|
Hoping to get this fix in with normal (non-eyes) tests to start until I have time to verify the tests work with the commented out eyes assertions. |
| Scenario: Playing level 1, seeing character select dialog and re-playing | ||
| Given I am on "http://studio.code.org/s/mc/stage/1/puzzle/1?noautoplay=true&customSlowMotion=0.1" | ||
| # And I open my eyes to test "Minecraft Level 1 dialogs" | ||
| And "when run" refers to block "4" |
Contributor
There was a problem hiding this comment.
whaaaa, I didn't know we could do this! I like it!
Contributor
|
dang, that's a subtle bug; good catch! LGTM! |
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.
Minecraft levels have a Replay button that lets you continue playing with a given level. At some point, these buttons started auto-advancing to the next level (similarly to if you were to click out of the dialog, or press the "Next level" button).
The cause here was a couple of things colliding, though haven't identified the exact date / commit of regression—the boolean variable
onlyContinuechanged to additionally be true when the level should "default to continue" (which is only true of Minecraft levels atm), at which point I should have renamed that variable it to its real meaning,defaultContinue. Eventually theonlyContinuebegan getting checked after normal dialog close to see whether to redirect to the next level or not, which caused the "Replay" button to both properly close the dialog but also advance to the next level.