appium_lib 15.2.0 → 15.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f88a026a704b43d222f8d8bf91db42122ff2980d5035aa392ab4071713806d7f
4
- data.tar.gz: 8d7dd97d70126fe283dc11d60a215301119f9463d2a90e03df701bf547ac9b78
3
+ metadata.gz: a0bfdc2987c36a4f05fe4f64017e6928aac4e418aeaabbf02499ecf8fd353c6a
4
+ data.tar.gz: 7955dffc472ed16de2d1f763be2c18c607444543ac92d3d6e5c219a81f2d6676
5
5
  SHA512:
6
- metadata.gz: eb4fd237d52479e5209a04198184b280fc818bcca6a3e1f7c4498207229d4672cd78241b676aa266c076418f5885510c46fe02c5259aa7a9e11612bef111c77e
7
- data.tar.gz: 7995667f533503dbc6e48d09bce54596ee771cab6675b6d3ea64d38f709310527a075fdf54e48505a095ac52151d641f2fdfe49ff78a8a6487951484faab7d83
6
+ metadata.gz: 35a484c99f93a7f2462eb67c2dbdf91875b8d0a122d27232700e8fd68f62ef4d473a6bee769d8d580c54f7c21d2c63dbd08c6bd23f28b1eb3eb412203c411332
7
+ data.tar.gz: 43803e6084b7bffb9fc1282acef6429829a7019e323f9887176d1534809d458525bbf30ccbb8967ca3b8da8876ff64e0f868a614041d7b3b297ee24bfabc3191
@@ -0,0 +1,77 @@
1
+ name: Functional Tests
2
+
3
+ on:
4
+ # Run by manual at this time
5
+ workflow_dispatch:
6
+ push:
7
+ branches: [ master ]
8
+ pull_request:
9
+ branches: [ master ]
10
+
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ jobs:
16
+ ios_test:
17
+ runs-on: macos-14
18
+ env:
19
+ XCODE_VERSION: 15.3
20
+ IOS_VERSION: 17.4
21
+ IOS_DEVICE_NAME: iPhone 15 Plus
22
+
23
+ steps:
24
+ - uses: actions/checkout@v3
25
+
26
+ - name: Install Node.js
27
+ uses: actions/setup-node@v3
28
+ with:
29
+ node-version: 'lts/*'
30
+
31
+ - name: Select Xcode
32
+ uses: maxim-lobanov/setup-xcode@v1
33
+ with:
34
+ xcode-version: ${{ env.XCODE_VERSION }}
35
+ - run: defaults write com.apple.iphonesimulator PasteboardAutomaticSync -bool false
36
+
37
+ - uses: futureware-tech/simulator-action@v3
38
+ with:
39
+ # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md
40
+ model: ${{ env.IOS_DEVICE_NAME }}
41
+ os_version: ${{ env.IOS_VERSION }}
42
+
43
+ - name: Preparing other environment
44
+ run: |
45
+ brew install ffmpeg
46
+ brew tap wix/brew
47
+ brew install applesimutils
48
+
49
+ # Start Appium
50
+ - name: Install appium and mjpeg-consumer
51
+ run: |
52
+ npm install -g appium
53
+ npm install -g mjpeg-consumer
54
+ - run: |
55
+ appium driver install xcuitest
56
+ appium plugin install images@2.1.8
57
+ appium plugin install execute-driver
58
+ nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors --base-path=/wd/hub > appium.log &
59
+
60
+ - name: Set up Ruby
61
+ uses: ruby/setup-ruby@v1
62
+ with:
63
+ ruby-version: 3.2
64
+ - run: |
65
+ bundle install
66
+ rake ios
67
+ name: Run tests
68
+ working-directory: ios_tests
69
+
70
+ - name: Save server output
71
+ if: ${{ always() }}
72
+ uses: actions/upload-artifact@master
73
+ with:
74
+ name: appium-ios_test_with_other_deps.log
75
+ path: |
76
+ appium.log
77
+ test/report/
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.6
2
+ TargetRubyVersion: 3.0
3
3
  Metrics/LineLength:
4
4
  Max: 128
5
5
  Metrics/MethodLength:
data/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@ Commit based release not is [release_notes.md](./release_notes.md)
3
3
 
4
4
  Release tags are https://github.com/appium/ruby_lib/releases .
5
5
 
6
+ ## 15.2.2 - 2024-08-06
7
+ - Fix non `app` capability behavior
8
+
9
+ ## 15.2.1 - 2024-08-03
10
+ - Fix client side timeout in the default http client
11
+ - Bump appium_lib_core 9.2.1+ to apply the fix
12
+
6
13
  ## 15.2.0 - 2024-07-20
7
14
  - Raise defined errors instead of Ruby general errors by appium_lib's own errors
8
15
 
data/appium_lib.gemspec CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
  s.homepage = 'https://github.com/appium/ruby_lib' # published as appium_lib
14
14
  s.require_paths = ['lib']
15
15
 
16
- s.add_runtime_dependency 'appium_lib_core', '~> 9.0'
16
+ s.add_runtime_dependency 'appium_lib_core', '~> 9.2', '>= 9.2.1'
17
17
  s.add_runtime_dependency 'nokogiri', '~> 1.8', '>= 1.8.1'
18
18
  s.add_runtime_dependency 'tomlrb', '>= 1.1', '< 3.0'
19
19
 
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  s.add_development_dependency 'minitest-reporters', '~> 1.1'
25
25
  s.add_development_dependency 'pry'
26
26
  s.add_development_dependency 'rake', '~> 13.0'
27
- s.add_development_dependency 'rubocop', '1.65.0'
27
+ s.add_development_dependency 'rubocop', '1.65.1'
28
28
  s.add_development_dependency 'yard', '~> 0.9.11'
29
29
 
30
30
  s.files = `git ls-files`.split("\n").reject { |v| v.match(/\A^(ios_tests|android_tests|grid|test_apps)\/.+/) }
@@ -40,6 +40,26 @@ require 'uri'
40
40
 
41
41
  module Appium
42
42
  class Driver
43
+ # @private
44
+ class << self
45
+ def convert_to_symbol(value)
46
+ if value.nil?
47
+ value
48
+ else
49
+ value.to_sym
50
+ end
51
+ end
52
+
53
+ # @private
54
+ def get_cap(caps, name)
55
+ name_with_prefix = "#{::Appium::Core::Base::Bridge::APPIUM_PREFIX}#{name}"
56
+ caps[convert_to_symbol name] ||
57
+ caps[name] ||
58
+ caps[convert_to_symbol name_with_prefix] ||
59
+ caps[name_with_prefix]
60
+ end
61
+ end
62
+
43
63
  # attr readers are promoted to global scope. To avoid clobbering, they're
44
64
  # made available via the driver_attributes method
45
65
  #
@@ -248,15 +268,11 @@ module Appium
248
268
  return unless @core.caps
249
269
 
250
270
  # return the path exists on the local
251
- return if @core.caps['app'] && !@core.caps['app'].nil? && File.exist?(@core.caps['app'])
252
- return if @core.caps[:app] && !@core.caps[:app].nil? && File.exist?(@core.caps[:app])
253
-
254
- # The app file is not exact path
255
- if !@core.caps['app'].nil?
256
- @core.caps['app'] = self.class.absolute_app_path opts
257
- elsif !@core.caps[:app].nil?
258
- @core.caps[:app] = self.class.absolute_app_path opts
259
- end
271
+ app_path = Driver.get_cap(@core.caps, 'app')
272
+ return if app_path.nil?
273
+ return if File.exist?(app_path)
274
+
275
+ @core.caps['app'] = self.class.absolute_app_path opts
260
276
  end
261
277
 
262
278
  # @private
@@ -386,9 +402,8 @@ module Appium
386
402
  def self.absolute_app_path(opts)
387
403
  raise ArgumentError, 'opts must be a hash' unless opts.is_a? Hash
388
404
 
389
- # FIXME: 'caps' and 'app' will be correct
390
- caps = opts[:caps] || opts['caps'] || {}
391
- app_path = caps[:app] || caps['app']
405
+ caps = opts[:caps] || opts['caps'] || {}
406
+ app_path = get_cap(caps, 'app')
392
407
  raise ArgumentError, 'absolute_app_path invoked and app is not set!' if app_path.nil? || app_path.empty?
393
408
  # Sauce storage API. http://saucelabs.com/docs/rest#storage
394
409
  return app_path if app_path.start_with? 'sauce-storage:'
@@ -521,8 +536,11 @@ module Appium
521
536
  # @option http_client_ops [Hash] :open_timeout Custom open timeout for http client.
522
537
  # @option http_client_ops [Hash] :read_timeout Custom read timeout for http client.
523
538
  # @return [Selenium::WebDriver] the new global driver
524
- def start_driver(http_client_ops =
525
- { http_client: ::Appium::Http::Default.new, open_timeout: 999_999, read_timeout: 999_999 })
539
+ def start_driver(http_client_ops = { http_client: nil, open_timeout: 999_999, read_timeout: 999_999 })
540
+ if http_client_ops[:http_client].nil?
541
+ http_client = ::Appium::Http::Default.new(open_timeout: http_client_ops[:open_timeout],
542
+ read_timeout: http_client_ops[:read_timeout])
543
+ end
526
544
 
527
545
  # TODO: do not kill the previous session in the future version.
528
546
  if $driver.nil?
@@ -535,7 +553,12 @@ module Appium
535
553
  # starting driver.
536
554
  automation_name = @core.automation_name
537
555
 
538
- @driver = @core.start_driver(server_url: server_url, http_client_ops: http_client_ops)
556
+ @driver = @core.start_driver(server_url: server_url,
557
+ http_client_ops: {
558
+ http_client: http_client,
559
+ open_timeout: 999_999,
560
+ read_timeout: 999_999
561
+ })
539
562
  @http_client = @core.http_client
540
563
 
541
564
  # if automation_name was nil before start_driver, then re-extend driver specific methods
@@ -14,6 +14,6 @@
14
14
 
15
15
  module Appium
16
16
  # Version and Date are defined on the 'Appium' module, not 'Appium::Common'
17
- VERSION = '15.2.0' unless defined? ::Appium::VERSION
18
- DATE = '2024-07-20' unless defined? ::Appium::DATE
17
+ VERSION = '15.2.2' unless defined? ::Appium::VERSION
18
+ DATE = '2024-08-06' unless defined? ::Appium::DATE
19
19
  end
data/release_notes.md CHANGED
@@ -1,3 +1,17 @@
1
+ #### v15.2.2 2024-08-06
2
+
3
+ - [08ac85a](https://github.com/appium/ruby_lib/commit/08ac85ace5a451886431f10367f544708a792954) Release 15.2.2
4
+ - [b741383](https://github.com/appium/ruby_lib/commit/b74138352b7f274d89e0af36efe3d65a574ed502) fix: non-app capability handling (#1039)
5
+
6
+
7
+ #### v15.2.1 2024-08-03
8
+
9
+ - [693dc16](https://github.com/appium/ruby_lib/commit/693dc167cbbcbe1ab08d1142958207d635c480a3) Release 15.2.1
10
+ - [d98126c](https://github.com/appium/ruby_lib/commit/d98126c47e04d7d152f85a2a75c3fdcb3011ae96) ci: add ci (#1037)
11
+ - [fd2e639](https://github.com/appium/ruby_lib/commit/fd2e639b62e9b5c533915e7e860621391479c4aa) chore: modify rubocop.yml a bit
12
+ - [0d1c2b8](https://github.com/appium/ruby_lib/commit/0d1c2b87b8f2ac456372bf4cbb2441fffae5cf27) chore: Update rubocop requirement from = 1.65.0 to = 1.65.1 (#1036)
13
+
14
+
1
15
  #### v15.2.0 2024-07-20
2
16
 
3
17
  - [d73525e](https://github.com/appium/ruby_lib/commit/d73525eec584c3c31690dcd55a6c52d641d43f9f) Release 15.2.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 15.2.0
4
+ version: 15.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - code@bootstraponline.com
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-07-21 00:00:00.000000000 Z
12
+ date: 2024-08-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: appium_lib_core
@@ -17,14 +17,20 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '9.0'
20
+ version: '9.2'
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 9.2.1
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
28
  - - "~>"
26
29
  - !ruby/object:Gem::Version
27
- version: '9.0'
30
+ version: '9.2'
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 9.2.1
28
34
  - !ruby/object:Gem::Dependency
29
35
  name: nokogiri
30
36
  requirement: !ruby/object:Gem::Requirement
@@ -169,14 +175,14 @@ dependencies:
169
175
  requirements:
170
176
  - - '='
171
177
  - !ruby/object:Gem::Version
172
- version: 1.65.0
178
+ version: 1.65.1
173
179
  type: :development
174
180
  prerelease: false
175
181
  version_requirements: !ruby/object:Gem::Requirement
176
182
  requirements:
177
183
  - - '='
178
184
  - !ruby/object:Gem::Version
179
- version: 1.65.0
185
+ version: 1.65.1
180
186
  - !ruby/object:Gem::Dependency
181
187
  name: yard
182
188
  requirement: !ruby/object:Gem::Requirement
@@ -203,6 +209,7 @@ files:
203
209
  - ".github/ISSUE_TEMPLATE.md"
204
210
  - ".github/PULL_REQUEST_TEMPLATE.md"
205
211
  - ".github/dependabot.yml"
212
+ - ".github/workflows/functional-test.yml"
206
213
  - ".github/workflows/rubocop.yml"
207
214
  - ".gitignore"
208
215
  - ".rubocop.yml"