test(blocklist): UI tests for block/unblock flows - #540
Merged
Conversation
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.
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.
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 theenableBlockingflag is off.Design notes
FLIPCASH_UI_TEST_ACCESS_KEYaccount 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.tearDownre-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.--ui-testing,applyLaunchArgumentOverrides()resets all beta flags, so["enableTips","enableBlocking"]/[]force the flags on/off regardless of any cached state.TipsUIScreenandBlockedUsersUIScreenpage objects and ablockedRowaccessor onSettingsUIScreen. Test-target only — no production changes, no pbxproj edits (synchronized target).Test plan
TEST BUILD SUCCEEDEDfor theFlipcashUITeststarget../Scripts/test.sh FlipcashUITests/BlockUnblockSmokeTests FlipcashUITests/BlockedUsersSmokeTests FlipcashUITests/BlockedUsersGatingRegressionTests