-
Notifications
You must be signed in to change notification settings - Fork 0
/
widget_test.dart
47 lines (39 loc) · 1.02 KB
/
widget_test.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import 'package:flutter_test/flutter_test.dart';
import 'package:patrol_finders/patrol_finders.dart';
import 'package:patrol_moon/main.dart';
const textButtonTitle = 'This is TextButton';
const moonButtonTitle = 'This is MoonButton';
void main() {
patrolWidgetTest(
'textbutton flutter test',
($) async {
await $.pumpWidgetAndSettle(const MainApp());
final button = find.text(textButtonTitle);
$.tester.tap(button);
},
);
patrolWidgetTest(
'moonbutton flutter test',
($) async {
await $.pumpWidgetAndSettle(const MainApp());
final button = find.text(moonButtonTitle);
$.tester.tap(button);
},
);
patrolWidgetTest(
'textbutton patrol',
($) async {
await $.pumpWidgetAndSettle(const MainApp());
final button = $(textButtonTitle);
button.tap();
},
);
patrolWidgetTest(
'moonbutton patrol',
($) async {
await $.pumpWidgetAndSettle(const MainApp());
final button = $(moonButtonTitle);
button.tap();
},
);
}