Set "Delayed submission" to "Manually" by default on new Workspaces#57676
Conversation
|
@abdulrahuman5196 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] |
|
@abdulrahuman5196 please review this one, i will upload videos shortly |
|
bump on review please @abdulrahuman5196 thank you! |
|
Hi, Checking today. Sorry for delay |
|
bumping this, thanks! |
|
Checking now. |
|
@twilight2294 I don't see any tests added or updated. Can we add/update tests similar to #50391 ? |
|
I was OoO most of last week, working on it today! |
|
Hi @twilight2294 , kindly let us know once tests are added. I can review again |
|
@abdulrahuman5196 I updated please check |
|
@twilight2294 did you add unit tests as well? If so, maybe they didn't get pushed? I only see the updates to the testing steps in the PR description. We can update Thanks! |
|
bump @twilight2294 thanks! |
Gentle ping |
twilight2294
left a comment
There was a problem hiding this comment.
@abdulrahuman5196 all yours
| callback: (value) => (allTransactionViolations = value), | ||
| }); | ||
|
|
||
| let introSelected: OnyxEntry<IntroSelected>; |
There was a problem hiding this comment.
Had to move this Up to make use of it in createDraftInitialWorkspace
| approvalMode: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, | ||
| reimbursementChoice: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, | ||
| }, | ||
| areWorkflowsEnabled: shouldEnableWorkflowsByDefault, |
There was a problem hiding this comment.
@dangrous @abdulrahuman5196 The PR #50391 missed to add areWorkflowsEnabled I updated it in our PR.
| createWorkspace(CARLOS_EMAIL, true, "Carlos's Workspace"); | ||
| const policyID = generatePolicyID(); | ||
| createWorkspace(CARLOS_EMAIL, true, "Carlos's Workspace", policyID); | ||
| setWorkspaceAutoReportingFrequency(policyID, CONST.POLICY.AUTO_REPORTING_FREQUENCIES.INSTANT); |
There was a problem hiding this comment.
The test was for correctly submits a report with Submit and Close approval mode, so had to change the mode here
| createWorkspace(CARLOS_EMAIL, true, "Carlos's Workspace", policyID); | ||
| setWorkspaceAutoReportingFrequency(policyID, CONST.POLICY.AUTO_REPORTING_FREQUENCIES.INSTANT); |
| expect(onboarding?.hasCompletedGuidedSetupFlow).toBeTruthy(); | ||
| }); | ||
|
|
||
| it('create a new workspace with delayed submission set to manually if the onboarding choice is newDotManageTeam or newDotLookingAround', async () => { |
There was a problem hiding this comment.
This is the new test we added for our changes
There was a problem hiding this comment.
I don't think we need a similar case for Looking around, but let me know if we need that too, it's not a big change, so i didn't add it here
|
Awesome, so this should be deployed this week, right? |
|
Should be! @abdulrahuman5196 can you give this its final review so we can keep it moving forward? thank you! |
| workspaceName, | ||
| ); | ||
|
|
||
| const shouldEnableWorkflowsByDefault = |
There was a problem hiding this comment.
nit: It would be good to move this to a common function to avoid duplicate code.
But for now i am fine if this PR is required urgently @dangrous
There was a problem hiding this comment.
yeah I think that's okay for now!
|
Checking now |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-03-27.at.12.50.41.AM.mp4Android: mWeb ChromeScreen.Recording.2025-03-27.at.12.31.23.AM.mp4iOS: NativeiOS: mWeb SafariScreen.Recording.2025-03-27.at.12.28.20.AM.mp4MacOS: Chrome / SafariScreen.Recording.2025-03-27.at.12.13.13.AM.mp4MacOS: DesktopScreen.Recording.2025-03-27.at.12.17.43.AM.mp4 |
|
Hi, I am having trouble in building ios native application alone. But tested in all other platforms and the code looks good as well. So i think it should be fine. |
abdulrahuman5196
left a comment
There was a problem hiding this comment.
Changes looks good and works well. Reviewers checklist is also complete.
All yours. @dangrous
🎀 👀 🎀
C+ Reviewed
dangrous
left a comment
There was a problem hiding this comment.
I'm going to go ahead and merge this for expediency, but I'd love a quick follow up just adding two things to the tests:
- Making sure the settings are set appropriately with no intro choice
- Checking the workflows enabled and harvesting enabled as well as the autoreporting frequency
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/dangrous in version: 9.1.20-0 🚀
|
Bumping this when y'all have a chance to do the followup @twilight2294, thank you! |
|
Will work on this today |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.1.20-2 🚀
|
|
@dangrous @abdulrahuman5196 follow up PR is here: #59579 |
Explanation of Change
Fixed Issues
$ #56367
PROPOSAL: #56367 (comment)
Tests
Same as QA
Offline tests
Same as QA
QA Steps
Test 1:
Verify that Set "Delayed submission" is set to Manually
Test 2:
Verify that Set "Delayed submission" is set to Manually when workspace is created
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen_recording_20250309_170645.mp4
Android: mWeb Chrome
Screen_recording_20250309_170331.mp4
iOS: Native
Simulator.Screen.Recording.-.Expensify.testing.-.2025-03-09.at.17.04.17.mp4
iOS: mWeb Safari
Simulator.Screen.Recording.-.Expensify.testing.-.2025-03-09.at.17.05.49.mp4
MacOS: Chrome / Safari
Screen.Recording.2025-03-09.at.4.58.12.PM.mov
MacOS: Desktop
Screen.Recording.2025-03-09.at.5.02.11.PM.mov