-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix flaky section signin test #17609
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
@@ -56,12 +56,15 @@ Scenario: Join non-existent section from sign in page shows error | |||
And I type "9999999999" into "#section_code" | |||
And I click selector "#section_form .btn-primary" | |||
Then I wait until I am on "http://studio.code.org/courses" | |||
Then I wait to see ".alert-danger" | |||
And element ".alert-danger" contains text "Could not find a section with code" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. Possible alternative:
And element ".alert-danger" eventually contains text "Could not find a section with code"
Scenario: Join existing section from sign in page goes to section join page | ||
Given I sign out | ||
Given I am on "http://studio.code.org/users/sign_in/" | ||
And I type the section code into "#section_code" | ||
And I click selector "#section_form .btn-primary" | ||
Then I wait until current URL contains "http://studio.code.org/join" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, great. I think you could also
And I press the first "#section_form .btn-primary" element to load a new page
And element ".main" eventually contains text "Register to join the class"
Added some waits into a sign-in test that was not seeing the expected text (though visual inspection tended to show that it was there). Removing the @no_ie and @no_safari tags, under the theory that those are not actually browser-specific failures but were just because of timing-dependence.