Skip to content

Commit f95a17d

Browse files
khanhdodangKazuCocoa
authored andcommitted
Fixed typo signalStrengh (#196)
* Fixed typo signalStrengh * Update signalStrengh * Added backwards compatible * Fixed "Indent the right brace the same as the first position after the preceding left parenthesis." * Fixed long line * Fixed unittest
1 parent 253c92e commit f95a17d

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

lib/appium_lib_core/android/device/emulator.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def gsm_call(phone_number:, action:)
119119
def gsm_signal(signal_strength)
120120
raise "#{signal_strength} should be member of #{GSM_SIGNALS} " if GSM_SIGNALS[signal_strength.to_sym].nil?
121121

122-
execute(:gsm_signal, {}, { signalStrengh: GSM_SIGNALS[signal_strength] })
122+
execute(:gsm_signal, {}, { signalStrength: GSM_SIGNALS[signal_strength],
123+
signalStrengh: GSM_SIGNALS[signal_strength] })
123124
end
124125
end
125126

test/unit/android/device/mjsonwp/commands_test.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,8 @@ def test_gsm_call
339339

340340
def test_gsm_signal
341341
stub_request(:post, "#{SESSION}/appium/device/gsm_signal")
342-
.with(body: { signalStrengh: ::Appium::Core::Android::Device::Emulator::GSM_SIGNALS[:good] }.to_json)
342+
.with(body: { signalStrength: ::Appium::Core::Android::Device::Emulator::GSM_SIGNALS[:good],
343+
signalStrengh: ::Appium::Core::Android::Device::Emulator::GSM_SIGNALS[:good] }.to_json)
343344
.to_return(headers: HEADER, status: 200, body: { value: '' }.to_json)
344345

345346
@driver.gsm_signal :good

test/unit/android/device/w3c/commands_test.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,8 @@ def test_gsm_call
340340

341341
def test_gsm_signal
342342
stub_request(:post, "#{SESSION}/appium/device/gsm_signal")
343-
.with(body: { signalStrengh: ::Appium::Core::Android::Device::Emulator::GSM_SIGNALS[:good] }.to_json)
343+
.with(body: { signalStrength: ::Appium::Core::Android::Device::Emulator::GSM_SIGNALS[:good],
344+
signalStrengh: ::Appium::Core::Android::Device::Emulator::GSM_SIGNALS[:good] }.to_json)
344345
.to_return(headers: HEADER, status: 200, body: { value: '' }.to_json)
345346

346347
@driver.gsm_signal :good

test/unit/script/test_routes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ const METHOD_MAP = {
341341
POST: {command: 'gsmCall', payloadParams: {required: ['phoneNumber', 'action']}}
342342
},
343343
'/wd/hub/session/:sessionId/appium/device/gsm_signal': {
344-
POST: {command: 'gsmSignal', payloadParams: {required: ['signalStrengh']}}
344+
POST: {command: 'gsmSignal', payloadParams: {required: ['signalStrength']}}
345345
},
346346
'/wd/hub/session/:sessionId/appium/device/gsm_voice': {
347347
POST: {command: 'gsmVoice', payloadParams: {required: ['state']}}

0 commit comments

Comments
 (0)