eyes_appium 3.17.23 → 3.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/applitools/appium/android_region_provider.rb +1 -1
- data/lib/applitools/appium/eyes.rb +9 -8
- data/lib/applitools/appium/region_provider.rb +2 -2
- data/lib/applitools/appium/target.rb +4 -4
- data/lib/applitools/appium/utils.rb +3 -0
- data/lib/applitools/version.rb +1 -1
- data/lib/eyes_appium.rb +0 -16
- metadata +4 -6
- data/lib/applitools/appium/initialize_1.9.rb +0 -18
- data/lib/applitools/appium/initialize_2.0.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a29fb386ed29fe1cc741076cf2a1776ccdd2f292
|
4
|
+
data.tar.gz: ef91a0080d46c352b8f9dadae0570ed094b5eef5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3410f82d13de72bc3cd1b9c3a75e4b1574ed81eef44ef9ad4101ee3c645b2fceceece826e0d5ea17f3651c34239a946f2a3f5f9d668fb31bb4ff42c483c940b1
|
7
|
+
data.tar.gz: d1c59ee3ead4ef1c143b362b7dca857279d34fabe33fa8413bd2360531f8c45d10fdccbf4a35c409c6b39fbb106b23f58a110b6eda41fef4efad351fb60ed485
|
@@ -13,7 +13,7 @@ module Applitools
|
|
13
13
|
def convert_viewport_rect_coordinates
|
14
14
|
region = viewport_rect
|
15
15
|
|
16
|
-
session_info = Applitools::Utils
|
16
|
+
session_info = Applitools::Appium::Utils.session_capabilities(driver)
|
17
17
|
if session_info['deviceScreenSize']
|
18
18
|
device_height = session_info['deviceScreenSize'].split('x').last.to_i
|
19
19
|
system_bars_height = driver.get_system_bars.map {|_,v| v['height'] }.sum
|
@@ -14,6 +14,7 @@ class Applitools::Appium::Eyes < Applitools::Selenium::SeleniumEyes
|
|
14
14
|
self.runner = Applitools::ClassicRunner.new
|
15
15
|
self.base_agent_id = "eyes.appium.ruby/#{Applitools::VERSION}".freeze
|
16
16
|
self.status_bar_height = 0
|
17
|
+
self.utils = Applitools::Appium::Utils
|
17
18
|
end
|
18
19
|
|
19
20
|
private :perform_driver_settings_for_appium_driver
|
@@ -90,8 +91,8 @@ class Applitools::Appium::Eyes < Applitools::Selenium::SeleniumEyes
|
|
90
91
|
raise Applitools::EyesError.new('Unknown image format after scale!')
|
91
92
|
end
|
92
93
|
),
|
93
|
-
status_bar_height:
|
94
|
-
device_pixel_ratio:
|
94
|
+
status_bar_height: self.utils.status_bar_height(driver),
|
95
|
+
device_pixel_ratio: self.utils.device_pixel_ratio(driver)
|
95
96
|
)
|
96
97
|
end
|
97
98
|
end
|
@@ -131,20 +132,20 @@ class Applitools::Appium::Eyes < Applitools::Selenium::SeleniumEyes
|
|
131
132
|
def obtain_viewport_screenshot
|
132
133
|
self.screenshot = screenshot_class.new(
|
133
134
|
Applitools::Screenshot.from_datastream(driver.screenshot_as(:png)),
|
134
|
-
status_bar_height:
|
135
|
-
device_pixel_ratio:
|
135
|
+
status_bar_height: self.utils.status_bar_height(driver),
|
136
|
+
device_pixel_ratio: self.utils.device_pixel_ratio(driver)
|
136
137
|
)
|
137
138
|
end
|
138
139
|
|
139
140
|
def screenshot_class
|
140
|
-
return Applitools::Appium::IosScreenshot if
|
141
|
-
return Applitools::Appium::AndroidScreenshot if
|
141
|
+
return Applitools::Appium::IosScreenshot if self.utils.ios?(Applitools::Appium::Driver::AppiumLib)
|
142
|
+
return Applitools::Appium::AndroidScreenshot if self.utils.android?(Applitools::Appium::Driver::AppiumLib)
|
142
143
|
raise Applitools::EyesError, 'Unknown device type'
|
143
144
|
end
|
144
145
|
|
145
146
|
def region_provider_class
|
146
|
-
return Applitools::Appium::IosRegionProvider if
|
147
|
-
return Applitools::Appium::AndroidRegionProvider if
|
147
|
+
return Applitools::Appium::IosRegionProvider if self.utils.ios?(Applitools::Appium::Driver::AppiumLib)
|
148
|
+
return Applitools::Appium::AndroidRegionProvider if self.utils.android?(Applitools::Appium::Driver::AppiumLib)
|
148
149
|
raise Applitools::EyesError, 'Unknown device type'
|
149
150
|
end
|
150
151
|
end
|
@@ -23,7 +23,7 @@ module Applitools
|
|
23
23
|
private
|
24
24
|
|
25
25
|
def viewport_rect
|
26
|
-
Applitools::Utils
|
26
|
+
Applitools::Appium::Utils.viewport_rect(driver)
|
27
27
|
end
|
28
28
|
|
29
29
|
def convert_region_coordinates
|
@@ -44,7 +44,7 @@ module Applitools
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def scale_factor
|
47
|
-
Applitools::Utils
|
47
|
+
Applitools::Appium::Utils.device_pixel_ratio(driver)
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
@@ -54,7 +54,7 @@ module Applitools
|
|
54
54
|
end
|
55
55
|
when Applitools::Region
|
56
56
|
result = first_argument.padding(requested_padding)
|
57
|
-
if Applitools::Utils
|
57
|
+
if Applitools::Appium::Utils.ios?(Applitools::Appium::Driver::AppiumLib)
|
58
58
|
def result.converted?
|
59
59
|
true
|
60
60
|
end
|
@@ -77,7 +77,7 @@ module Applitools
|
|
77
77
|
args.first
|
78
78
|
when Applitools::Region
|
79
79
|
result = Applitools::FloatingRegion.any(*args)
|
80
|
-
if Applitools::Utils
|
80
|
+
if Applitools::Appium::Utils.ios?(Applitools::Appium::Driver::AppiumLib)
|
81
81
|
def result.converted?
|
82
82
|
true
|
83
83
|
end
|
@@ -147,7 +147,7 @@ module Applitools
|
|
147
147
|
result = Applitools::AccessibilityRegion.new(
|
148
148
|
args.first, options[:type]
|
149
149
|
)
|
150
|
-
if Applitools::Utils
|
150
|
+
if Applitools::Appium::Utils.ios?(Applitools::Appium::Driver::AppiumLib)
|
151
151
|
def result.converted?
|
152
152
|
true
|
153
153
|
end
|
@@ -189,7 +189,7 @@ module Applitools
|
|
189
189
|
Applitools::Region.from_location_size(r.location, r.size)
|
190
190
|
end
|
191
191
|
when Applitools::Region
|
192
|
-
if Applitools::Utils
|
192
|
+
if Applitools::Appium::Utils.ios?(Applitools::Appium::Driver::AppiumLib)
|
193
193
|
def r.converted?
|
194
194
|
true
|
195
195
|
end
|
data/lib/applitools/version.rb
CHANGED
data/lib/eyes_appium.rb
CHANGED
@@ -3,24 +3,8 @@
|
|
3
3
|
require 'eyes_selenium'
|
4
4
|
require 'appium_lib'
|
5
5
|
|
6
|
-
CURRENT_RUBY_VERSION = Gem::Version.new RUBY_VERSION
|
7
|
-
|
8
|
-
RUBY_1_9_3 = Gem::Version.new '1.9.3'
|
9
|
-
RUBY_2_0_0 = Gem::Version.new '2.0.0'
|
10
|
-
RUBY_2_1_6 = Gem::Version.new '2.1.6'
|
11
|
-
RUBY_2_2_2 = Gem::Version.new '2.2.2'
|
12
|
-
RUBY_2_4_0 = Gem::Version.new '2.4.0'
|
13
|
-
|
14
|
-
RUBY_KEY = [RUBY_1_9_3, RUBY_2_0_0, RUBY_2_1_6, RUBY_2_2_2, RUBY_2_4_0].select { |v| v <= CURRENT_RUBY_VERSION }.last
|
15
|
-
|
16
6
|
Applitools.require_dir('appium')
|
17
7
|
|
18
|
-
if RUBY_KEY >= RUBY_2_0_0
|
19
|
-
Applitools::Appium::Init20.init
|
20
|
-
else
|
21
|
-
Applitools::Appium::Init19.init
|
22
|
-
end
|
23
|
-
|
24
8
|
if defined? Appium::Driver
|
25
9
|
Appium::Core::Base::Driver.class_eval do
|
26
10
|
def driver_for_eyes(eyes)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eyes_appium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Applitools Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eyes_selenium
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.
|
19
|
+
version: 3.18.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.
|
26
|
+
version: 3.18.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: appium_lib
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -49,8 +49,6 @@ files:
|
|
49
49
|
- lib/applitools/appium/android_screenshot.rb
|
50
50
|
- lib/applitools/appium/driver.rb
|
51
51
|
- lib/applitools/appium/eyes.rb
|
52
|
-
- lib/applitools/appium/initialize_1.9.rb
|
53
|
-
- lib/applitools/appium/initialize_2.0.rb
|
54
52
|
- lib/applitools/appium/ios_region_provider.rb
|
55
53
|
- lib/applitools/appium/ios_screenshot.rb
|
56
54
|
- lib/applitools/appium/region_provider.rb
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: false
|
2
|
-
|
3
|
-
module Applitools::Appium
|
4
|
-
module Init19
|
5
|
-
extend self
|
6
|
-
|
7
|
-
def init
|
8
|
-
Applitools::Utils::EyesSeleniumUtils.module_eval do
|
9
|
-
alias_method :super_mobile_device?, :mobile_device?
|
10
|
-
alias_method :super_android?, :android?
|
11
|
-
alias_method :super_ios?, :ios?
|
12
|
-
alias_method :super_platform_version, :platform_version
|
13
|
-
alias_method :super_current_scroll_position, :current_scroll_position
|
14
|
-
include Applitools::Appium::Utils
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|