|
1 | 1 | import 'dart:io';
|
2 | 2 |
|
| 3 | +import 'package:flutter_test_runners/flutter_test_runners.dart'; |
3 | 4 | import 'package:test/test.dart';
|
4 | 5 |
|
5 | 6 | void main() {
|
@@ -44,90 +45,90 @@ void main() {
|
44 | 45 | // print("The xcrun call returned with exit code: ${result.exitCode}");
|
45 | 46 | // });
|
46 | 47 |
|
47 |
| - test("Send terminate command to simulator", () async { |
48 |
| - print("Running device list command:"); |
49 |
| - final result1 = await Process.run( |
50 |
| - "sh", |
51 |
| - [ |
52 |
| - "-c", |
53 |
| - "xcrun simctl list", |
54 |
| - ], |
55 |
| - ); |
56 |
| - print("result1: ${result1.exitCode}"); |
57 |
| - print(""); |
58 |
| - |
59 |
| - print("Running get_app_container command:"); |
60 |
| - final result2 = await Process.run( |
61 |
| - "sh", |
62 |
| - [ |
63 |
| - "-c", |
64 |
| - "xcrun simctl get_app_container booted com.flutterbountyhunters.deeplinks.example", |
65 |
| - ], |
66 |
| - ); |
67 |
| - print("result2: ${result2.exitCode}"); |
68 |
| - print(""); |
69 |
| - |
70 |
| - //-------- |
71 |
| - print("Sending xcrun simctl terminate command..."); |
72 |
| - |
73 |
| - // CI Timeout |
74 |
| - // final process = await Process.start( |
75 |
| - // "xcrun", |
76 |
| - // ["simctl", "terminate", "booted", "'$appBundleId'"], |
77 |
| - // runInShell: true, |
78 |
| - // ); |
79 |
| - |
80 |
| - // CI Timeout |
81 |
| - // final process = await Process.start( |
82 |
| - // "xcrun", |
83 |
| - // ["simctl", "terminate", "booted", "'$appBundleId'"], |
84 |
| - // ); |
85 |
| - |
86 |
| - // CI Timeout |
87 |
| - // final process = await Process.start( |
88 |
| - // "sh", |
89 |
| - // ["-c", "xcrun simctl terminate booted '$appBundleId'"], |
90 |
| - // ); |
91 |
| - // |
92 |
| - // CI Timeout |
93 |
| - // final result = await Process.run( |
94 |
| - // "sh", |
95 |
| - // ["-c", "xcrun simctl terminate booted '$appBundleId'"], |
96 |
| - // ); |
97 |
| - // print("Exit code: ${result.exitCode}"); |
98 |
| - |
99 |
| - // CI Timeout |
100 |
| - // final script = ''' |
101 |
| - // #!/bin/bash |
102 |
| - // xcrun simctl terminate booted $appBundleId |
103 |
| - // '''; |
104 |
| - // final tempFile = File('/tmp/temp_script.sh'); |
105 |
| - // await tempFile.writeAsString(script); |
106 |
| - // await Process.run('chmod', ['+x', tempFile.path]); |
107 |
| - // final process = await Process.start('/bin/bash', [tempFile.path]); |
108 |
| - // |
109 |
| - // print("terminate command process was started"); |
110 |
| - // |
111 |
| - // process.stdin.close(); |
112 |
| - // |
113 |
| - // stdout.addStream(process.stdout); |
114 |
| - // stderr.addStream(process.stderr); |
115 |
| - // |
116 |
| - // print("Waiting for exit code..."); |
117 |
| - // final exitCode = await process.exitCode; |
118 |
| - // print("Killed app - exit code: $exitCode"); |
119 |
| - }); |
| 48 | + // test("Send terminate command to simulator", () async { |
| 49 | + // print("Running device list command:"); |
| 50 | + // final result1 = await Process.run( |
| 51 | + // "sh", |
| 52 | + // [ |
| 53 | + // "-c", |
| 54 | + // "xcrun simctl list", |
| 55 | + // ], |
| 56 | + // ); |
| 57 | + // print("result1: ${result1.exitCode}"); |
| 58 | + // print(""); |
| 59 | + // |
| 60 | + // print("Running get_app_container command:"); |
| 61 | + // final result2 = await Process.run( |
| 62 | + // "sh", |
| 63 | + // [ |
| 64 | + // "-c", |
| 65 | + // "xcrun simctl get_app_container booted com.flutterbountyhunters.deeplinks.example", |
| 66 | + // ], |
| 67 | + // ); |
| 68 | + // print("result2: ${result2.exitCode}"); |
| 69 | + // print(""); |
| 70 | + // |
| 71 | + // //-------- |
| 72 | + // print("Sending xcrun simctl terminate command..."); |
| 73 | + // |
| 74 | + // // CI Timeout |
| 75 | + // // final process = await Process.start( |
| 76 | + // // "xcrun", |
| 77 | + // // ["simctl", "terminate", "booted", "'$appBundleId'"], |
| 78 | + // // runInShell: true, |
| 79 | + // // ); |
| 80 | + // |
| 81 | + // // CI Timeout |
| 82 | + // // final process = await Process.start( |
| 83 | + // // "xcrun", |
| 84 | + // // ["simctl", "terminate", "booted", "'$appBundleId'"], |
| 85 | + // // ); |
| 86 | + // |
| 87 | + // // CI Timeout |
| 88 | + // // final process = await Process.start( |
| 89 | + // // "sh", |
| 90 | + // // ["-c", "xcrun simctl terminate booted '$appBundleId'"], |
| 91 | + // // ); |
| 92 | + // // |
| 93 | + // // CI Timeout |
| 94 | + // // final result = await Process.run( |
| 95 | + // // "sh", |
| 96 | + // // ["-c", "xcrun simctl terminate booted '$appBundleId'"], |
| 97 | + // // ); |
| 98 | + // // print("Exit code: ${result.exitCode}"); |
| 99 | + // |
| 100 | + // // CI Timeout |
| 101 | + // // final script = ''' |
| 102 | + // // #!/bin/bash |
| 103 | + // // xcrun simctl terminate booted $appBundleId |
| 104 | + // // '''; |
| 105 | + // // final tempFile = File('/tmp/temp_script.sh'); |
| 106 | + // // await tempFile.writeAsString(script); |
| 107 | + // // await Process.run('chmod', ['+x', tempFile.path]); |
| 108 | + // // final process = await Process.start('/bin/bash', [tempFile.path]); |
| 109 | + // // |
| 110 | + // // print("terminate command process was started"); |
| 111 | + // // |
| 112 | + // // process.stdin.close(); |
| 113 | + // // |
| 114 | + // // stdout.addStream(process.stdout); |
| 115 | + // // stderr.addStream(process.stderr); |
| 116 | + // // |
| 117 | + // // print("Waiting for exit code..."); |
| 118 | + // // final exitCode = await process.exitCode; |
| 119 | + // // print("Killed app - exit code: $exitCode"); |
| 120 | + // }); |
120 | 121 |
|
121 |
| - // testDeepLinkIosAppLaunch( |
122 |
| - // "home screen", |
123 |
| - // appBundleId: appBundleId, |
124 |
| - // deepLink: "https://deeplinks.flutterbountyhunters.com", |
125 |
| - // verbose: true, |
126 |
| - // (driver) async { |
127 |
| - // await driver.waitFor(find.text("Home Screen")); |
128 |
| - // await Future.delayed(const Duration(seconds: 3)); |
129 |
| - // }, |
130 |
| - // ); |
| 122 | + testDeepLinkIosAppLaunch( |
| 123 | + "home screen", |
| 124 | + appBundleId: appBundleId, |
| 125 | + deepLink: "https://deeplinks.flutterbountyhunters.com", |
| 126 | + verbose: true, |
| 127 | + (driver) async { |
| 128 | + await driver.waitFor(find.text("Home Screen")); |
| 129 | + await Future.delayed(const Duration(seconds: 3)); |
| 130 | + }, |
| 131 | + ); |
131 | 132 |
|
132 | 133 | // testDeepLinkIosAppLaunch(
|
133 | 134 | // "sign-up screen",
|
|
0 commit comments