From 7858760365734c9edf0f981808cd85b3f7e80436 Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Thu, 17 Aug 2023 01:11:30 -0700 Subject: [PATCH] fix: calls this.settings in settings handling (#901) --- lib/commands/general.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/commands/general.js b/lib/commands/general.js index 97947c2d..c1ea0d9a 100644 --- a/lib/commands/general.js +++ b/lib/commands/general.js @@ -322,11 +322,14 @@ commands.mobileClickAction = async function mobileClickAction (opts = {}) { }; commands.updateSettings = async function updateSettings (settings) { - return await this.espresso.jwproxy.command(`/appium/settings`, 'POST', { settings }); + await this.settings.update(settings); + await this.espresso.jwproxy.command(`/appium/settings`, 'POST', { settings }); }; commands.getSettings = async function getSettings () { - return await this.espresso.jwproxy.command(`/appium/settings`, 'GET'); + const driverSettings = this.settings.getSettings(); + const serverSettings = await this.espresso.jwproxy.command(`/appium/settings`, 'GET'); + return {...driverSettings, ...serverSettings}; }; // Stop proxying to any Chromedriver and redirect to Espresso