Skip to content

Commit

Permalink
ci: check android a bit more (#551)
Browse files Browse the repository at this point in the history
* test: remove a space

* call getContexts
  • Loading branch information
KazuCocoa authored May 13, 2024
1 parent aef5b01 commit 70fbf85
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/functional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,20 @@ jobs:
- target: test/functional/android/webdriver/create_session_test.rb,test/functional/android/webdriver/device_test.rb,test/functional/android/webdriver/w3c_actions_test.rb
automation_name: espresso
name: test4
- target: test/functional/android/android/mobile_commands_test.rb
automation_name: uiautomator2
name: test5
- target: test/functional/android/android/mobile_commands_test.rb
automation_name: espresso
name: test6

# Some may not work well on GHA. Haven't fully fixed.
# test/functional/android/android/mjpeg_server_test.rb
# test/functional/android/android/image_comparison_test.rb
# - target: test/functional/android/android/device_data_test.rb,test/functional/android/android/mobile_commands_test.rb
# - target: test/functional/android/android/device_data_test.rb
# automation_name: uiautomator2
# name: test5
# - target: test/functional/android/android/device_data_test.rb,test/functional/android/android/mobile_commands_test.rb
# - target: test/functional/android/android/device_data_test.rb
# automation_name: espresso
# name: test6

Expand Down
2 changes: 2 additions & 0 deletions test/functional/android/android/device_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ def test_context_related
native_page = @driver.page_source

webview_context = @@core.wait do
@driver.execute_script 'mobile: getContexts', { waitForWebviewMs: 5000 }

context = @driver.available_contexts.detect { |c| c.start_with?('WEBVIEW') }
assert context
context
Expand Down
2 changes: 1 addition & 1 deletion test/functional/android/android/mobile_commands_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def test_device_info
skip_as_appium_version '1.10.0'

@driver = @core.start_driver
assert @driver.execute_script('mobile: deviceInfo', {}).size.positive?
assert @driver.execute_script('mobile:deviceInfo', {}).size.positive?
end

private
Expand Down

0 comments on commit 70fbf85

Please sign in to comment.