File tree Expand file tree Collapse file tree 1 file changed +4
-29
lines changed Expand file tree Collapse file tree 1 file changed +4
-29
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,7 @@ void main() {
36
36
theme: kThemeDataLight,
37
37
home: Scaffold (
38
38
body: SendRequestButton (
39
- selectedId: '1' ,
40
- sentRequestId: null ,
39
+ isWorking: false ,
41
40
onTap: () {
42
41
changedValue = 'Send' ;
43
42
},
@@ -55,40 +54,16 @@ void main() {
55
54
expect (changedValue, 'Send' );
56
55
});
57
56
58
- testWidgets ('Testing for Send Request button when sentRequestId is not null' ,
57
+ testWidgets (
58
+ 'Testing for Send Request button when RequestModel is viewed and is waiting for response' ,
59
59
(tester) async {
60
60
await tester.pumpWidget (
61
61
MaterialApp (
62
62
title: 'Send Request button' ,
63
63
theme: kThemeDataLight,
64
64
home: Scaffold (
65
65
body: SendRequestButton (
66
- selectedId: '1' ,
67
- sentRequestId: '2' ,
68
- onTap: () {},
69
- ),
70
- ),
71
- ),
72
- );
73
-
74
- expect (find.byIcon (Icons .send), findsNothing);
75
- expect (find.text (kLabelBusy), findsOneWidget);
76
- final button1 = find.byType (FilledButton );
77
- expect (button1, findsOneWidget);
78
-
79
- expect (tester.widget <FilledButton >(button1).enabled, isFalse);
80
- });
81
-
82
- testWidgets ('Testing for Send Request button when sentRequestId = selectedId' ,
83
- (tester) async {
84
- await tester.pumpWidget (
85
- MaterialApp (
86
- title: 'Send Request button' ,
87
- theme: kThemeDataLight,
88
- home: Scaffold (
89
- body: SendRequestButton (
90
- selectedId: '1' ,
91
- sentRequestId: '1' ,
66
+ isWorking: true ,
92
67
onTap: () {},
93
68
),
94
69
),
You can’t perform that action at this time.
0 commit comments