Skip to content
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

Create contacts_test.dart in example app #968

Closed
wants to merge 3 commits into from

Conversation

bartekpacia
Copy link
Contributor

@bartekpacia bartekpacia commented Feb 18, 2023

To demonstrate complex native scenario.

This will serve as a good smoke test for Patrol's native automation feature.

Android

Android.contacts.mp4

@github-actions github-actions bot added the package: patrol Related to the patrol package (native automation, test bundling) label Feb 18, 2023
@bartekpacia
Copy link
Contributor Author

bartekpacia commented Feb 18, 2023

Android test fails until #967 is merged.

iOS test gets stuck randomly during the flow. No error was thrown. The strange thing is that it gets stuck "in between" methods. Very strange, and very hard to debug. Occurs both on my physical iPhone 14 and on various iPhone simulators.

Execution just stops.

iOS.contacts.mp4

Comment on lines +144 to +147
await $.native.tap(Selector(contentDescription: 'Create contact'));
await $.native.enterTextByIndex(firstName, index: 0);
await $.native.enterTextByIndex(lastName, index: 1);
await $.native.enterTextByIndex(company, index: 2);
Copy link

@walid-ashik walid-ashik May 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This enterTextByIndex() can vary from device to device. Not all Android device's index: 2 has the company field. is there any better way we can ensure that index 2 has the company field across all the android devices?

Btw, it will be great to have this example 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, it's not possible to make this test work on all Contacts app that exist.

bartekpacia added a commit that referenced this pull request Jul 11, 2023
@bartekpacia bartekpacia deleted the example/add_contacts_test branch July 14, 2023 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: patrol Related to the patrol package (native automation, test bundling)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants