Skip to content

Fix "Replay" buttons (used in craft levels)#9686

Merged
bcjordan merged 4 commits into
stagingfrom
fix-replay-buttons
Aug 1, 2016
Merged

Fix "Replay" buttons (used in craft levels)#9686
bcjordan merged 4 commits into
stagingfrom
fix-replay-buttons

Conversation

@bcjordan

@bcjordan bcjordan commented Jul 25, 2016

Copy link
Copy Markdown
Contributor

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 onlyContinue changed 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 the onlyContinue began 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.

@bcjordan

Copy link
Copy Markdown
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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whaaaa, I didn't know we could do this! I like it!

@Hamms

Hamms commented Jul 28, 2016

Copy link
Copy Markdown
Contributor

dang, that's a subtle bug; good catch! LGTM!

@bcjordan bcjordan merged commit 74a7fb5 into staging Aug 1, 2016
@bcjordan bcjordan deleted the fix-replay-buttons branch August 1, 2016 20:46
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