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

Improve error messages of PatrolFinder.first/last/at(index) #548

Closed
bartekpacia opened this issue Nov 1, 2022 · 2 comments
Closed

Improve error messages of PatrolFinder.first/last/at(index) #548

bartekpacia opened this issue Nov 1, 2022 · 2 comments
Labels
package: patrol Related to the patrol package (native automation, test bundling)

Comments

@bartekpacia
Copy link
Contributor

Reported today by @jBorkowska, but it has been occurring since always. It's just the default Flutter behavior.

2 examples. Let's say that we're doing:

expect($(Button).first, findsNothing);

We'll get a StateError (Bad state: no element) instead of a failing assertion. We need to research how this can be improved.

Another problem is with await $('non-existing').scrollTo(). This will throw a StateError instead of our own, more descriptive exception.

PS There's also a problem with stack-trace not containing the file and line which caused the exception to be thrown. This is a Flutter bug and is separate from this issue.

@bartekpacia bartekpacia added package: patrol Related to the patrol package (native automation, test bundling) tweak labels Nov 1, 2022
@bartekpacia bartekpacia changed the title Improve error messages of StateErrors when .first doesn't exist Improve error messages of PatrolFinder.first/last/at(index) Feb 5, 2023
@bartekpacia
Copy link
Contributor Author

This was superseded by #1044.

@bartekpacia bartekpacia closed this as not planned Won't fix, can't repro, duplicate, stale Mar 25, 2023
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: patrol Related to the patrol package (native automation, test bundling)
Projects
None yet
Development

No branches or pull requests

1 participant