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

Unable to work with routes using private types. #68

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

Unable to work with routes using private types. #68

tomwyr opened this issue Feb 12, 2024 · 1 comment
Labels
p3 Issues that we currently consider unimportant waiting for response Waiting for follow up

Comments

@tomwyr
Copy link

tomwyr commented Feb 12, 2024

It seems to be unable to mock navigator interactions when code in tests depends on types that are not publicly visible.

It's not uncommon that the Flutter SDK uses internal types that cannot be used outside the sdk. E.g. trying to test that DropdownButton pushes a dropdown menu will throw due to the when method generic type param that cannot be stubbed.

image

Attempting the above will fail with:

Exception has occurred.
TestFailure (No matching calls. All calls: MockNavigator.canPop(), MockNavigator.push<_DropdownRouteResult<String>>(_DropdownRoute<String>(RouteSettings(none, null), animation: null))

Mock navigator should expose a way of working around internal types (or maybe there already is one that I'm unaware of).

@robsonsilv4
Copy link

Hi @tomwyr, can you share a minimal example to reproduce this issue?

@alestiago alestiago added the waiting for response Waiting for follow up label Aug 13, 2024
@tomarra tomarra moved this from Needs Triage to Community in VGV Open Source 🦄 🧙🌟 Aug 30, 2024
@tomarra tomarra added the p3 Issues that we currently consider unimportant label Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3 Issues that we currently consider unimportant waiting for response Waiting for follow up
Projects
Status: Community
Development

No branches or pull requests

4 participants