-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add merge account feature to ND #56911
base: main
Are you sure you want to change the base?
Conversation
@parasharrajat Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Let us know when there are screenshots to review! |
Under review. |
@shawnborton Added recordings for web and desktop. I'm having trouble building on native devices, but these should help you get started. |
@shawnborton This is not impacting the functionality / design in any way. It's purely a code thing. Can we not re-visit the implementation details inside the design doc if a more simpler approach is found while in the implementation stage? When writing the implementation details in the doc, things are a little abstract, and new things usually do come up when writing the actual code. I think its a good idea to open a discussion about it, but if we want to stick to using context, I can refactor. |
Please highlight those as they come up. I need your help here 😄 |
I would say no. In terms of the design doc, there is a systematic process and we should follow that. If you need a change in design, that should be done earlier in state. Code changes are always welcome in any stage but whole architecture change is not the way. We should get this confirmed before implementation or in the early days of implementation. |
Let's start with following steps which will help us all.
|
We already have these confirmed on the design doc. Do we need it on slack as well? |
I think the doc used the JaimeGPT to get these which needs to be further approved on slack with a user. It's not very clear. So, on a safer note, getting slack approval will be good. |
Update regarding #56911 (comment) |
Now there are few unnecessary file refactoring changes on the PR. Let's revert those as well. Because of these only, I requested to do that in new PR. |
Can you please point those? |
I think I did those changes because the linter wasn't happy. |
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
@expensify/design I have added screenshots for all platforms. I am unable to build android native, but for rest of the platforms, the screenshots should be there. Let me know if you need any other thing. |
As not everyone has design doc access. Can you please add those steps here? |
What steps are you referring to @parasharrajat? |
Sorry, I mean test steps. Thanks for doing that. |
Added those! |
@allroundexperts Have you created a design change proposal? |
Explanation of Change
Implements merge account feature for NewDot
Fixed Issues
$ #54443
PROPOSAL: N/A
Tests
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:
Action To Take: Click on Merge accounts.
Verify:
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:
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:
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”.
Offline tests
N/A
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
Screen.Recording.2025-03-07.at.10.35.26.PM.mov
iOS: Native
Screen.Recording.2025-03-07.at.10.25.59.PM.mov
iOS: mWeb Safari
Screen.Recording.2025-03-07.at.9.42.39.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2025-02-24.at.1.08.56.PM.mov
Screen.Recording.2025-03-07.at.9.13.47.PM.mov
MacOS: Desktop
Screen.Recording.2025-02-24.at.12.49.16.PM.mov