# wallet auth testing steps Testing behaviours for these flows are not that linear considering there are quite a few edge cases with the controls available to users in their wallet apps which can switch between connected wallet, connect new wallets, switch networks or disconnect wallets all from the wallet. The app should be reactive to these changes. You'll need at least 3 wallets that have not been linked with accounts on staging to complete this testing. Let me know if you need me to unlink wallets from accounts for you. Additionally, the below steps are primarily tested on desktop, as mobile is a sketchy experience at the moment with DApps. Since updating my metamask on iOS recently, Im no longer able to use many common DApps. It would be good to see how far you can get. I have tested the UI is responsive using my mobile, with QR code scan in metamask with desktop wallet connect. ## General 1. When logged out, the primary (purple) "CONNECT" top nav button should appear 1. When user clicks "CONNECT" top nav button, or gated feature is attempted, should be able to select wallet provider or login with existing account. ## Anonymous Fan flow Feat: 2 Step modal to signup/login anonymously. Start disconnect/logged out, and on the incorrect network. 1. Should be prompted to connect your wallet in wallet app unless it has previously been connected. 2. Should progress to the "Confirm Wallet" step on connect, which displays your truncated wallet address. 3. When user clicks "SWITCH NETWORK", should switch network and display "CONNECT" button (if the incorrect network is detected). 4. When user clicks "CONNECT", and completed signature request, should then log you in. 5. Your wallet address should be visible in a purple outline styled button with a default avatar next to it and your anonymous username UID. 6. Payment features should be unlocked 7. Log out should behave as expected 8. When logging in again with the same wallet, it should log you into the same account (check username UID) ## Existing Creator or Fan (aka "Admirer" [deprecated]) feat: Login and link wallet to then be able to 2-step login with wallet(s). Start disconnected/logged out, and on the incorrect network. 1. When user clicks "Have an existing account?" should be able to login or reset password 3. A "Link Wallet" modal should appear on login. This modal is not dismissable, as we want it to be deliberate, unless "Maybe next time." is selected. 4. When user clicks "Maybe next time" modal is dismissed. 5. The topnav "CONNECT" button should be in a red outlined state with the truncated address text. 7. When user clicks the "CONNECT" top nav button it should relaunch the "Link Wallet" modal. 8. Refreshing the page, the "Link Wallet" modal should reappear. 9. User should be able to selector wallet provider in the "Link Wallet" modal. 10. When wallet provider is selected & connected, the step "Confirm wallet" should display with correct truncated wallet address 11. When user clicks "SWITCH NETWORK", should switch network and display "CONNECT" button (if the incorrect network is detected). 12. When user clicks "CONNECT", and completed signature request, should then log you in. 13. The topnav button should now display a purple outline button with truncated wallet address 14. Payment features should be unlocked 15. Log out should behave as expected 16. When logging in again with the same wallet, it should log you into the same account ## Multiple wallets & already linked wallets 1. When users switches account in their wallet provider (i.e metamask) to an unlinked wallet, it should active the unlinked state (a red outline topnav button & "Link Wallet" modal popup). 2. When user links an already linked wallet, it should fail warning its already in use 3. When user links an unlinked wallet, it should be successfull. 4. When user logs in using the wallet signin, it should be successfull with either of those wallets (check the address in the wallet confirmation screen matches what you expect) ## Wallet controls 1. When user switches accounts in wallet provider, it should switches the wallet in the app and the state should be reflected correctly as per the flows defined above i.e red unlinked state & "Link Wallet" modal popup, or purple connected & linked state. 2. When user switches network, attempting a app payment should prompted to switch network 3. When user disconnects all their accounts from the wallet provider, the top nav button should display in red outline with text "CONNECT". Clicking the "CONNECT" button or refreshing the page should toggle the "Link Wallet" modal.