Repository navigation
fix(tests): unblock the display name smoke test - #716
Merged
Merged
Conversation
…test Renaming from My Account raises "Change Display Name?" on Save, so `ProfileNameScreen` stayed up behind the dialog and the test burned its 60s wait for the pop back to My Account. Tap the dialog's confirm action between Save and that assertion; landing back on My Account still proves the name was accepted.
`save.isEnabled` was read straight after the deletes, which catches the state the button is leaving: the emptied field reaches it on SwiftUI's next render, and under a full-suite load that lands after the typing has settled. Failed once that way in a full run — the field read back as its placeholder, so it was already empty. Wait for `isEnabled == false` instead, the way the phone-verification helper waits for its Confirm button, and name the field's contents when the wait times out.
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.
DisplayNameSmokeTests.testDisplayName_yieldsTipCard_andCanBeChangedfails onmain, and fails identically at06678487— the commit before the chat edit/delete stack — so it predates that work.Two separate causes, both in the test.
The rename confirmation was never answered. Replacing a display name that is already set raises
Change Display Name?on Save:ProfileNameScreen.submit()only saves straight through when the profile carries no name, which is the onboarding case. The test tapped Save and then waited its full 60s forProfileNameScreen(completion: .back)to pop, with the dialog sitting on screen the whole time. It now taps the dialog's confirm action, scoped to the dialog container the wayAccessKeyBackupSmokeTestsandBlockUnblockSmokeTestsscope theirs. The assertion behind it is unchanged — landing back on My Account is still what proves the name was accepted.save.isEnabledwas sampled too early. Once the seeded name is deleted, the emptied field reaches the button on SwiftUI's next render, and under a full-suite load that lands after the typing has settled, so the read caught the state the button was leaving. It now waits forisEnabled == false, the wayverifyPhoneIfNeededwaits for its Confirm button to go away, and names the field's contents if the wait times out. That second failure only surfaced in a full-suite run; the first is deterministic in isolation.