Try to make functional tests more reliable #544
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.
Proposed changes in this pull request
This is an attempt to make the functional tests on Travis a bit more reliable. I believe that the reason things have been failing intermittently, almost exclusively on the login page, was because we were using the presence of an alert to indicate that the login was successful. Since the "OK" alerts now disappear on a timer, it's possible for the login to work, and the alert to appear and disappear before Selenium gets around to checking it. The test then times out.
I've changed the post-login check to look for permanent page features instead: for most pages, this is the
dashboard-map
DIV, but it's possible to override this in thelogin
method ofLoginPage
(which is needed for cases with post-login redirections).When should this PR be merged
Immediately.
Risks
None: it can't make anything worse!
Follow up actions
Bask in the glow of working functional tests...