From 9c3bb77cb0ea3168f80e0db3161d70ed73873638 Mon Sep 17 00:00:00 2001 From: mwakizaka <21286384+mwakizaka@users.noreply.github.com> Date: Wed, 5 Jun 2024 15:53:09 +0900 Subject: [PATCH] fix: system prompt for Apple ID sign in unexpectedly not translated (#431) * fix: system prompt for Apple ID sign in unexpectedly not translated * fix: unit test --- lib/extensions/settings.js | 3 ++- test/unit/simulator-specs.js | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/extensions/settings.js b/lib/extensions/settings.js index a9296e65..2088deda 100644 --- a/lib/extensions/settings.js +++ b/lib/extensions/settings.js @@ -10,7 +10,8 @@ import { fs } from '@appium/support'; // com.apple.SpringBoard: translates com.apple.SpringBoard and system prompts for push notification // com.apple.locationd: translates system prompts for location // com.apple.tccd: translates system prompts for camera, microphone, contact, photos and app tracking transparency -const SERVICES_FOR_TRANSLATION = ['com.apple.SpringBoard', 'com.apple.locationd', 'com.apple.tccd']; +// com.apple.akd: translates `Sign in with your Apple ID` system prompt +const SERVICES_FOR_TRANSLATION = ['com.apple.SpringBoard', 'com.apple.locationd', 'com.apple.tccd', 'com.apple.akd']; const GLOBAL_PREFS_PLIST = '.GlobalPreferences.plist'; const PREFERENCES_PLIST_GUARD = new AsyncLock(); const DOMAIN = /** @type {const} */ Object.freeze({ diff --git a/test/unit/simulator-specs.js b/test/unit/simulator-specs.js index d48a71ba..68a9a6dd 100644 --- a/test/unit/simulator-specs.js +++ b/test/unit/simulator-specs.js @@ -209,7 +209,10 @@ launchd_s 35621 mwakizaka 16u unix 0x7b7dbedd6d62e84f 0t0 /private/ spawnProcessSpy.getCall(3).args[0].should.eql( ['launchctl', 'stop', 'com.apple.tccd'] ); - spawnProcessSpy.callCount.should.eql(4); + spawnProcessSpy.getCall(4).args[0].should.eql( + ['launchctl', 'stop', 'com.apple.akd'] + ); + spawnProcessSpy.callCount.should.eql(5); }); it('should confirm skip restarting services if already applied', async function () {