fl-query icon indicating copy to clipboard operation
fl-query copied to clipboard

Guidance on integration testing

Open shocklateboy92 opened this issue 2 months ago • 0 comments

When we try to run flutter integration tests on any code that uses fl_query, it crashes with the following error:

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following _TypeError was thrown building QueryBuilder<Response<List<String>>, void>(dirty,
state: _QueryBuilderState<Response<List<String>>, void>#86f02(query: null, queryKey:
Instance/GetAllGenreIds(), builder: Closure: (BuildContext, Query<Response<List<String>>, void>) =>
Widget, initial: null, retryConfig: null, refreshConfig: null, jsonConfig: null, onData: null,
onError: null, enabled: true)):
Null check operator used on a null value

The relevant error-causing widget was:
  QueryBuilder<Response<List<String>>, void>
  QueryBuilder:file:///C:/Users/afcha/AppData/Local/Pub/Cache/hosted/pub.dev/fl_query-1.0.0/lib/src/widgets/query_builder.dart:61:12

I see your README mention that y'all haven't had much resources for test coverage, but if you could give some examples/guidance on how other people that consume your library can write tests, that would be much appreciated.

Spotube also doesn't appear to have any integration tests. Are there any other notable projects using fl_query that we could use as an example?

shocklateboy92 avatar Apr 26 '24 22:04 shocklateboy92