-
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
e2e: added money request flow e2e test #52751
base: main
Are you sure you want to change the base?
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
@allgandalf 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] |
@hannojg your review would be highly appreciate! |
Does this need a C+ review @kirillzyusko ? |
I think no, a review from @hannojg should be enough 😊 |
CleanShot.2024-11-21.at.10.49.56.mp4Hm okay no sorry, seems to work, is that long waiting time on the submit money screen expected? |
No, I don't think so 🤔 We should clear a text and then press "2" button: .then(() => E2EClient.sendNativeCommand(NativeCommands.makeClearCommand()))
.then(() => {
tap('button_2');
}) I think that adb clear command takes so long? The test actually works, right @hannojg? It just takes a lot of time when you clear the text? I tested on API 30 - which Android version do you test? What I tend to think is that I send KEY_CODE delete 250 times as a long press, on Android it should clear text quite effectively, and some devices seems to optimize it (i. e. if no text is left then they will do an early return). But it looks like in your case it's trying to send the command all 250 times 🙈 |
Exactly yes. Actually the text is cleared very quickly but then we seem to idle a long time on the screen.
Emulator Android version: 14 (API level 34)
Probably yes 🤔 any other idea how to implement the clear? Can we capture the text input's ref on react native's side and call |
This is what I wanted to try 🙂 |
Well, it didn't work out. It looks like on second and subsequent runs TextInput contains I think adding |
Okay, sounds good to me! |
bddc192
to
3b54445
Compare
@mountiny would it be possible to review/merge it? |
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 @dangrous do you want to review too?
OPEN_SUBMIT_EXPENSE: 'open_submit_expense', | ||
OPEN_SUBMIT_EXPENSE_CONTACT: 'open_submit_expense_contact', | ||
OPEN_SUBMIT_EXPENSE_APPROVE: 'open_submit_expense_approve', |
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.
@adhorodyski any feedback here on the event names?
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.
looking into it
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.
LGTM2! Will hold merging on a response to https://github.com/Expensify/App/pull/52751/files#r1853873389 , but good to go from my perspective
@@ -73,6 +74,10 @@ function IOURequestStartPage({ | |||
IOU.initMoneyRequest(reportID, policy, isFromGlobalCreate, transaction?.iouRequestType, transactionRequestType); | |||
}, [transaction, policy, reportID, iouType, isFromGlobalCreate, transactionRequestType, isLoadingSelectedTab]); | |||
|
|||
useEffect(() => { |
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.
should we try to mark this when the page finishes laying out? isn't this effect 'too early'?
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.
Well, my understanding is that effects are fired asynchronously after a component has been mounted, right?
At least for e2e tests it works, because as soon as we get that event we try to interact with elements and we haven't had a case, when interaction failed because of the fact that elements were not rendered yet 🤔
But if you have a suggestion on how to improve timing of these events I'll be happy to hear 😊
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.
Mounted yes, I'm thinking if this is already considered as being 'fully interactive'. I think yes for a form step page like this one, it's fine then :)
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.
Hey hey, did a review and here are 2 things I've spotted:
- Please ensure start/end events are also being triggered during the runtime (not only in tests). Looks like we're triggering
start
events only in the e2e environment. - Please update these docs with the new events so that we keep track of these metrics in a written form as well.
Apart from that all good, thanks!
Explanation of Change
wait
actions/functions.Fixed Issues
$ #30265
PROPOSAL: #30265 (comment)
Tests
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
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop