diff --git a/lib/commands/device/emulator-console.js b/lib/commands/device/emulator-console.js index 79d0d085..33bc14ce 100644 --- a/lib/commands/device/emulator-console.js +++ b/lib/commands/device/emulator-console.js @@ -8,7 +8,7 @@ const EMU_CONSOLE_FEATURE = 'emulator_console'; * @returns {Promise} */ export async function mobileExecEmuConsoleCommand(opts) { - this.ensureFeatureEnabled(EMU_CONSOLE_FEATURE); + this.assertFeatureEnabled(EMU_CONSOLE_FEATURE); const {command, execTimeout, connTimeout, initTimeout} = opts; diff --git a/lib/commands/log.js b/lib/commands/log.js index 5482a375..20a5ae38 100644 --- a/lib/commands/log.js +++ b/lib/commands/log.js @@ -42,7 +42,7 @@ export const supportedLogTypes = { * @returns */ getter: (self) => { - self.ensureFeatureEnabled(GET_SERVER_LOGS_FEATURE); + self.assertFeatureEnabled(GET_SERVER_LOGS_FEATURE); return self.log.unwrap().record.map(nativeLogEntryToSeleniumEntry); }, }, diff --git a/lib/commands/permissions.js b/lib/commands/permissions.js index 2bf1bd10..4094f865 100644 --- a/lib/commands/permissions.js +++ b/lib/commands/permissions.js @@ -49,7 +49,7 @@ export async function mobileChangePermissions(opts) { case PERMISSION_TARGET.PM: return await changePermissionsViaPm.bind(this)(permissions, appPackage, _.toLower(action)); case PERMISSION_TARGET.APPOPS: - this.ensureFeatureEnabled(ADB_SHELL_FEATURE); + this.assertFeatureEnabled(ADB_SHELL_FEATURE); return await changePermissionsViaAppops.bind(this)( permissions, appPackage, diff --git a/lib/commands/shell.js b/lib/commands/shell.js index 8c3fa0f9..bbbef6b7 100644 --- a/lib/commands/shell.js +++ b/lib/commands/shell.js @@ -10,7 +10,7 @@ import {ADB_SHELL_FEATURE} from '../utils'; * @returns {Promise}; */ export async function mobileShell(opts) { - this.ensureFeatureEnabled(ADB_SHELL_FEATURE); + this.assertFeatureEnabled(ADB_SHELL_FEATURE); const {command, args = /** @type {string[]} */ ([]), timeout = 20000, includeStderr} = opts ?? {}; if (!_.isString(command)) { diff --git a/lib/commands/streamscreen.js b/lib/commands/streamscreen.js index 0d5d21fd..6a88740d 100644 --- a/lib/commands/streamscreen.js +++ b/lib/commands/streamscreen.js @@ -39,7 +39,7 @@ const ADB_SCREEN_STREAMING_FEATURE = 'adb_screen_streaming'; * @returns {Promise} */ export async function mobileStartScreenStreaming(options = {}) { - this.ensureFeatureEnabled(ADB_SCREEN_STREAMING_FEATURE); + this.assertFeatureEnabled(ADB_SCREEN_STREAMING_FEATURE); const { width,