eyes_selenium 3.17.2 → 3.17.3

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: 8bbe944af9ea20d3d0afde5ae4e96b6b33d42e4e171e4bfb1d4dc0a4866e1056
4
- data.tar.gz: 1cfc9ec471f9f02944189c0e442c59530e8ea37e8a586e04128191ef401316ed
3
+ metadata.gz: a287486a3c2db8fe596472fc9913fe78e986f808e85d7aff75a864af7d2eb882
4
+ data.tar.gz: 9dc948821e7024ecd298fbd79e139a3b18ec49cf0abd18b508379f78010257cb
5
5
  SHA512:
6
- metadata.gz: d6e40409125ded5b69be42f291a23a7dc61b61c54420eaaa5ca397b279e8d4b33931b446ffdd2f03c20a28ebd73dfc2d9d9c21dd6fd8e65e81707f649d574c50
7
- data.tar.gz: abd633ddeaef17adf5f937c00a149956b4b5587356bc2ec5467e88e4374f99716b47f7e964f35a1553776a5ac0e36267e51df947f7c8c05c365b874c31f496e1
6
+ metadata.gz: e6985305123510272024b48190c15254d026835251fd7d5fcead42988a32e6f09b3c4155870729a8ded879aef9aa2523fbc40951d4e6364bbfc12c7e960e0a04
7
+ data.tar.gz: e1c697f8a30a19d97ad28d2cc488b4d22da34fdc78b62cbe46f44028be0e93f4a9bfed34706116dd2c516afc6349bfff4dd4a5da5bfe4c3c066fc81ed211ffd7
@@ -1,5 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
  module BrowserTypes
3
+ extend self
4
+ def const_missing(name)
5
+ puts 'Please, prefer using BrowserType instead of BrowserTypes(plural).'
6
+ BrowserType.const_get(name)
7
+ end
8
+
9
+ def enum_values
10
+ BrowserType.enum_values
11
+ end
12
+ end
13
+ module BrowserType
3
14
  extend self
4
15
  CHROME = :'chrome-0'
5
16
  CHROME_ONE_VERSION_BACK = :'chrome-1'
@@ -1,5 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
  module Orientations
3
+ extend self
4
+ def const_missing(name)
5
+ puts 'Please prefer using the Orientation instead of Orientations(plural).'
6
+ Orientation.const_get(name)
7
+ end
8
+ def enum_values
9
+ Orientation.enum_values
10
+ end
11
+ end
12
+
13
+ module Orientation
3
14
  extend self
4
15
  PORTRAIT = 'portrait'
5
16
  LANDSCAPE = 'landscape'
@@ -18,6 +18,10 @@ module Applitools
18
18
  end
19
19
  end
20
20
 
21
+ # def device_name
22
+ # emulation_info.device_name
23
+ # end
24
+ #
21
25
  def initialize(*args)
22
26
  super()
23
27
  case args[0]
@@ -30,7 +30,7 @@ module Applitools
30
30
  def open(driver, browser_info)
31
31
  self.driver = driver
32
32
  self.browser_info = browser_info
33
- self.device_name = browser_info && browser_info.emulation_info && browser_info.emulation_info.device_name
33
+ self.device_name = browser_info.device_name
34
34
  logger.info "opening EyesConnector for #{config.short_description} with viewport size: #{browser_info}"
35
35
  config.viewport_size = browser_info.viewport_size
36
36
  title
@@ -10,6 +10,12 @@ module Applitools
10
10
  object_field :emulation_info, Applitools::Selenium::EmulationBaseInfo
11
11
  object_field :ios_device_info, Applitools::Selenium::EmulationBaseInfo
12
12
 
13
+ def device_name
14
+ return 'desktop' unless emulation_info || ios_device_info
15
+ return ios_device_info.device_name if ios_device_info
16
+ return emulation_info.device_name + ' (chrome emulation)' if emulation_info
17
+ end
18
+
13
19
  def to_s
14
20
  return "#{viewport_size} (#{browser_type})" unless emulation_info
15
21
  "#{emulation_info.device_name} - #{emulation_info.screen_orientation}"
@@ -17,12 +17,11 @@ module Applitools
17
17
  end
18
18
  end
19
19
 
20
-
21
20
  def initialize(options = {})
22
21
  super()
23
22
  self.ios_device_info = EmulationInfo.new.tap do |ei|
24
23
  ei.device_name = options[:device_name]
25
- ei.screen_orientation = options[:screen_orientation] || IosScreenshotOrientations::PORTRAIT
24
+ ei.screen_orientation = options[:screen_orientation] || options[:orientation] || IosScreenshotOrientation::PORTRAIT
26
25
  end
27
26
  end
28
27
 
@@ -30,7 +29,7 @@ module Applitools
30
29
 
31
30
  class EmulationInfo < EmulationBaseInfo
32
31
  enum_field :device_name, IosDeviceName.enum_values
33
- enum_field :screen_orientation, IosScreenshotOrientations.enum_values
32
+ enum_field :screen_orientation, IosScreenshotOrientation.enum_values
34
33
 
35
34
  def json_data
36
35
  {
@@ -1,4 +1,4 @@
1
- module IosScreenshotOrientations
1
+ module IosScreenshotOrientation
2
2
  extend self
3
3
  PORTRAIT ='portrait'
4
4
  LANDSCAPE_LEFT = 'landscapeLeft'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Applitools
4
- VERSION = '3.17.2'.freeze
4
+ VERSION = '3.17.3'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eyes_selenium
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.17.2
4
+ version: 3.17.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Applitools Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-05 00:00:00.000000000 Z
11
+ date: 2020-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eyes_core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.17.2
19
+ version: 3.17.3
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.17.2
26
+ version: 3.17.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: selenium-webdriver
29
29
  requirement: !ruby/object:Gem::Requirement