-
Notifications
You must be signed in to change notification settings - Fork 289
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
[UI Tests] Examine / address flakiness in History
tests.
#1551
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
8eebf42
Empty-Commit to kick off CI
pachlava f0a9ea8
Experiment: disable History tests to see if it's about them being exe…
pachlava ae9c959
Empty-Commit to kick off CI
pachlava ba11206
Experiment: wait for "In Progress" spinner to disappear.
pachlava 50279cb
Fix the name of XCTest results file.
pachlava b7f407d
Experiment: close "Save Password" prompt after app launch.
pachlava 19c9d54
UI tests rerun 1
pachlava b826b53
UI tests rerun 2
pachlava 37a4a6c
UI tests rerun 3
pachlava 18e4845
UI tests rerun 4
pachlava a04c1cf
UI tests rerun 5
pachlava File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ class EmailLogin { | |
class func open() { | ||
app.buttons[UID.Button.logIn].waitForIsHittable() | ||
app.buttons[UID.Button.logIn].tap() | ||
|
||
app.buttons[UID.Button.logInWithEmail].waitForIsHittable() | ||
app.buttons[UID.Button.logInWithEmail].tap() | ||
} | ||
|
@@ -38,6 +37,7 @@ class EmailLogin { | |
enterPassword(enteredValue: password) | ||
app.buttons[UID.Button.logIn].tap() | ||
handleSavePasswordPrompt() | ||
waitForSpinnerToDisappear() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not really a part of the fix, and not necessary, but it does not hurt, and does not occupy much time, since the function waits for the spinner to disappear. So, if the spinner was not there in the first place, it will be completed really fast. |
||
} | ||
|
||
class func enterEmail(enteredValue: String) { | ||
|
@@ -60,4 +60,10 @@ class EmailLogin { | |
app.buttons["Not Now"].tap() | ||
} | ||
} | ||
|
||
class func waitForSpinnerToDisappear() { | ||
let predicate = NSPredicate(format: "exists == false && isHittable == false") | ||
let expectation = XCTNSPredicateExpectation(predicate: predicate, object: app.staticTexts["In progress"]) | ||
XCTWaiter().wait(for: [ expectation ], timeout: 10) | ||
} | ||
} |
This file contains 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
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.
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.
Good catch! =D