fix(tests): rebuild the UI test entry points around the tab-bar UI - #653
Merged
Conversation
…r wallet Seven UI tests failed against the shipped tab-bar wallet. Two selector breaks account for most of it. `app.buttons["Add Money"]` resolves to the new-user tutorial row rather than the wallet tile. Since #634 a held balance completes the add-money milestone, and `NewUserTutorial` disables a completed row, so on the funded test account that match is permanently unhittable. The four wallet tiles now carry identifiers, `wallet-tile-add-money` among them, and the wallet page object targets those — scrolling the tile up from below the fold via a new `scrollUpToAndTap(_:in:)`. `currency-row` and `currency-row-usdf` were only ever set on the v1 `BalanceScreen`, which the tab-bar UI no longer reaches. `TokenCardStack`'s cards carry them now, so `firstCurrencyRow` and `usdfRow` match again. Two flow changes surfaced behind the first break. The method picker is headed "Add Money With", not "Select Method", so `assertSelectMethodReached` becomes `assertMethodPickerReached`. And with a host stack, selecting Debit Card runs the verified-contact gate before "Amount to Add", leaving the Apple Pay test's amount-entry steps nothing to drive; they and `amountToAddActionButton` are gone. `LoginSmokeTests` logs out through You → Advanced, replacing the v1 scanner's Settings button. BuyReserves, BuyWithCurrency and CurrencySell need more than a selector. `CurrencyInfoContentV2` gates its action tiles on `isOwned` and gives a currency you hold Give/Convert/Withdraw — no Buy, no Sell — and buy pushes `.buyCurrency(mint)` instead of presenting the nested sheet the reserves test asserts. What those three should cover in the tab-bar UI is a product question, so they join `skipPendingTabBarRewrite` with that reason recorded alongside the rest in the rewrite plan.
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.
Seven UI tests failed against the shipped tab-bar wallet: two selector breaks and one group whose screens no longer exist. Fixing them meant rebuilding the entry points, so this also clears fifteen of the
skipPendingTabBarRewritecall sites that the tab-bar release left behind — 18 down to 3, all in the Discover and create-currency group.Add Money entry
app.buttons["Add Money"]resolves to the new-user tutorial row, not the wallet tile. Since #634 a held balance completes the add-money milestone, andNewUserTutorialdisables a completed row, so on the funded test account that match is permanently unhittable — and the tile itself sits below the fold.The four wallet tiles now carry accessibility identifiers (
wallet-tile-add-moneyand siblings) andWalletScreentargets those.scrollUpToAndTap(_:in:)brings the tile into view first; an off-screen element is never hittable, sowaitUntilHittableAndTapwould just burn its timeout waiting for a scroll nothing performs.Two changes to the flow itself surfaced behind that break:
AddMoneyStartScreen.swift:32rendersText(isV2 ? "Add Money With" : "Select Method"), and.newUIis.shipped, so the old heading is unreachable.assertSelectMethodReachedbecomesassertMethodPickerReached.BuyApplePayRegressionTestshad nothing left to drive on the amount screen, so those steps andamountToAddActionButtonare gone.Currency rows
currency-rowandcurrency-row-usdfwere only ever set on the v1BalanceScreen, reachable only from the removed scanner chrome.TokenCardStack's cards carry them now, keeping USDF distinct sofirstCurrencyRowstill targets an investable token regardless of sort order.Buy and sell are Convert now
A currency you hold has no Buy or Sell tile —
CurrencyInfoContentV2offers Give / Convert / Withdraw, and Convert replaced both. It moves value between balances you already hold, entered from the one you are paying from, so each of the three tests is a convert in one direction:CurrencySellRegressionTestsConvertToDollarsRegressionTests— token → DollarsBuyReservesRegressionTestsConvertFromDollarsRegressionTests— Dollars → held tokenBuyWithCurrencyRegressionTestsConvertBetweenTokensRegressionTests— token → tokenConvertAmountViewModeldefaults a non-Dollars source to Dollars and a Dollars source to the largest other holding, so only the token → token case has to open the picker. That is whyCurrencyPickerSheetrows getcurrency-picker-rowwith Dollars distinguished ascurrency-picker-row-usdf— picking "the first token" could otherwise land on Dollars depending on how balances sort.Two v1 assertions are dropped rather than ported. The nested-sheet swipe-down regression can't recur: convert is pushed, so there is no sheet behind the processing screen. And a finished convert pops to the Wallet root instead of returning to the currency page, per
ConvertFlowDestinationView.SellConfirmationScreengoes with the v1 sell sheet that was its only subject.Settings rows are the You tab
The You tab's list has two rows, My Account and Advanced, and both sit under the tip card — so each test opens the tab and scrolls to its row.
Access Key and Application Logs are on Advanced, not My Account.
SettingsMyAccountScreensays so in its own header doc: it keeps Access Key, Log Out and Delete Account off itself and holds only Change Display Name, Blocked, and the beta-gated Switch Accounts. Blocked stays where it was.Covers
AccessKeyBackupSmokeTests(×3),BlockedUsersSmokeTests,ApplicationLogsRegressionTests.Add Money and Withdraw Money are Wallet tiles
SettingsUIScreenloses both properties with the rows, andWithdrawSmokeTests,WithdrawPickerEmptyRegressionTestsandDepositSmokeTests(×2) enter through the tiles instead.Give starts from a currency
navigateToGiveAmount()goes Wallet → first currency card → its Give tile, replacing the scanner's Cash button. The keypad is pushed and pops itself as the bill appears —GiveScreen.onBillPresented, whenisPushed— so both callers finish onCurrencyInfoScreenrather than a tab root.GiveSmokeTestsasserts that on cancel, and the cash link reaches its history from there without a second trip through the wallet.That history is the "Recent" section header now;
CurrencyInfoContentV2has no "Transaction History" button, and the rows beneath the header are a non-interactive preview.The balance-retry loop is gone from the helper. The Give tile is only drawn for a currency the account holds, so this path raises no gate dialog to dismiss.
Both gate regressions lose their subject
GiveCashGatestill fires from a chat's Send Cash,TipFlow, and the give deeplink — but the only caller that gated a give from a tab root wasScanBottomBar, which renders underif !isEmbeddedand so never appears in the embedded Scan tab.Both are deleted.
GiveDiscoverGateRegressionTestsdoubly so: USDF is giveable now (BetaFlags.allowsDollarsGive), soGiveCashGate.discoverCurrenciesis unreachable either way.GiveRegressionTestscovered the "No Balance Yet" branch on a fresh empty account, which has no currency card to open and so can't reach the tile that would raise it.Chat and profile
BlockUnblockSmokeTestsopened the Tips list as a sheet off the scanner's bottom bar. Embedded as the Chat tab it has no toolbar and no leading tip-card cell, soTipsUIScreenopensapp.buttons["Chat"], waits on the "Chats" title instead ofshow-my-tipcard-button, and treats every cell as a conversation.Its
tearDownunblock still tappedapp.buttons["Settings"], so it had been silently no-opping — a run that failed after the block left the shared test account with a user blocked. It goes through You › My Account › Blocked now, with a non-asserting scroll of its own:scrollUpToAndTapwould fail the teardown and mask the failure that triggered it.ProfileCreationSmokeTestswalked Tips intro → name → photo → tipcard, and none of those four steps has an entry left.OnboardingNameScreenis mandatory after the access key, so no account reaches the app without a name and both name-less prompts — the Chats intro and the You tab's — stay gated off.ProfileNameScreenskips the photo step for every caller because the card omits the photo, so.profilePhotohas no caller at all.DisplayNameSmokeTestsreplaces it with what survived: a freshly registered account lands on the You tab with a card it can share, and the name behind that card changes through My Account. The editor pops back to My Account rather than the tab root —completion: .backpops one screen — and only onceSetDisplayNamereturns, so landing there is still the proof that the name was accepted and moderated.selectFirstPhotoFromLibrarywent with its last caller.Log out
LoginSmokeTestsgoes through You → Advanced → Log Out, replacing the v1 scanner's Settings button. The rewrite plan's note that the You tab gates on a tippable profile is stale — no such gate exists underScreens/Main/You/— so this needed no skip.Discover and currency creation are sibling tiles
v1 reached currency creation through Discover, from the promo card at the top of its list. The tab-bar UI splits them into two Wallet tiles and hides the card (
CurrencyDiscoveryScreen.hidesPromo), soDiscoverCurrenciesSmokeTestschecks the two entries side by side and asserts the card is gone.Both tiles are gated on funding:
WalletScreendrawswalletTilesonly whensession.hasEverAddedMoney(), and gives an unfunded account the new-user tutorial in their place. So the test takes the standing account rather than creating a fresh one. It only navigates.The two add-money gates part ways
Both needed an empty balance, which is exactly what the tile gate excludes.
The creation gate survives, in its own
CurrencyCreationGateRegressionTestson the standing account, becauseshouldAddMoneyBeforeLaunchis a shortfall check rather than a$0check: the account holds money but notnewCurrencyPurchaseAmount+newCurrencyFeeAmount, so Get Started still raises the prompt instead of the wizard. That depends on a balance the test doesn't control, so it skips if the account can afford the launch.The buy gate has no fixture left, so
AddMoneyGateRegressionTestsis deleted alongside the give gates:hasEverAddedMoney().flipcash://discoverreaches the same destination, butapp.openrelaunches the app and a freshly created account doesn't survive the relaunch — it comes back on "Create a New Account".BuyAmountViewModel.paymentOptionsis non-empty and the button reads Next.The gate itself is live — a funded account spent down to nothing hits it. The rewrite plan records what a spent-down fixture would restore.
skipPendingTabBarRewriteis goneIts last call site went with the discover group, so the helper goes too.