Skip to content

Commit

Permalink
Update general_test.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
josxha committed Nov 3, 2024
1 parent 64dfbc7 commit a3e4199
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions example/integration_test/general_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,58 +8,61 @@ 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,
),
),
);
await tester.pumpAndSettle();
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,
),
),
);
await tester.pumpAndSettle();
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,
),
),
);
await tester.pumpAndSettle();
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);
});
});
Expand Down

0 comments on commit a3e4199

Please sign in to comment.