File tree 3 files changed +64
-28
lines changed
example/SampleProject/integration_test
3 files changed +64
-28
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Package
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+ if : contains(github.event.head_commit.message, 'release')
11
+
12
+ steps :
13
+ - uses : actions/checkout@v3
14
+ - name : Set up JDK 17
15
+ uses : actions/setup-java@v3
16
+ with :
17
+ distribution : ' zulu'
18
+ java-version : ' 17'
19
+
20
+ - name : Install Flutter
21
+ uses : subosito/flutter-action@v2
22
+ with :
23
+ channel : ' stable'
24
+
25
+ - name : Setup Pub Credentials
26
+ shell : bash
27
+ env :
28
+ PUB_DEV_PUBLISH_ACCESS_TOKEN : ${{ secrets.PUB_DEV_PUBLISH_ACCESS_TOKEN }}
29
+ PUB_DEV_PUBLISH_REFRESH_TOKEN : ${{ secrets.PUB_DEV_PUBLISH_REFRESH_TOKEN }}
30
+ PUB_DEV_PUBLISH_TOKEN_ENDPOINT : ${{ secrets.PUB_DEV_PUBLISH_TOKEN_ENDPOINT }}
31
+ PUB_DEV_PUBLISH_EXPIRATION : ${{ secrets.PUB_DEV_PUBLISH_EXPIRATION }}
32
+ run : |
33
+ sh ./pub_login.sh
34
+
35
+ - name : Check Publish Warnings
36
+ run : |
37
+ sudo cat /$HOME/.config/dart/pub-credentials.json
38
+ flutter pub publish --dry-run
39
+
40
+ - name : Publish Package
41
+ run : |
42
+ yes | flutter pub publish
Original file line number Diff line number Diff line change 1
1
2
- name : Run Test Cases And Publish Package
2
+ name : Run Test Cases
3
3
4
4
on : [pull_request]
5
5
35
35
with :
36
36
api-level : 29
37
37
script : |
38
- cd example/SampleProject && flutter test integration_test/test_conference.dart
39
38
cd example/SampleProject && flutter test integration_test/test_play.dart
40
-
41
- # Uncomment and adjust for publishing your package
42
- - name : Setup Pub Credentials
43
- shell : bash
44
- env :
45
- PUB_DEV_PUBLISH_ACCESS_TOKEN : ${{ secrets.PUB_DEV_PUBLISH_ACCESS_TOKEN }}
46
- PUB_DEV_PUBLISH_REFRESH_TOKEN : ${{ secrets.PUB_DEV_PUBLISH_REFRESH_TOKEN }}
47
- PUB_DEV_PUBLISH_TOKEN_ENDPOINT : ${{ secrets.PUB_DEV_PUBLISH_TOKEN_ENDPOINT }}
48
- PUB_DEV_PUBLISH_EXPIRATION : ${{ secrets.PUB_DEV_PUBLISH_EXPIRATION }}
49
- run : |
50
- sh ./pub_login.sh
51
-
52
- - name : Check Publish Warnings
53
- run : |
54
- sudo cat /$HOME/.config/dart/pub-credentials.json
55
- flutter pub publish --dry-run
56
-
57
- - name : Publish Package
58
- if : github.ref == 'refs/heads/master' && contains(github.event.head_commit.message, 'release')
59
- run : |
60
- yes | flutter pub publish
39
+ cd example/SampleProject && flutter test integration_test/test_conference.dart
Original file line number Diff line number Diff line change 1
1
import 'package:flutter/material.dart' ;
2
2
import 'package:flutter_test/flutter_test.dart' ;
3
+ import 'package:flutter_webrtc/flutter_webrtc.dart' ;
3
4
import 'package:integration_test/integration_test.dart' ;
4
5
import 'test_helper.dart' ;
5
6
@@ -24,11 +25,25 @@ void main() {
24
25
25
26
// Enter Room ID and tap OK.
26
27
await enterRoomId (tester, '24x7test' );
27
- await tester.pumpAndSettle (const Duration (seconds: 30 ));
28
-
29
- // Verify the content of the SnackBar.
30
- final callEndIcon = find.byIcon (Icons .call_end);
31
- await tester.tap (callEndIcon);
32
28
await tester.pumpAndSettle ();
29
+
30
+ const maxWaitTime = Duration (seconds: 120 );
31
+ final stopwatch = Stopwatch ()..start ();
32
+
33
+ while (true ) {
34
+ if (stopwatch.elapsed > maxWaitTime) {
35
+ fail ('play did not start' );
36
+ }
37
+ final callEndIcon = find.byIcon (Icons .call_end);
38
+
39
+ if (tester.any (callEndIcon)) {
40
+ await tester.tap (callEndIcon);
41
+ await tester.pumpAndSettle ();
42
+ print ("test: play started" );
43
+ break ;
44
+ }
45
+ await tester.pumpAndSettle (const Duration (seconds: 10 ));
46
+ }
33
47
});
34
48
}
49
+
You can’t perform that action at this time.
0 commit comments