-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
@allgandalf @dangrous @mountiny, now it looks okay to me 2025-02-06.16.34.57.mp4 |
@allgandalf can you please review and add checklist? |
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 good! One nitpick, but otherwise seems like we're nearly there!
}; | ||
|
||
function getIconAndTitle(route: string, translate: LocaleContextProps['translate']): IconAndTitle { | ||
switch (route) { | ||
case CONST.TAB_REQUEST.MANUAL: | ||
return {icon: Expensicons.Pencil, title: translate('tabSelector.manual')}; |
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.
Is there another way we could do this? I don't love updating this function only in this certain case...
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.
Let me check 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.
We need to mark the elements we're waiting for before rendering so we can manipulate them further.
Instead of hardcoding a testID for just one case, we could generate it dynamically based on the route, but that would add unnecessary complexity and feel wrong.
Since we'll likely be adding more E2E tests, this generic function, which creates components for multiple screens, will also assign an ID to each element
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.
can we maybe just update the function to getIconTitleAndTestID
and have it return a testID (even if unused) for all options? I think that would make me feel better haha
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.
It makes sense, I'll add this right now. Thanks!
@perunt area there any specific testing steps that i should monitor carefully ? or just test the app generally ? |
@allgandalf , do you want to run a test on your machine? If so, it will involve a few more steps, but if you just want to test the app, you can go through the money request page, as the main changes were made there. The rest of the code shouldn't be affected by this PR |
Cool, can you resolve conflicts ? |
friendly bump here @perunt |
On it. this PR is breaking this test, so I'm fixing it right now https://github.com/Expensify/App/pull/56090/files#diff-58e743360d49aacdf19f65f0853c0cd804d091bbb20fe2feedc145a304f3c849 |
Thanks for the update |
The create expense flow was migrated to use the form. I faced several issues with handling touches that need to be implemented from scratch. Unfortunately, I was reassigned to a release blocker task, so I put it on hold until either I or @kirillzyusko pick it up. I hope to resolve the release blocker in a day, but we'll see |
@perunt any updates on this one |
@perunt let us know how we can help move this along - thanks! |
friendly bump @perunt 😄 |
Taras is currently OOO but will return on Monday! |
Let us know when this is ready for another look @perunt! |
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