Closed jeremiahlukus closed 2 years ago
i ended up just separating them like this:
goldenTest(
'renders correctly on iphone11',
fileName: 'FavoriteSongsPage iphone11',
builder: () => const GoldenTestGroup(
children: [
GoldenTestDeviceScenario(
name: 'golden test FavoriteSongsPage on iphone11',
builder: buildWidgetUnderTest,
),
],
),
);
Is there an existing issue for this?
Version
0.4.1
Description
When running tests that require MaterialApp.router i am unable to run more than one due to duplicate global keys
Steps to reproduce
1) ``` Widget buildWidgetUnderTest() { router.push(SearchedSongsRoute( searchTerm: 'query', ));
Expected behavior
When running it should update the goldens as it does when running one.
Screenshots
No response
Additional context and comments
The test is located https://github.com/jeremiahlukus/guitar_tabs/blob/jlp-search-bar/test/backend/songs/searched_songs/presentation/searched_song_page_test.dart#L230
using
flutter test test/backend/songs/searched_songs/presentation/searched_song_page_test.dart --update-goldens