diff --git a/lib/firebase_options.dart b/lib/firebase_options.dart index ec6c8583..8e0d3e4b 100644 --- a/lib/firebase_options.dart +++ b/lib/firebase_options.dart @@ -60,5 +60,4 @@ class DefaultFirebaseOptions { authDomain: '', storageBucket: '', ); - -} \ No newline at end of file +} diff --git a/test/game/components/backbox/displays/leaderboard_display_test.dart b/test/game/components/backbox/displays/leaderboard_display_test.dart index 51d32de7..bcdfdfff 100644 --- a/test/game/components/backbox/displays/leaderboard_display_test.dart +++ b/test/game/components/backbox/displays/leaderboard_display_test.dart @@ -108,6 +108,7 @@ void main() { flameTester.testGameWidget( 'renders the titles', setUp: (game, _) async { + await game.onLoad(); await game.pump(LeaderboardDisplay(entries: const [])); await game.ready(); }, @@ -124,7 +125,9 @@ void main() { flameTester.testGameWidget( 'renders the first 5 entries', setUp: (game, _) async { + await game.onLoad(); await game.pump(LeaderboardDisplay(entries: leaderboard)); + await game.ready(); }, verify: (game, _) async { for (final text in [ @@ -154,6 +157,7 @@ void main() { flameTester.testGameWidget( 'can open the second page', setUp: (game, _) async { + await game.onLoad(); final display = LeaderboardDisplay(entries: leaderboard); await game.pump(display); final arrow = game @@ -165,7 +169,7 @@ void main() { // Tap the arrow arrow.onTap(); // Wait for the transition to finish - display.updateTree(5); + game.update(5); await game.ready(); }, verify: (game, _) async { @@ -196,6 +200,7 @@ void main() { flameTester.testGameWidget( 'can open the second page and go back to the first', setUp: (game, _) async { + await game.onLoad(); final display = LeaderboardDisplay(entries: leaderboard); await game.pump(display); @@ -208,10 +213,10 @@ void main() { // Tap the arrow arrow.onTap(); // Wait for the transition to finish - display.updateTree(5); + game.update(5); await game.ready(); }, - verify: (game, _) async { + verify: (game, tester) async { for (final text in [ 'FFF', 'GGG', @@ -244,9 +249,8 @@ void main() { arrow.onTap(); // Wait for the transition to finish - final display = LeaderboardDisplay(entries: leaderboard); - display.updateTree(5); - await game.ready(); + game.update(5); + await tester.pump(); for (final text in [ 'AAA', diff --git a/test/game/components/backbox/displays/leaderboard_failure_display_test.dart b/test/game/components/backbox/displays/leaderboard_failure_display_test.dart index 8663ba24..f69c9049 100644 --- a/test/game/components/backbox/displays/leaderboard_failure_display_test.dart +++ b/test/game/components/backbox/displays/leaderboard_failure_display_test.dart @@ -45,6 +45,7 @@ void main() { flameTester.testGameWidget( 'renders correctly', setUp: (game, _) async { + await game.onLoad(); await game.pump(LeaderboardFailureDisplay()); await game.ready(); },