Skip to content

Commit 9f4e85c

Browse files
authored
feat: show explicit error when running maestro test on iPad (#1813)
Displays an explicit error when launching a maestro test on iPad simulators. At this time, launching maestro on iPad results in the test visibly hanging. This PR instead shows a vscode error dialog explaining that the feature is not supported at the moment, and prompting the user to switch the device in order to run the test. ### How Has This Been Tested: - select an iPad simulator - try to run a maestro test - an error should appear immediately, explaining that the test cannot be run ### How Has This Change Been Documented: Internal
1 parent 4e6ff03 commit 9f4e85c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/vscode-extension/src/project/MaestroTestRunner.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,14 @@ export class MaestroTestRunner implements Disposable {
113113
const deviceFamily = getDeviceFamily(this.device.deviceInfo);
114114
getTelemetryReporter().sendTelemetryEvent(`maestro:test_started:${deviceFamily}`);
115115

116+
if (deviceFamily === DeviceFamily.IPAD_SIMULATOR) {
117+
vscode.window.showErrorMessage(
118+
"Maestro tests are currently unsupported for iPad simulator devices. " +
119+
"Switch to a different device and run the test again."
120+
);
121+
return;
122+
}
123+
116124
const { terminal, pty } = this.getOrCreateTerminal();
117125
terminal.show(true);
118126
// For some reason the terminal isn't ready immediately and loses initial output

0 commit comments

Comments
 (0)