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

Unnecessary Flutter test causing errors in default test suite #19

Open
rkverma2022 opened this issue Jan 11, 2024 · 0 comments
Open

Unnecessary Flutter test causing errors in default test suite #19

rkverma2022 opened this issue Jan 11, 2024 · 0 comments

Comments

@rkverma2022
Copy link
Contributor

The current default test suite includes a Flutter test case named "Counter increments smoke test," which is no longer relevant to the application's functionality.
This test is causing errors during execution, specifically a "Bad state" exception related to GetIt and an expected widget tree mismatch. As the functionality it tests is no longer applicable, it is recommended to remove or update this test case to align with the current state of the application.

Hi,

I would like to fix it.

Error:

❌ Counter increments smoke test (failed)
Bad state: GetIt: Object/factory with type LGService is not registered inside GetIt.
(Did you accidentally do GetIt sl=GetIt.instance(); instead of GetIt sl=GetIt.instance;
Did you forget to register it?)
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure was thrown running a test:
Expected: exactly one matching node in the widget tree
Actual: _TextFinder:<zero widgets with text "0" (ignoring offstage widgets)>
Which: means none were found but one was expected

When the exception was thrown, this was the stack:
#4 main. (file:///home/runner/work/STEAM-Celestial-Satellite-tracker-in-real-time/STEAM-Celestial-Satellite-tracker-in-real-time/test/widget_test.dart:19:5)


(elided one frame from package:stack_trace)

This was caught by the test expectation on the following line:
file:///home/runner/work/STEAM-Celestial-Satellite-tracker-in-real-time/STEAM-Celestial-Satellite-tracker-in-real-time/test/widget_test.dart line 19
The test description was:
Counter increments smoke test
════════════════════════════════════════════════════════════════════════════════════════════════════
Test failed. See exception logs above.
The test description was: Counter increments smoke test

Error: 0 tests passed, 1 failed.
Error: Process completed with exit code 1.

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