fixing tests

pull/170/head
Erick Zanardo 4 years ago
parent a61df839e1
commit e821a35844

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

@ -1,6 +1,7 @@
// ignore_for_file: cascade_invocations // ignore_for_file: cascade_invocations
import 'package:flame/components.dart'; import 'package:flame/components.dart';
import 'package:flame/effects.dart';
import 'package:flame_test/flame_test.dart'; import 'package:flame_test/flame_test.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
@ -25,10 +26,8 @@ void main() {
); );
}, },
verify: (game, tester) async { verify: (game, tester) async {
await expectLater( final texts = game.descendants().whereType<TextComponent>().length;
find.byGame<TestGame>(), expect(texts, equals(1));
matchesGoldenFile('golden/score_text_effect/render.png'),
);
}, },
); );
@ -48,10 +47,8 @@ void main() {
await tester.pump(); await tester.pump();
}, },
verify: (game, tester) async { verify: (game, tester) async {
await expectLater( final text = game.descendants().whereType<TextComponent>().first;
find.byGame<TestGame>(), expect(text.firstChild<MoveEffect>(), isNotNull);
matchesGoldenFile('golden/score_text_effect/movement.png'),
);
}, },
); );

Loading…
Cancel
Save