Convert some UI tests screens to be ScreenObject subclasses – Part 7 of 7#17641
Convert some UI tests screens to be ScreenObject subclasses – Part 7 of 7#17641
ScreenObject subclasses – Part 7 of 7#17641Conversation
|
You can trigger an installable build for these changes by visiting CircleCI here. |
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
ec687f8 to
b5ccadd
Compare
| if var expectedUsername = username { | ||
| expectedUsername = "@\(expectedUsername)" | ||
| let actualUsername = usernameField.label | ||
| let actualUsername = app.staticTexts["login-epilogue-username-label"].label |
There was a problem hiding this comment.
@jostnes raised a valid question on whether to adopt this inline style vs moving everything at the start of the file.
I stuck to the approach I used so far because: 1) we haven't taken a decision yet; 2) it's what (most of) the rest of the ScreenObject subclasses here use.
| try XCTContext.runActivity(named: "Dismiss quick start prompt if needed.") { (activity) in | ||
| if QuickStartPromptScreen.isLoaded() { | ||
| Logger.log(message: "Dismising quick start prompt...", event: .i) | ||
| _ = try QuickStartPromptScreen().selectNoThanks() | ||
| return | ||
| } | ||
| try XCTContext.runActivity(named: "Dismiss quick start prompt if needed.") { _ in | ||
| guard QuickStartPromptScreen.isLoaded() else { return } | ||
|
|
||
| Logger.log(message: "Dismising quick start prompt...", event: .i) | ||
| _ = try QuickStartPromptScreen().selectNoThanks() |
There was a problem hiding this comment.
Replaced a surrounding if with a guard let to remove one level of nesting.
|
I tried running it locally and the test |
pachlava
left a comment
There was a problem hiding this comment.
I can see that CI is green, and locally I had issues only with testViewPostInSafari, which is not related to the PR, and the fail was caused by the cookies accept prompt shown in the WebView in the case of Simulator state reset:
Once I accepted cookies, further execution of the same test went well. Anyway, this is not a part of this PR.
All the changes in the code make sense, and I saw no issues 👍 🥳 🎉
cc @tiagomar

See #17221, #17348, #17359, #17360, #17361, and #17599.
This is the last PR in the series. To celebrate, I included the commit that removes
BaseScreen🔥 .If the UI tests pass on both CircleCI and Buildkite, we should be good to merge.
Regression Notes
Potential unintended areas of impact
N.A.
What I did to test those areas of impact (or what existing automated tests I relied on)
N.A.
What automated tests I added (or what prevented me from doing so)
N.A.
RELEASE-NOTES.txtif necessary. N.A.