Skip to content

Commit 7b8f3bd

Browse files
Working on iOS GitHub CI
1 parent 0565ea5 commit 7b8f3bd

File tree

2 files changed

+26
-22
lines changed

2 files changed

+26
-22
lines changed

packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,31 @@ void main() {
1313
"home screen",
1414
appBundleId: appBundleId,
1515
deepLink: "https://deeplinks.flutterbountyhunters.com",
16+
verbose: true,
1617
(driver) async {
1718
await driver.waitFor(find.text("Home Screen"));
1819
await Future.delayed(const Duration(seconds: 3));
1920
},
2021
);
2122

22-
testDeepLinkIosAppLaunch(
23-
"sign-up screen",
24-
appBundleId: appBundleId,
25-
deepLink: "https://deeplinks.flutterbountyhunters.com/signup",
26-
(driver) async {
27-
await driver.waitFor(find.text("Sign Up"));
28-
await Future.delayed(const Duration(seconds: 3));
29-
},
30-
);
31-
32-
testDeepLinkIosAppLaunch(
33-
"profile screen",
34-
appBundleId: appBundleId,
35-
deepLink: "https://deeplinks.flutterbountyhunters.com/user/profile",
36-
(driver) async {
37-
await driver.waitFor(find.text("User Profile"));
38-
await Future.delayed(const Duration(seconds: 3));
39-
},
40-
);
23+
// testDeepLinkIosAppLaunch(
24+
// "sign-up screen",
25+
// appBundleId: appBundleId,
26+
// deepLink: "https://deeplinks.flutterbountyhunters.com/signup",
27+
// (driver) async {
28+
// await driver.waitFor(find.text("Sign Up"));
29+
// await Future.delayed(const Duration(seconds: 3));
30+
// },
31+
// );
32+
//
33+
// testDeepLinkIosAppLaunch(
34+
// "profile screen",
35+
// appBundleId: appBundleId,
36+
// deepLink: "https://deeplinks.flutterbountyhunters.com/user/profile",
37+
// (driver) async {
38+
// await driver.waitFor(find.text("User Profile"));
39+
// await Future.delayed(const Duration(seconds: 3));
40+
// },
41+
// );
4142
});
4243
}

packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ void testDeepLinkIosAppLaunch(
3030
_log.info("Running deep link test driver...");
3131

3232
// Pre-emptively the kill the app, in case it's already running.
33+
_log.info("Pre-emptively killing the app");
3334
await Xcrun.killApp(appBundleId);
3435

3536
FlutterDriver? driver;
@@ -56,7 +57,7 @@ void testDeepLinkIosAppLaunch(
5657
await Xcrun.listenToXcrunForFlutterLogs(
5758
appBundleId,
5859
onLog: (log) {
59-
_log.info(log);
60+
// _log.info(log);
6061
if (log.contains("Dart VM service")) {
6162
_log.info("Found Dart VM log:\n$log");
6263

@@ -68,7 +69,7 @@ void testDeepLinkIosAppLaunch(
6869
}
6970
},
7071
onError: (error) {
71-
_log.shout("LOGCAT ERROR:");
72+
_log.shout("iOS ERROR:");
7273
_log.shout(error);
7374
},
7475
);
@@ -90,7 +91,7 @@ void testDeepLinkIosAppLaunch(
9091
// Wait for a moment so that the app has time to start the Dart VM
9192
// service and report it in the device logs.
9293
_log.info("Waiting a moment so that app can launch the Dart VM service.");
93-
await Future.delayed(const Duration(seconds: 1));
94+
await Future.delayed(const Duration(seconds: 5));
9495

9596
// Ensure that we found the Dart VM service URL.
9697
expect(
@@ -107,10 +108,12 @@ void testDeepLinkIosAppLaunch(
107108
// Setup port forwarding between the host machine running the test, and the
108109
// Android device that's running the app, so we can talk to the Dart VM service.
109110
final port = Uri.parse(dartVmService!).port;
111+
_log.info("Forwarding simulator port: $port");
110112
await Xcrun.forwardTcpPort(port);
111113

112114
// Connect to the Dart VM service in the app with Flutter Driver.
113115
try {
116+
_log.info("Connecting to Flutter Driver extension in the Dart VM service.");
114117
driver = await FlutterDriver.connect(
115118
dartVmServiceUrl: dartVmService,
116119
);

0 commit comments

Comments
 (0)