From a47aab2636c06a0ea1ff82db88317d99fb78a0cd Mon Sep 17 00:00:00 2001 From: RuiAlonso Date: Fri, 11 Mar 2022 20:34:03 +0100 Subject: [PATCH] test: tests for ramps check childrens --- test/game/components/jetpack_ramp_test.dart | 7 +++++-- test/game/components/sparky_ramp_test.dart | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/test/game/components/jetpack_ramp_test.dart b/test/game/components/jetpack_ramp_test.dart index 619fb8cd..6d769812 100644 --- a/test/game/components/jetpack_ramp_test.dart +++ b/test/game/components/jetpack_ramp_test.dart @@ -24,7 +24,9 @@ void main() { ); await game.ready(); await game.ensureAdd(jetpackRamp); - game.contains(jetpackRamp); + + final pathways = game.children.whereType().toList(); + expect(pathways.length, 1); }, ); @@ -37,7 +39,8 @@ void main() { await game.ready(); await game.ensureAdd(jetpackRamp); - game.contains(jetpackRamp); + final rampAreas = game.children.whereType().toList(); + expect(rampAreas.length, 2); }, ); diff --git a/test/game/components/sparky_ramp_test.dart b/test/game/components/sparky_ramp_test.dart index f0671643..e82190a4 100644 --- a/test/game/components/sparky_ramp_test.dart +++ b/test/game/components/sparky_ramp_test.dart @@ -24,7 +24,9 @@ void main() { ); await game.ready(); await game.ensureAdd(sparkyRamp); - game.contains(sparkyRamp); + + final pathways = game.children.whereType().toList(); + expect(pathways.length, 1); }, ); @@ -37,7 +39,8 @@ void main() { await game.ready(); await game.ensureAdd(sparkyRamp); - game.contains(sparkyRamp); + final rampAreas = game.children.whereType().toList(); + expect(rampAreas.length, 2); }, );