-
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
[HOLD #51296] [Unit & UI Tests]: add unit test for automatically approved expense #51330
base: main
Are you sure you want to change the base?
Conversation
@@ -33,6 +33,7 @@ | |||
"ios-build": "bundle exec fastlane ios build_unsigned", | |||
"android-build": "bundle exec fastlane android build_local", | |||
"test": "TZ=utc NODE_OPTIONS=--experimental-vm-modules jest", | |||
"test:unit": "TZ=utc NODE_OPTIONS=--experimental-vm-modules jest tests/unit/ReportUtilsTest.ts", |
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.
@Beamanator please ignore this, i have used this temporarily just to not use up all the memory testing all files 😅
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.
haha yeah that's useful, you'll remove before we merge, eh? :D
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.
lol, for sure !
@shubham1206agra 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] |
@shubham1206agra ignore the ping for now, idk if this would need a C+ review or not |
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.
So far so good! I have only 2 little comments so far.
But one thing we wanted to test is: UI tests rendering <ReportActionItem>
using @testing-library/react-native
. Can you please add a few of those as well?
@@ -33,6 +33,7 @@ | |||
"ios-build": "bundle exec fastlane ios build_unsigned", | |||
"android-build": "bundle exec fastlane android build_local", | |||
"test": "TZ=utc NODE_OPTIONS=--experimental-vm-modules jest", | |||
"test:unit": "TZ=utc NODE_OPTIONS=--experimental-vm-modules jest tests/unit/ReportUtilsTest.ts", |
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.
haha yeah that's useful, you'll remove before we merge, eh? :D
describe('Automatically approved report message via automatic (not by a human) action is', () => { | ||
test('Automatically Approved Report message when report is forwarded (Control feature)', () => { |
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 think we can clean up these names a bit - I believe ideally it reads almost like a sentence, starting with the describe
text, followed by the test
itself - you can see how in other places (like just above) we have describe('ParentReportAction is')
+ test('Manually Submitted Report Action')
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.
cool cool, I'll update in the next commit
On my todo list, UI tests are new for me. Getting my head around that screen rendering. I should have those tests updated soon. thanks for the review |
sorry this slipped through the cracks, Working on this one now update: Still getting through here |
Details
Fixed Issues
$ #50351
PROPOSAL:
Tests
Offline tests
QA Steps
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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop