forked from flutter-team-archive/plugins
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathvideo_player_test.dart
More file actions
27 lines (24 loc) · 1.18 KB
/
Copy pathvideo_player_test.dart
File metadata and controls
27 lines (24 loc) · 1.18 KB
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
// Copyright 2019, the Chromium project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:async';
import 'package:flutter_driver/flutter_driver.dart';
import 'package:test/test.dart';
Future<void> main() async {
final FlutterDriver driver = await FlutterDriver.connect();
tearDownAll(() async {
driver.close();
});
//TODO(cyanglaz): Use TabBar tabs to navigate between pages after https://github.com/flutter/flutter/issues/16991 is fixed.
//TODO(cyanglaz): Un-skip the test after https://github.com/flutter/flutter/issues/43012 is fixed
test('Push a page contains video and pop back, do not crash.', () async {
final SerializableFinder pushTab = find.byValueKey('push_tab');
await driver.waitFor(pushTab);
await driver.tap(pushTab);
await driver.waitForAbsent(pushTab);
await driver.waitFor(find.byValueKey('home_page'));
await driver.waitUntilNoTransientCallbacks();
final Health health = await driver.checkHealth();
expect(health.status, HealthStatus.ok);
}, skip: 'Cirrus CI currently hangs while playing videos');
}