-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merge Accounts] Add Menu Item, Route, and MergeAccountsPage Components #54443
Comments
Triggered auto assignment to @mallenexpensify ( |
|
Triggered auto assignment to Design team member for new feature review - @shawnborton ( |
@allroundexperts can you provide an update here, since you're assigned? I see you're assigned to Add Merge Account to NewExpensify too. Mainly wanting to know what next steps are, I haven't followed the tracking issue. |
Hi @mallenexpensify! I am waiting for the backend changes to be completed so I can start integrating those. |
Hey @allroundexperts I'm working on the backend and just created the beta here. Which account will you test with so I can add it to the beta? |
@allroundexperts another question: I'm working on the API for |
Can you add: |
@arosiclair If I remember correctly, we decided on saving the error in the
|
Done 👍
Cool, that makes sense to me. I'll update the backend. |
This is still held for now |
Still held. We'll be able to start progress once #55677 is merged. |
@allroundexperts @parasharrajat The new There's a bit of a change with how we're going to handle errors. In some cases, we want to add links and markup to the error message (shown in the design doc mockups) which can't be done with the API response. So instead, we're setting an error code on Some error codes you should expect are the following: GetValidateCodeForAccountMerge
MergeWithValidateCode
You should be able to find the error messages and mockups in the doc. Let me know if any of that is unclear. |
@allroundexperts Please let me know your next plan of action. |
@allroundexperts I made you owner and bumped to |
This is waiting on me. I'll probably have a single PR that covers most of these issues before the weekend. |
Update: Draft PR is up. Filling in the final cracks, and will then open the PR for review. |
@arosiclair, @mallenexpensify, @parasharrajat, @allroundexperts Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@parasharrajat Feel free to start the review of the draft PR. I just have to upload the screen recordings now. |
@Expensify/design Some of the screens that @arosiclair mentioned here seems to be missing in Figma and the doc. Can you please provide me with all the text for those as well? Thanks! Missing screens: 402 Requires email verification 401 Not authorized - Invalid validateCode |
We normally don't provide copy for these sorts of things. @arosiclair can you work with marketing (or maybe specifically @jamesdeanexpensify) to get the copy you would need for these? |
Let's reuse copy for I'll ask for copy in
|
Chatted @arosiclair direct with some q's |
Just noticed that there's actually a mockup for |
Do these sound good (and accurate)? For the 401, can we say which domain the mergeFrom account is controlled by? 403
401
413
|
Hm... Is this related to email verification @arosiclair? ![]() |
These look good! For 401, the controlling domain would be the one in the email. So if the mergeFrom email is user@abc.com, then the controlled domain is just abc.com.
Yup, the context is in the doc. |
OK, some mods here. Thoughts? 403
401
413
|
@arosiclair I am a little confused about the various cases. Are all the following cases valid? Or am I mixing up two of them? |
Also, What does |
All of those screens are error cases.
That one is this error case in the doc (I added the error code now). |
What case is the following @arosiclair? https://github.com/user-attachments/assets/44861e78-e364-4402-b50b-66fb4e0790f1 |
Part of the Merge Accounts project
Main issue: #47073
Doc section: https://docs.google.com/document/d/1QhfgsJ0w-KoWX7r3RYNSk25DICp4C8XIfrFmULZgEgk/edit?tab=t.0#bookmark=id.bkjxhsrclw01
Project: #47073
Feature Description
Steps to Complete:
1. Update Text and Add Icon:
"Keep your account even safer with two-factor authentication and other security features."
arrow-collapse.svg
to theassets/images
folder with the provided SVG content.2. Add Translation Entry:
3. Create a New Route:
SCREENS
file:ROUTES
file:4. Add New Menu Item:
5. Create
MergeAccountsPage
Component:pages/settings/Security/MergeAccountsPage
.6. Define Steps for the Flow:
CONST.ts
file:7. Create
MergeAccountsContext
:MergeAccountsContext
to manage the state of the merge flow with properties:currentStep
accountToMerge
result
useContext
,useCallback
, anduseMemo
for state and step transitions.8. Create Subcomponents:
AccountDetailStep Component
ACCOUNT_VALIDATION
step.AccountValidateStep Component
MERGE_SUCCESS
orMERGE_FAILURE
.MergeSuccessStep Component
ConfirmationPage
to display a success message.MergeFailureStep Component
ConfirmationPage
with appropriate failure messages and illustrations.Manual Test Steps
Offline Account Merge
Action To Take: Log into the test account and navigate to Security in the left-hand menu.
Action to Take: Go offline
Action To Take: Click on Merge accounts.
Verify: A full page offline screen displays since we cannot take this action while offline.
Successful Account Merge
Action To Take: Log into the test account and navigate to Security in the left-hand menu.
Verify: The Security page displays options:
Two-factor authentication
Merge accounts
Close account
Action To Take: Click on Merge accounts.
Verify:
A screen appears showing the target account email (e.g. danny@dannysdonuts.com).
The input field for “Email or phone” is visible.
The checkbox "I understand this is not reversible" is present.
Action To Take: Enter a valid email into the input field.
Verify: No error message.
Action To Take: Check the "I understand this is not reversible" checkbox.
Action To Take: Click on the Next button.
Verify: The screen transitions to the Magic Code Input step.
Action To Take: Enter the magic code sent to dannysdonuts@gmail.com.
Verify:
A message displays confirming that a magic code was sent to the correct email address.
The input field for the magic code is visible.
Action To Take: Input the correct 6-digit magic code.
Verify: The “Merge accounts” button can be tapped.
Action To Take: Click the Merge accounts button.
Verify: The screen transitions to the Accounts Merged Confirmation page.
Action To Take: Review the confirmation message.
Verify:
The message confirms: “You've successfully merged all data from dannysdonuts@gmail.com into danny@dannysdonuts.com.”
The Got it button is displayed.
Action To Take: Click the Got it button.
Verify: User is redirected back to the Security page.
Account merge blocked due to trying to merge an account with SAML into a personal account
Prerequisite: Set up a new private domain with domain control and require SAML. Create a new domain member email to use for this test.
Action to Take: Sign into New Expensify with a public domain account.
Action to Take: Attempt to merge the SAML domain member account into the public domain account.
Action to Take: Check the “I understand this is not reversible” checkbox.
Action to Take: Tap the “Next” button
Verify: The “Can’t merge accounts” screen appears and explains why the action cannot be taken i.e. “because your domain admin has set it as your primary login”.
Account merge for users on domain with SAML enabled and required
Prerequisite: Set up a new private domain with domain control and require SAML. Create two new domain member emails to use for this test.
Action to Take: Sign into New Expensify with a SAML required domain controlled email account.
Action to Take: Attempt to merge a domain email account on that same domain into the SAML required account.
Action to Take: Check the “I understand this is not reversible” checkbox.
Action to Take: Tap the “Next” button
Verify: The “We’re working on it” screen appears and explains why the action cannot be taken.
Action to Take: Tap “Go to Expensify Classic”
Verify: We are brought to Expensify Classic and land in the “Settings > Account details” section.
Action to Take: Tap the “Got it” button in New Expensify
Verify: We are brought back to the “Security” screen.
Merge Failure: 2FA is enabled on the oldAccount
Prerequisite: Create two accounts. One with 2FA enabled and one without.
Action to Take: Sign into the account which does not have 2FA enabled.
Action to Take: Attempt to merge the account which does have 2FA enabled into the account that does not have 2FA enabled.
Verify: The screen to enter the magic code appears and a magic code is sent.
Action to Take: Enter the 6-digit magic code.
Verify: “Can’t merge accounts” screen appears. With a message to “disable 2FA for [email] and try again”.
Merge Failure: User is trying to merge an uncreated account
Prerequisite: Create one account with no domain control or 2FA.
Action to Take: Sign into the created validated account in NewDot.
Action to Take: Attempt to merge an account that does not yet exist into an account that does exist.
Verify: “Can’t merge accounts” screen appears. With a message: “[email] doesn’t have an Expensify account”.
Merge Failure: SmartScanner account
Prerequisite: Create one account with no domain control or 2FA.
Action to Take: Sign into the created validated account in NewDot.
Action to Take: Attempt to merge an account that is one of our SmartScan vendor domains.
Verify: “Can’t merge accounts” screen appears. With a message: “You can’t merge [email] into other accounts”.
Merge Failure: Invoiced Billing account
Prerequisite: Create one account with no domain control or 2FA. Create another account with a policy set up for invoiced billing.
Action to Take: Sign into the created validated account in NewDot.
Action to Take: Attempt to merge an account that has invoiced billing.
Verify: “Can’t merge accounts” screen appears. With a message: “You can’t merge [email] into other accounts because it’s the billing owner of an invoiced account”.
Automated Tests
We'll be creating the unit tests for the following frontend components:
Issue Owner
Current Issue Owner: @allroundexpertsThe text was updated successfully, but these errors were encountered: