-
Notifications
You must be signed in to change notification settings - Fork 159
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
Add example file picker screen and test #514
Conversation
expect($(#image_0), findsNothing); | ||
|
||
await $.native.tap(Selector(text: 'download.jpeg')); | ||
await $.pumpAndSettle(); |
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.
Why 2 pumpAndSettle()
s?
Well, this is strange.
1 pumpAndSettle()
makes the test pass, but the image is not visible to my human eyes. Adding the second pumpAndSettle()
makes the image visible.
I wonder how tests that depend on a file being present in the device's Downloads directory should signal this dependency. Any ideas? @jakubfijalkowski @pietraniktx @jBorkowska |
I think it is developer's responsibility to have this in mind. There is nothing we can do. |
I'm not sure about the "signaling" part of the question but I understand the problem is - "device needs to have an image in downloads folder, if not, the test will fail", right? So why can't we download the file before the test or put it there some other way programmatically? |
"We" the framework or "we" the testers? :D |
:D I belive in Bartek. And it would be nice for Patrol users to have the recipe for such scenario as it looks like quite common problem and preparing test data inside the test seems like a good practice. Cypress, for example, has a ton of recipes to help testers with cases like this, check out this one about seeding database with node |
Closing so it doesn't clutter opened PRs. |
For @fylyppo with 💙
This test assumes that there's a file named
download.jpg
in the Downloads directory.Screen.Recording.2022-10-25.at.4.34.07.PM.mov