-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathtest_play.dart
34 lines (26 loc) · 1.05 KB
/
test_play.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
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'test_helper.dart';
void main() {
// Initialize the integration test bindings.
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
testWidgets('Runs the app, taps on the settings icon, enters the URL, and runs the play example', (WidgetTester tester) async {
// Launch the app.
await launchApp(tester);
await tester.pumpAndSettle();
// Enter the server URL.
await enterServerUrl(tester, 'wss://test.antmedia.io:5443/24x7test/websocket');
await tester.pumpAndSettle();
// Tap the 'Play' button.
await tester.tap(find.text('Play'));
await tester.pumpAndSettle();
// Enter Room ID and tap OK.
await enterRoomId(tester, '24x7test');
await tester.pumpAndSettle(const Duration(seconds: 30));
// Verify the content of the SnackBar.
final callEndIcon = find.byIcon(Icons.call_end);
await tester.tap(callEndIcon);
await tester.pumpAndSettle();
});
}