|
|
|
@ -236,14 +236,40 @@ void main() {
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
flameBlocTester.test(
|
|
|
|
|
'one SkillShot',
|
|
|
|
|
(game) async {
|
|
|
|
|
flameBlocTester.test('one SkillShot', (game) async {
|
|
|
|
|
await game.ready();
|
|
|
|
|
expect(
|
|
|
|
|
game.descendants().whereType<SkillShot>().length,
|
|
|
|
|
equals(1),
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
flameBlocTester.testGameWidget(
|
|
|
|
|
'paints sprites with FilterQuality.medium',
|
|
|
|
|
setUp: (game, tester) async {
|
|
|
|
|
await game.images.loadAll(assets);
|
|
|
|
|
await game.ready();
|
|
|
|
|
|
|
|
|
|
final descendants = game.descendants();
|
|
|
|
|
final components = [
|
|
|
|
|
...descendants.whereType<SpriteComponent>(),
|
|
|
|
|
...descendants.whereType<SpriteGroupComponent>(),
|
|
|
|
|
];
|
|
|
|
|
expect(components, isNotEmpty);
|
|
|
|
|
expect(
|
|
|
|
|
game.descendants().whereType<SkillShot>().length,
|
|
|
|
|
equals(1),
|
|
|
|
|
components.whereType<HasPaint>().length,
|
|
|
|
|
equals(components.length),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
await tester.pump();
|
|
|
|
|
|
|
|
|
|
for (final component in components) {
|
|
|
|
|
if (component is! HasPaint) return;
|
|
|
|
|
expect(
|
|
|
|
|
component.paint.filterQuality,
|
|
|
|
|
equals(FilterQuality.medium),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
@ -330,20 +356,6 @@ void main() {
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
flameTester.testGameWidget(
|
|
|
|
|
'sets FilterQuality.medium to all components',
|
|
|
|
|
setUp: (game, tester) async {
|
|
|
|
|
await game.ready();
|
|
|
|
|
await tester.pump();
|
|
|
|
|
game.descendants().whereType<HasPaint>().forEach((component) {
|
|
|
|
|
expect(
|
|
|
|
|
component.paint.filterQuality,
|
|
|
|
|
equals(FilterQuality.medium),
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|