-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix submit and close next steps for optimistically created policy #39563
Conversation
…and close approval flow
… approval mode the policy has
@rushatgabhane 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] |
@@ -316,9 +316,6 @@ type Policy = OnyxCommon.OnyxValueWithOfflineFeedback< | |||
enabled: boolean; | |||
}; | |||
|
|||
/** @deprecated Whether the scheduled submit is enabled */ | |||
isPreventSelfApprovalEnabled?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer being sent from backend so we can remove it
|
||
describe('it generates a nullable optimistic nextStep', () => { | ||
test('closed status', () => { | ||
const result = NextStepUtils.buildNextStep(report, CONST.REPORT.STATUS_NUM.CLOSED); | ||
|
||
expect(result).toBeNull(); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this usecase is only in the Cancel payment flow and even in that one I think its fair so show the Finished no further action required message. So its safe to remove
@rushatgabhane will you be able to address this one? |
@mountiny yes today |
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / SafariScreen.Recording.2024-04-08.at.13.06.37.movMacOS: DesktopSame as web |
✋ 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/MariaHCD in version: 1.4.61-0 🚀
|
🚀 Deployed to staging by https://github.com/MariaHCD in version: 1.4.61-0 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.61-8 🚀
|
Details
We were missing default values for delayed submission and for the approval mode when the policy is created optimistically in newdot. By default, the policy is made as Submit and close, so when we create a policy offline and then proceed to create a request and submit it, the report should end up getting closed.
Added a unit test to cover this case
Fixed Issues
$ #39337
Tests
Finished
No further action required!Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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
Logic changes so only adding web and ios native:
Screen.Recording.2024-04-03.at.23.02.14.mp4
Screen.Recording.2024-04-03.at.23.03.58.mp4
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop