Skip to content

Commit 30941ea

Browse files
committed
Fix ios command not working.
1 parent 4f9064b commit 30941ea

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/commands/ios/constants.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import inquirer from 'inquirer';
2-
import { AvailableOptions } from './interfaces';
2+
import {AvailableOptions} from './interfaces';
33

44
export const SETUP_CONFIG_QUES: inquirer.QuestionCollection = [
55
{
@@ -27,4 +27,8 @@ export const AVAILABLE_OPTIONS: AvailableOptions = {
2727
alias: ['m'],
2828
description: 'Verify/setup requirements for real-device or simulator. Available args: "real", "simulator", "both"'
2929
},
30+
appium: {
31+
alias: [],
32+
description: 'Make sure the final setup works with Appium out-of-the-box.'
33+
}
3034
};

src/commands/ios/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export class IosSetup {
3232

3333
if (this.platform !== 'mac') {
3434
Logger.log('Only macOS is supported');
35+
3536
return false;
3637
}
3738

@@ -90,7 +91,7 @@ export class IosSetup {
9091
`\nAnd then update ${colors.cyan('safari:deviceName')} (eg: 'iphone 13') and ${colors.cyan('safari:platformVersion')} (eg: '15.0') in nightwatch configuration for ${colors.gray.italic('ios.simulator.safari')} environment accordingly.`
9192
, {padding: 1}));
9293
} catch (error) {
93-
Logger.log(` ${colors.red(symbols().fail)} Xcode is not installed.`);
94+
Logger.log(` ${colors.red(symbols().ok)} Xcode is not installed.`);
9495
missingRequirements.push('Xcode is not installed')
9596
}
9697
}
@@ -113,7 +114,7 @@ export class IosSetup {
113114
}
114115
} catch (error) {
115116
Logger.log(` ${colors.red(symbols().fail)} Device is either not connected or turned off.`);
116-
missingRequirements.push('Device is not connected')
117+
missingRequirements.push('Device is not connected');
117118
}
118119
}
119120

@@ -141,7 +142,7 @@ export class IosSetup {
141142
return true;
142143
}
143144

144-
let result: IosSetupResult= {simulator: true, real: true};
145+
const result: IosSetupResult = {simulator: true, real: true};
145146

146147
if (setupConfigs.mode === 'simulator' || setupConfigs.mode === 'both') {
147148
if (missingRequirements.includes('Xcode is not installed')) {
@@ -233,11 +234,10 @@ export class IosSetup {
233234

234235
getAllAvailableOptions = () => {
235236
const mainOptions = Object.keys(AVAILABLE_OPTIONS);
236-
237+
237238
const allOptions: string[] = [];
238239
mainOptions.forEach((option) => allOptions.push(option, ...AVAILABLE_OPTIONS[option].alias));
239-
240+
240241
return allOptions;
241242
};
242-
243243
}

0 commit comments

Comments
 (0)