savitore / STEAM-Celestial-Satellite-tracker-in-real-time

This project represents the orbit of a satellite orbiting earth on a Liquid Galaxy rig and an Arduino-controlled pointer through a mobile application.
MIT License
6 stars 12 forks source link

Unnecessary Flutter test causing errors in default test suite #19

Open rkverma2022 opened 6 months ago

rkverma2022 commented 6 months ago

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](https://github.com/savitore/STEAM-Celestial-Satellite-tracker-in-real-time/actions/runs/7489742202/job/20386991300?pr=18#step:5:20) 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.