From a3e419913a53447ae0de25222930ee610dd207d0 Mon Sep 17 00:00:00 2001 From: Joscha <34318751+josxha@users.noreply.github.com> Date: Mon, 4 Nov 2024 00:02:41 +0100 Subject: [PATCH] Update general_test.dart --- example/integration_test/general_test.dart | 25 ++++++++++++---------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/example/integration_test/general_test.dart b/example/integration_test/general_test.dart index 768bcee8..1471c224 100644 --- a/example/integration_test/general_test.dart +++ b/example/integration_test/general_test.dart @@ -8,12 +8,17 @@ void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); group('General', () { testWidgets('render map with tlhc_vd', (tester) async { + await tester.pumpWidget(const App()); + await tester.pumpAndSettle(); + expect(tester.allWidgets.any((w) => w is MapLibreMap), isTrue); + }); + + testWidgets('render map with tlhc_hc', (tester) async { await tester.pumpWidget( App( options: MapOptions( initCenter: Position(0, 0), - // ignore: avoid_redundant_argument_values - androidMode: AndroidPlatformViewMode.tlhc_vd, + androidMode: AndroidPlatformViewMode.tlhc_hc, ), ), ); @@ -21,13 +26,12 @@ void main() { expect(tester.allWidgets.any((w) => w is MapLibreMap), isTrue); }); - testWidgets('render map with tlhc_hc', (tester) async { + testWidgets('render map with hc', (tester) async { await tester.pumpWidget( App( options: MapOptions( initCenter: Position(0, 0), - // ignore: avoid_redundant_argument_values - androidMode: AndroidPlatformViewMode.tlhc_hc, + androidMode: AndroidPlatformViewMode.hc, ), ), ); @@ -35,13 +39,12 @@ void main() { expect(tester.allWidgets.any((w) => w is MapLibreMap), isTrue); }); - testWidgets('render map with hc', (tester) async { + testWidgets('render map with vd', (tester) async { await tester.pumpWidget( App( options: MapOptions( initCenter: Position(0, 0), - // ignore: avoid_redundant_argument_values - androidMode: AndroidPlatformViewMode.hc, + androidMode: AndroidPlatformViewMode.vd, ), ), ); @@ -49,17 +52,17 @@ void main() { expect(tester.allWidgets.any((w) => w is MapLibreMap), isTrue); }); - testWidgets('render map with vd', (tester) async { + testWidgets('update map options', (tester) async { await tester.pumpWidget( App( options: MapOptions( initCenter: Position(0, 0), - // ignore: avoid_redundant_argument_values - androidMode: AndroidPlatformViewMode.vd, ), ), ); await tester.pumpAndSettle(); + await tester.pump(); + // TODO: better checks expect(tester.allWidgets.any((w) => w is MapLibreMap), isTrue); }); });