File tree Expand file tree Collapse file tree 2 files changed +30
-5
lines changed
video_player_avfoundation/example/integration_test
video_player/example/integration_test Expand file tree Collapse file tree 2 files changed +30
-5
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,17 @@ void main() {
102
102
},
103
103
);
104
104
105
+ testWidgets (
106
+ 'can seek to end' ,
107
+ (WidgetTester tester) async {
108
+ await controller.initialize ();
109
+
110
+ await controller.seekTo (controller.value.duration);
111
+
112
+ expect (controller.value.duration, controller.value.position);
113
+ },
114
+ );
115
+
105
116
testWidgets (
106
117
'can be paused' ,
107
118
(WidgetTester tester) async {
Original file line number Diff line number Diff line change @@ -71,13 +71,27 @@ void main() {
71
71
expect (await controller.position, greaterThan (Duration .zero));
72
72
});
73
73
74
- testWidgets ('can seek' , (WidgetTester tester) async {
75
- await controller.initialize ();
74
+ testWidgets (
75
+ 'can seek' ,
76
+ (WidgetTester tester) async {
77
+ await controller.initialize ();
76
78
77
- await controller.seekTo (const Duration (seconds: 3 ));
79
+ await controller.seekTo (const Duration (seconds: 3 ));
78
80
79
- expect (await controller.position, const Duration (seconds: 3 ));
80
- });
81
+ expect (controller.value.position, const Duration (seconds: 3 ));
82
+ },
83
+ );
84
+
85
+ testWidgets (
86
+ 'can seek to end' ,
87
+ (WidgetTester tester) async {
88
+ await controller.initialize ();
89
+
90
+ await controller.seekTo (controller.value.duration);
91
+
92
+ expect (controller.value.duration, controller.value.position);
93
+ },
94
+ );
81
95
82
96
testWidgets ('can be paused' , (WidgetTester tester) async {
83
97
await controller.initialize ();
You can’t perform that action at this time.
0 commit comments