foss42 / apidash

API Dash is a beautiful open-source cross-platform API Client built using Flutter which can help you easily create & customize your API requests, visually inspect responses and generate API integration code. A lightweight alternative to postman/insomnia.
https://apidash.dev
Apache License 2.0
1.47k stars 274 forks source link

test: integration tests for env manager #444

Closed DenserMeerkat closed 3 weeks ago

DenserMeerkat commented 1 month ago

PR Description

Integration tests for the feature environment manager.

Related Issues

Checklist

Added/updated tests?

We encourage you to add relevant test cases.

ashitaprasad commented 3 weeks ago

A test failed for this PR:

/Documents/GitHub/apidash/test/providers/ui_providers_test.dart: Testing navRailIndexStateProvider UI should update correctly when navRailIndexStateProvider changes
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure was thrown running a test:
Expected: exactly one matching candidate
  Actual: _IconWidgetFinder:<Found 0 widgets with icon "IconData(U+0F153)": []>
   Which: means none were found but one was expected

When the exception was thrown, this was the stack:
#4      main.<anonymous closure>.<anonymous closure> (file:///Documents/GitHub/apidash/test/providers/ui_providers_test.dart:220:7)
<asynchronous suspension>
#5      testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:183:15)
<asynchronous suspension>
#6      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1017:5)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)

This was caught by the test expectation on the following line:
  file:///Documents/GitHub/apidash/test/providers/ui_providers_test.dart line 220
The test description was:
  UI should update correctly when navRailIndexStateProvider changes
════════════════════════════════════════════════════════════════════════════════════════════════════
00:18 +179 -1: /Documents/GitHub/apidash/test/providers/ui_providers_test.dart: Testing navRailIndexStateProvider UI should update correctly when navRailIndexStateProvider changes [E]
  Test failed. See exception logs above.
  The test description was: UI should update correctly when navRailIndexStateProvider changes

To run this test again: /Documents/flutter/bin/cache/dart-sdk/bin/dart test /Documents/GitHub/apidash/test/providers/ui_providers_test.dart -p vm --plain-name 'Testing navRailIndexStateProvider UI should update correctly when navRailIndexStateProvider changes'