Fixes some more async test issues

pull/505/head
Alvaro Almeida Freire Stivi 1 year ago
parent 1e5cc0cf4d
commit 3ae8a0c36b
No known key found for this signature in database

@ -655,6 +655,7 @@ void main() {
flameTester.testGameWidget(
'adds LeaderboardDisplay on LeaderboardSuccessState',
setUp: (game, _) async {
await game.onLoad();
whenListen(
bloc,
Stream<BackboxState>.empty(),
@ -669,6 +670,7 @@ void main() {
backbox,
platformHelper: platformHelper,
);
await game.ready();
},
verify: (game, _) async {
expect(
@ -681,6 +683,7 @@ void main() {
flameTester.testGameWidget(
'adds LeaderboardFailureDisplay on LeaderboardFailureState',
setUp: (game, _) async {
await game.onLoad();
whenListen(
bloc,
Stream<BackboxState>.empty(),
@ -695,6 +698,7 @@ void main() {
backbox,
platformHelper: platformHelper,
);
await game.ready();
},
verify: (game, _) async {
expect(

@ -33,6 +33,7 @@ void main() {
flameTester.testGameWidget(
'loads correctly',
setUp: (game, _) async {
await game.onLoad();
final bottomGroup = BottomGroup();
await game.ensureAdd(
FlameBlocProvider<GameBloc, GameState>.value(
@ -40,6 +41,7 @@ void main() {
children: [bottomGroup],
),
);
await game.ready();
},
verify: (game, _) async {
expect(game.descendants().whereType<BottomGroup>().length, equals(1));
@ -50,6 +52,7 @@ void main() {
flameTester.testGameWidget(
'one left flipper',
setUp: (game, _) async {
await game.onLoad();
final bottomGroup = BottomGroup();
await game.ensureAdd(
FlameBlocProvider<GameBloc, GameState>.value(
@ -76,6 +79,7 @@ void main() {
flameTester.testGameWidget(
'one right flipper',
setUp: (game, _) async {
await game.onLoad();
final bottomGroup = BottomGroup();
await game.ensureAdd(
FlameBlocProvider<GameBloc, GameState>.value(
@ -102,6 +106,7 @@ void main() {
flameTester.testGameWidget(
'two Baseboards',
setUp: (game, _) async {
await game.onLoad();
final bottomGroup = BottomGroup();
await game.ensureAdd(
FlameBlocProvider<GameBloc, GameState>.value(
@ -123,6 +128,7 @@ void main() {
flameTester.testGameWidget(
'two Kickers',
setUp: (game, _) async {
await game.onLoad();
final bottomGroup = BottomGroup();
await game.ensureAdd(
FlameBlocProvider<GameBloc, GameState>.value(

Loading…
Cancel
Save