Skip to content

fix(tests): rebuild the UI test entry points around the tab-bar UI - #653

Merged
bmc08gt merged 1 commit into
mainfrom
fix/tests-tab-bar-wallet-entry
Aug 26, 2026
Merged

fix(tests): rebuild the UI test entry points around the tab-bar UI#653
bmc08gt merged 1 commit into
mainfrom
fix/tests-tab-bar-wallet-entry

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

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 skipPendingTabBarRewrite call 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, and NewUserTutorial disables 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-money and siblings) and WalletScreen targets those. scrollUpToAndTap(_:in:) brings the tile into view first; an off-screen element is never hittable, so waitUntilHittableAndTap would just burn its timeout waiting for a scroll nothing performs.

Two changes to the flow itself surfaced behind that break:

  • The method picker is headed "Add Money With", not "Select Method" — AddMoneyStartScreen.swift:32 renders Text(isV2 ? "Add Money With" : "Select Method"), and .newUI is .shipped, so the old heading is unreachable. assertSelectMethodReached becomes assertMethodPickerReached.
  • With a host stack, selecting Debit Card runs the verified-contact gate before "Amount to Add". BuyApplePayRegressionTests had nothing left to drive on the amount screen, so those steps and amountToAddActionButton are gone.

Currency rows

currency-row and currency-row-usdf were only ever set on the v1 BalanceScreen, reachable only from the removed scanner chrome. TokenCardStack's cards carry them now, keeping USDF distinct so firstCurrencyRow still targets an investable token regardless of sort order.

Buy and sell are Convert now

A currency you hold has no Buy or Sell tile — CurrencyInfoContentV2 offers 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:

was is
CurrencySellRegressionTests ConvertToDollarsRegressionTests — token → Dollars
BuyReservesRegressionTests ConvertFromDollarsRegressionTests — Dollars → held token
BuyWithCurrencyRegressionTests ConvertBetweenTokensRegressionTests — token → token

ConvertAmountViewModel defaults 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 why CurrencyPickerSheet rows get currency-picker-row with Dollars distinguished as currency-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. SellConfirmationScreen goes 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. SettingsMyAccountScreen says 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

SettingsUIScreen loses both properties with the rows, and WithdrawSmokeTests, WithdrawPickerEmptyRegressionTests and DepositSmokeTests (×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, when isPushed — so both callers finish on CurrencyInfoScreen rather than a tab root. GiveSmokeTests asserts 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; CurrencyInfoContentV2 has 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

GiveCashGate still fires from a chat's Send Cash, TipFlow, and the give deeplink — but the only caller that gated a give from a tab root was ScanBottomBar, which renders under if !isEmbedded and so never appears in the embedded Scan tab.

Both are deleted. GiveDiscoverGateRegressionTests doubly so: USDF is giveable now (BetaFlags.allowsDollarsGive), so GiveCashGate.discoverCurrencies is unreachable either way. GiveRegressionTests covered 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

BlockUnblockSmokeTests opened 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, so TipsUIScreen opens app.buttons["Chat"], waits on the "Chats" title instead of show-my-tipcard-button, and treats every cell as a conversation.

Its tearDown unblock still tapped app.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: scrollUpToAndTap would fail the teardown and mask the failure that triggered it.

ProfileCreationSmokeTests walked Tips intro → name → photo → tipcard, and none of those four steps has an entry left. OnboardingNameScreen is 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. ProfileNameScreen skips the photo step for every caller because the card omits the photo, so .profilePhoto has no caller at all.

DisplayNameSmokeTests replaces 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: .back pops one screen — and only once SetDisplayName returns, so landing there is still the proof that the name was accepted and moderated. selectFirstPhotoFromLibrary went with its last caller.

Log out

LoginSmokeTests goes 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 under Screens/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), so DiscoverCurrenciesSmokeTests checks the two entries side by side and asserts the card is gone.

Both tiles are gated on funding: WalletScreen draws walletTiles only when session.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 CurrencyCreationGateRegressionTests on the standing account, because shouldAddMoneyBeforeLaunch is a shortfall check rather than a $0 check: the account holds money but not newCurrencyPurchaseAmount + 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 AddMoneyGateRegressionTests is deleted alongside the give gates:

  • The Discover tile needs hasEverAddedMoney().
  • flipcash://discover reaches the same destination, but app.open relaunches the app and a freshly created account doesn't survive the relaunch — it comes back on "Create a New Account".
  • Both standing accounts hold displayable USDF, so BuyAmountViewModel.paymentOptions is 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.

skipPendingTabBarRewrite is gone

Its last call site went with the discover group, so the helper goes too.

…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.
@bmc08gt
bmc08gt merged commit 5d65ecc into main Aug 26, 2026
@bmc08gt bmc08gt changed the title fix(tests): enter the Add Money and currency flows through the tab-bar wallet fix(tests): fix the seven UI tests broken by the tab-bar wallet Aug 26, 2026
@bmc08gt bmc08gt changed the title fix(tests): fix the seven UI tests broken by the tab-bar wallet fix(tests): rebuild the UI test entry points around the tab-bar UI Aug 26, 2026
@bmc08gt bmc08gt self-assigned this Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant