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

Mute Wiredash in widget tests #332

Merged
merged 7 commits into from Feb 27, 2024
Merged

Conversation

passsy
Copy link
Member

@passsy passsy commented Feb 27, 2024

Don't call FlutterError.onError unless it is an error that can be resolved by the developer.

This came up in a 3rd party app testing setup. Test failed because the ping after 5s after app start tried to read the device information, but no mock was setup. Wiredash then called onError with the MissingPluginException.

Technically it could be fixed by mocking the plugin, but that is completely out of scope of the test. Wiredash can print the error, but should not fail the test.

  • Check if pings and other jobs can be prevented altogether in 3rd party tests
  • Check if not calling onWiredashInit() has negative consequences
    • Does not write firstAppStart and increment appStartCount (required for PromoterScore)
    • Does not send ping
    • Does not send pending feedbacks

@passsy passsy force-pushed the do-not-throw-in-app-unit-tests branch from 9cb3608 to 7696411 Compare February 27, 2024 17:25
@passsy passsy changed the title reportInfo instead of reportError Mute Wiredash in widget tests Feb 27, 2024
@passsy passsy marked this pull request as ready for review February 27, 2024 18:55
@passsy passsy merged commit 798b7aa into stable Feb 27, 2024
4 checks passed
@passsy passsy deleted the do-not-throw-in-app-unit-tests branch February 27, 2024 19:03
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

Successfully merging this pull request may close these issues.

None yet

1 participant