Skip to content

Commit da42459

Browse files
committed
Fix failing tests
1 parent 8945b06 commit da42459

2 files changed

Lines changed: 14 additions & 26 deletions

File tree

src/mcp/tools/simulator/__tests__/boot_sim.test.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('boot_sim tool', () => {
2121

2222
it('should have correct description', () => {
2323
expect(bootSim.description).toBe(
24-
"Boots an iOS simulator. IMPORTANT: You MUST provide the simulatorUuid parameter. Example: boot_sim({ simulatorUuid: 'YOUR_UUID_HERE' })",
24+
"Boots an iOS simulator. After booting, use open_sim() to make the simulator visible. IMPORTANT: You MUST provide the simulatorUuid parameter. Example: boot_sim({ simulatorUuid: 'YOUR_UUID_HERE' })",
2525
);
2626
});
2727

@@ -57,17 +57,12 @@ describe('boot_sim tool', () => {
5757
content: [
5858
{
5959
type: 'text',
60-
text: `Simulator booted successfully. Next steps:
61-
1. Open the Simulator app: open_sim({ enabled: true })
60+
text: `✅ Simulator booted successfully. To make it visible, use: open_sim()
61+
62+
Next steps:
63+
1. Open the Simulator app (makes it visible): open_sim()
6264
2. Install an app: install_app_sim({ simulatorUuid: "test-uuid-123", appPath: "PATH_TO_YOUR_APP" })
63-
3. Launch an app: launch_app_sim({ simulatorUuid: "test-uuid-123", bundleId: "YOUR_APP_BUNDLE_ID" })
64-
4. Log capture options:
65-
- Option 1: Capture structured logs only (app continues running):
66-
start_sim_log_cap({ simulatorUuid: "test-uuid-123", bundleId: "YOUR_APP_BUNDLE_ID" })
67-
- Option 2: Capture both console and structured logs (app will restart):
68-
start_sim_log_cap({ simulatorUuid: "test-uuid-123", bundleId: "YOUR_APP_BUNDLE_ID", captureConsole: true })
69-
- Option 3: Launch app with logs in one step:
70-
launch_app_logs_sim({ simulatorUuid: "test-uuid-123", bundleId: "YOUR_APP_BUNDLE_ID" })`,
65+
3. Launch an app: launch_app_sim({ simulatorUuid: "test-uuid-123", bundleId: "YOUR_APP_BUNDLE_ID" })`,
7166
},
7267
],
7368
});

src/mcp/tools/simulator/__tests__/launch_app_sim.test.ts

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('launch_app_sim tool', () => {
1111

1212
it('should have correct description field', () => {
1313
expect(launchAppSim.description).toBe(
14-
"Launches an app in an iOS simulator. IMPORTANT: You MUST provide both the simulatorUuid and bundleId parameters.\n\nNote: You must install the app in the simulator before launching. The typical workflow is: build → install → launch. Example: launch_app_sim({ simulatorUuid: 'YOUR_UUID_HERE', bundleId: 'com.example.MyApp' })",
14+
"Launches an app in an iOS simulator. If simulator window isn't visible, use open_sim() first. IMPORTANT: You MUST provide both the simulatorUuid and bundleId parameters.\n\nNote: You must install the app in the simulator before launching. The typical workflow is: build → install → launch. Example: launch_app_sim({ simulatorUuid: 'YOUR_UUID_HERE', bundleId: 'com.example.MyApp' })",
1515
);
1616
});
1717

@@ -92,21 +92,14 @@ describe('launch_app_sim tool', () => {
9292
content: [
9393
{
9494
type: 'text',
95-
text: 'App launched successfully in simulator test-uuid-123',
96-
},
97-
{
98-
type: 'text',
99-
text: `Next Steps:
100-
1. You can now interact with the app in the simulator.
95+
text: `✅ App launched successfully in simulator test-uuid-123. If simulator window isn't visible, use: open_sim()
96+
97+
Next Steps:
98+
1. To see the simulator window (if hidden): open_sim()
10199
2. Log capture options:
102-
- Option 1: Capture structured logs only (app continues running):
103-
start_sim_log_cap({ simulatorUuid: "test-uuid-123", bundleId: "com.example.testapp" })
104-
- Option 2: Capture both console and structured logs (app will restart):
105-
start_sim_log_cap({ simulatorUuid: "test-uuid-123", bundleId: "com.example.testapp", captureConsole: true })
106-
- Option 3: Restart with logs in one step:
107-
launch_app_logs_sim({ simulatorUuid: "test-uuid-123", bundleId: "com.example.testapp" })
108-
109-
3. When done with any option, use: stop_sim_log_cap({ logSessionId: 'SESSION_ID' })`,
100+
- Capture structured logs: start_sim_log_cap({ simulatorUuid: "test-uuid-123", bundleId: "com.example.testapp" })
101+
- Capture console+structured logs: start_sim_log_cap({ simulatorUuid: "test-uuid-123", bundleId: "com.example.testapp", captureConsole: true })
102+
3. When done, use: stop_sim_log_cap({ logSessionId: 'SESSION_ID' })`,
110103
},
111104
],
112105
});

0 commit comments

Comments
 (0)