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

Fix flaky test #448

Closed
rolandgeider opened this issue Nov 8, 2023 · 3 comments · Fixed by #497
Closed

Fix flaky test #448

rolandgeider opened this issue Nov 8, 2023 · 3 comments · Fixed by #497

Comments

@rolandgeider
Copy link
Member

Currently, nutritional_meal_form_test.dart can be a bit flaky, since we compare the current time so sometimes this fails because the widget was rendered in the next/previous minute. It would be better if we would just mock the current time to whatever value we need

see also
https://pub.dev/packages/clock
https://medium.com/steeple-product/mocking-time-in-flutter-tests-724c42a28daf

@watcher6280
Copy link

@rolandgeider Can I work on this one?

@rolandgeider
Copy link
Member Author

sure, go ahead!

I'm not sure if we really need that package though, might be enough to rewrite a bit the test

@watcher6280
Copy link

Thanks, I'll add my PR and we can see if it is worth it.

@watcher6280 watcher6280 mentioned this issue Jan 23, 2024
5 tasks
@rolandgeider rolandgeider linked a pull request Jan 23, 2024 that will close this issue
5 tasks
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 a pull request may close this issue.

2 participants