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

Synchronization capabilities: allow to wait for a View or Fragment to exist #2147

Open
aberaud opened this issue Feb 12, 2024 · 1 comment
Open

Comments

@aberaud
Copy link

aberaud commented Feb 12, 2024

Espresso should allow to wait for a View or Fragment to appear (with a timeout).

The "Idling system" makes a lot of assumptions about the implementation details of the app, and makes difficult to test the UI of an asynchronous app without having to instrument async operations in the app, which is simply not realistic for modern apps where everything is async (or should be anyway). This makes the success of the test depend on instrumentation code spread around the codebase instead of just the actual behaviour of the app and the code of the test itself.

In general, testing the UI should not require knowledge about the implementation details of the backend.

It would help if the test API allowed to wait for a View or Fragment to appear, with a timeout or other failure conditions.

Many thanks

@aberaud
Copy link
Author

aberaud commented Feb 12, 2024

One might also want to wait for a View or Fragment to be removed from the hierarchy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant