Skip to content

test(blocklist): UI tests for block/unblock flows - #540

Merged
bmc08gt merged 1 commit into
mainfrom
uitests/blocking
Jul 31, 2026
Merged

test(blocklist): UI tests for block/unblock flows#540
bmc08gt merged 1 commit into
mainfrom
uitests/blocking

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Adds XCUITest coverage for the Blocking feature merged in #539.

What's covered

  • BlockUnblockSmokeTests — the full round-trip: block a tip-DM counterpart from their profile → assert the conversation disappears from the Tips list → unblock from Settings → My Account → Blocked → assert the block is cleared.
  • BlockedUsersSmokeTests — Settings → My Account → Blocked reaches the list and it loads (flag on).
  • BlockedUsersGatingRegressionTests — the "Blocked" row is absent in My Account when the enableBlocking flag is off.

Design notes

  • Non-mutating fixture. The Block affordance only exists on a tip DM, so the round-trip drives whatever standing tip DM the FLIPCASH_UI_TEST_ACCESS_KEY account already has — it never sends a tip, and captures the counterpart's display name dynamically (nothing hardcoded). With no tip DM in the feed it XCTSkips rather than fabricating one.
  • Self-restoring. The block/unblock round-trip returns the blocklist to its starting state. tearDown re-runs the unblock best-effort (relaunch → login → Settings → Blocked) if an assertion fails after the block lands, so a broken run never leaves the shared account with someone blocked.
  • Deterministic gating. Under --ui-testing, applyLaunchArgumentOverrides() resets all beta flags, so ["enableTips","enableBlocking"] / [] force the flags on/off regardless of any cached state.
  • Adds TipsUIScreen and BlockedUsersUIScreen page objects and a blockedRow accessor on SettingsUIScreen. Test-target only — no production changes, no pbxproj edits (synchronized target).

Test plan

  • TEST BUILD SUCCEEDED for the FlipcashUITests target.
  • Run once the access key is configured: ./Scripts/test.sh FlipcashUITests/BlockUnblockSmokeTests FlipcashUITests/BlockedUsersSmokeTests FlipcashUITests/BlockedUsersGatingRegressionTests

Covers the Blocking feature end to end via XCUITest:

- BlockUnblockSmokeTests: block a tip-DM counterpart from their profile,
  assert the conversation leaves the Tips list, then unblock from Settings
  and assert the block is cleared. Uses whatever standing tip DM the test
  account has (name captured dynamically), skips when there is none, and
  restores the blocklist — tearDown re-runs the unblock best-effort if an
  assertion fails after the block lands, so the shared account is never
  left dirty.
- BlockedUsersSmokeTests: Settings -> My Account -> Blocked reaches the
  list and it loads (flag on).
- BlockedUsersGatingRegressionTests: the Blocked row is absent when the
  enableBlocking flag is off.

Adds TipsUIScreen and BlockedUsersUIScreen page objects and a blockedRow
accessor on SettingsUIScreen. Test-target only; no production changes.
@bmc08gt
bmc08gt merged commit 3e38afe into main Jul 31, 2026
@bmc08gt
bmc08gt deleted the uitests/blocking branch July 31, 2026 21:38
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