chore: add UI tests for switching accounts - WPB-24968#4657
Open
samwyndham wants to merge 9 commits intodevelopfrom
Open
chore: add UI tests for switching accounts - WPB-24968#4657samwyndham wants to merge 9 commits intodevelopfrom
samwyndham wants to merge 9 commits intodevelopfrom
Conversation
samwyndham
commented
Apr 29, 2026
| } | ||
|
|
||
| override func tearDown() async throws { | ||
| await app.terminate() |
Contributor
Author
There was a problem hiding this comment.
This ensures the app is killed before deleting the created users remotely which could lead to a crash in the app.
|
Contributor
Test Results1 881 tests 1 854 ✅ 2m 18s ⏱️ Results for commit c889615. Summary: workflow run #25110194241 |
findms
reviewed
May 1, 2026
| } | ||
|
|
||
| @MainActor | ||
| func testSwitchingAccounts_TC_8941() async throws { |
Contributor
There was a problem hiding this comment.
Does it make sense to move this test in MultiBackendSupportTests where multi backend account getting added?
findms
approved these changes
May 1, 2026
Contributor
findms
left a comment
There was a problem hiding this comment.
lgtm. Left a comment to move this test to different Test file..
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Issue
This PR:
Additionally it does some refactoring to fix issues I experienced working with multiple backends above:
BackendContext.currentas I found this shared mutable state lead to issues keepingUserHelpersin sync with the current value ofBackendContext.current. Instead this value is now passed through as needed.UserHelper. This means that deletion of created accounts only needs to happen in once place and it will clean up accounts created for all backends.UserHelper()is nowUserHelper.defaultandUserHelper(backend: .anta)is nowUserHelper.instance(backend: .anta).WireUITestCase. UseUserHelper.defaultinstead.SwitchAccount.mov
Testing
Run UI tests
Checklist
[WPB-XXX].