-
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
[No QA] Add automated tests for delete money request #26029
[No QA] Add automated tests for delete money request #26029
Conversation
…IOU report test case
…ents left in the IOU report test case
@aimane-chnaif 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] |
@aimane-chnaif could you review and give me feedback? thank you! |
Are you still having trouble finding the root cause of this? |
@aimane-chnaif yes |
Friendly bump here @aimane-chnaif |
I need help on the above issues, thank you. |
@aimane-chnaif could you take a look at the above comments? It seems like we're seeing some unexpected behavior with the command |
Also @rayane-djouah, we started allowing async/await in our test suite, so maybe you can rewrite some of the logic here to use that pattern instead and hopefully it'd make things simpler/easier to read/debug. |
Updated |
@aimane-chnaif any chance you can review this one today? |
yes, will review today |
Thank you @aimane-chnaif! |
Merge conflicts resolved |
friendly bump @aimane-chnaif |
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.
LGTM! Only a few minor NAB, but I'll merge this since it's just tests and we don't need C+ review here
Report.openReport(thread.reportID, userLogins, thread, createIOUAction.reportActionID); | ||
await waitForBatchedUpdates(); | ||
|
||
// Then The iou action has the transaction report id as a child report ID |
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.
NAB
// Then The iou action has the transaction report id as a child report ID | |
// Then the iou action has the transaction report id as a child report ID |
IOU.deleteMoneyRequest(transaction.transactionID, createIOUAction, false); | ||
await waitForBatchedUpdates(); | ||
|
||
// Then The report for the given thread ID does not exist |
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.
// Then The report for the given thread ID does not exist | |
// Then the report for the given thread ID does not exist |
expect(report).toBeFalsy(); | ||
fetch.resume(); | ||
|
||
// Then After resuming fetch, the report for the given thread ID still does not exist |
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.
// Then After resuming fetch, the report for the given thread ID still does not exist | |
// Then after resuming fetch, the report for the given thread ID still does not exist |
await waitForBatchedUpdates(); | ||
|
||
// Given a thread report | ||
|
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.
}); | ||
|
||
// When we resume fetch | ||
|
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.
await waitForBatchedUpdates(); | ||
|
||
// Given an added comment to the IOU report | ||
|
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.
fetch.resume(); | ||
|
||
// Then we expect the moneyRequestPreview to show [Deleted request] | ||
|
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.
await waitForBatchedUpdates(); | ||
|
||
// Given a second money request in addition to the first one | ||
|
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.
Reviewer Checklist
Screenshots/VideosN/A we're just adding tests WebMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
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.
Sorry for late. Latest changes look good to me too
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.73-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.73-1 🚀
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.74-0 🚀
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.74-3 🚀
|
Details
Fixed Issues
$ #25601
PROPOSAL: #25601 (comment)
Tests
npm run test -- ./tests/actions/IOUTest.js
Offline tests
N/A
QA Steps
No QA
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
N/AMobile Web - Chrome
N/AMobile Web - Safari
N/ADesktop
N/AiOS
N/AAndroid
N/A