Questions tagged [golden-test]
7 questions
3
votes
0 answers
Flutter test goldens : possibility to emulate system bars to test SafeArea?
I have a android/ios flutter app.
I handle SafeArea so my design/buttons does (or does not depending on the cases) conflits with system bars (navigation bar, status bar, notch)
But when i run my integration widgets tests (testing the full app with…

Jscti
- 14,096
- 4
- 62
- 87
3
votes
0 answers
Specify diff tolerance level for golden test files in flutter
The reason for doing this is explained in this issue
How do we set a diff tolerance levels for the golden test ? There is already PR merged for this. But I am not sure how I use those API in my tests.
Currently, I have got a golden test matcher like…

Burhanuddin Rashid
- 5,260
- 6
- 34
- 51
1
vote
1 answer
"Tried to change the number of overrides" when running golden tests on multiple widgets with different ProviderScopes
I'm currently writing golden tests for my app, that uses Riverpod and Golden Toolkit, and I'm facing a bug that I don't understand. When running a test (see below), I get the following error:
The following assertion was thrown building…

matteoh
- 2,810
- 2
- 29
- 54
1
vote
1 answer
How can I run Golden tests in the Flutter Web integration test environment
I'm trying to run Golden test in the Flutter Web integration test environment.
But using flutter drive directly returns true without doing anything.
$ flutter drive --driver=test_driver/integration_test.dart …

Riccardo
- 11
- 1
0
votes
1 answer
Flutter Riverpod and golden tests: "A Timer is still pending even after the widget tree was disposed."
I'm currently writing golden tests for my app, that uses Riverpod and Golden Toolkit, and I'm facing a bug that I don't understand. When running a test (see below), I get the following error:
Pending timers:
Timer (duration: 0:00:00.000000,…

matteoh
- 2,810
- 2
- 29
- 54
0
votes
0 answers
Why MyApp widget return error when writing snapshot test using alchemist golden test?
I have the default codebase configuration in Flutter and I want to write a sample snapshot test for the MyApp widget, inside that widget is a demo for a counter.
This is my code:
group('GoldenBuilder', () { goldenTest( 'Counter Snapshot ',…

Pusoy
- 13
- 3
0
votes
0 answers
CircularProgressIndicator breaks widget test
I implemented a few snack bars, one of which contains a CircularProgressIndicator, for displaying loading messages.
The issue is that in emulator/device, the loading snack bar displays correctly, but in widget testing the snack bar doesn't display…

adi
- 417
- 4
- 25