Showing
1 changed file
with
28 additions
and
0 deletions
test/bottomsheet_test.dart
0 → 100644
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_test/flutter_test.dart'; | ||
| 3 | +import 'package:get/get.dart'; | ||
| 4 | + | ||
| 5 | +import 'util/wrapper.dart'; | ||
| 6 | + | ||
| 7 | +void main() { | ||
| 8 | + testWidgets("Get.bottomSheet smoke test", (tester) async { | ||
| 9 | + await tester.pumpWidget( | ||
| 10 | + Wrapper(child: Container()), | ||
| 11 | + ); | ||
| 12 | + | ||
| 13 | + Get.bottomSheet(Container( | ||
| 14 | + child: Wrap( | ||
| 15 | + children: <Widget>[ | ||
| 16 | + ListTile( | ||
| 17 | + leading: Icon(Icons.music_note), | ||
| 18 | + title: Text('Music'), | ||
| 19 | + onTap: () => {}), | ||
| 20 | + ], | ||
| 21 | + ), | ||
| 22 | + )); | ||
| 23 | + | ||
| 24 | + await tester.pumpAndSettle(); | ||
| 25 | + | ||
| 26 | + expect(find.byIcon(Icons.music_note), findsOneWidget); | ||
| 27 | + }); | ||
| 28 | +} |
-
Please register or login to post a comment