eyes_selenium 3.15.5.beta → 3.15.6.beta

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: f9f3e9f6703e578f4b9e17e20053870636dd99c5f4dbebf773f0405055b2568c
4
- data.tar.gz: 05e2240ea7364269af763aae6d3ae1a5c8b0e8633c89583282aee82243955c21
3
+ metadata.gz: b79c481437eb1185f9c1497353cd7ab149b38168f90a05dd30b20ae9d9e20ee6
4
+ data.tar.gz: 09d64532021d0da0e7e48c4050f8bb59431a5b5c80598997fded91696e111447
5
5
  SHA512:
6
- metadata.gz: 82b06500557dfa412815a588ffd424845f60965503d302b376140efd9cacff2e6b50143879338a86a1c86bc1bc185cb8df707cfc434279958c970558405cf836
7
- data.tar.gz: 294c5ad3389d4557ebbe542dc4b7eb15727ede34dfd2ee57f3144a0b510fab504086907deea1b96d77fe5ab486c0ed0cdd047a08fd01f0f6358ce9d025f60e4d
6
+ metadata.gz: 5d293243cd465354cc8438e6b708c2366bf950fb2443dba8dba95592f73f51abc74ce9d5cd7ce2621b28a66e4025739b2fcaa8619d46eb33a29af6187434c9ee
7
+ data.tar.gz: 3644589e068e73924a285edff815a39ce8a4fd49a44be6e526d5a5ba96ce767f9d206c40e9295967791f606d73189fc0a17e9cec7f391af71d60da0c5b790ca8
@@ -1,13 +1,12 @@
1
- module Applitools
2
- module Selenium
3
- module BrowserTypes
4
- extend self
5
- CHROME = :chrome
6
- FIREFOX = :firefox
1
+ module BrowserTypes
2
+ extend self
3
+ CHROME = :chrome
4
+ FIREFOX = :firefox
5
+ IE11 = :ie
6
+ EDGE = :edge
7
+ IE10 = :ie10
7
8
 
8
- def enum_values
9
- [CHROME, FIREFOX]
10
- end
11
- end
9
+ def enum_values
10
+ [CHROME, FIREFOX, IE11, EDGE, IE10]
12
11
  end
13
- end
12
+ end
@@ -0,0 +1,34 @@
1
+ module Devices
2
+ IPhone4 = 'iPhone 4'.freeze
3
+ IPhone5SE = 'iPhone 5/SE'.freeze
4
+ IPhone678 = 'iPhone 6/7/8'.freeze
5
+ IPhone678Plus = 'iPhone 6/7/8 Plus'.freeze
6
+ IPhoneX = 'iPhone X'.freeze
7
+ IPad = 'iPad'.freeze
8
+ IPadPro = 'iPad Pro'.freeze
9
+ BlackBerryZ30 = 'BlackBerry Z30'.freeze
10
+ Nexus4 = 'Nexus 4'.freeze
11
+ Nexus5 = 'Nexus 5'.freeze
12
+ Nexus5X = 'Nexus 5X'.freeze
13
+ Nexus6 = 'Nexus 6'.freeze
14
+ Nexus6P = 'Nexus 6P'.freeze
15
+ Pixel2 = 'Pixel 2'.freeze
16
+ Pixel2XL = 'Pixel 2 XL'.freeze
17
+ LGOptimusL70 = 'LG Optimus L70'.freeze
18
+ NokiaN9 = 'Nokia N9'.freeze
19
+ NokiaLumia520 = 'Nokia Lumia 520'.freeze
20
+ MicrosoftLumia550 = 'Microsoft Lumia 550'.freeze
21
+ MicrosoftLumia950 = 'Microsoft Lumia 950'.freeze
22
+ GalaxyS3 = 'Galaxy S III'.freeze
23
+ GalaxyS5 = 'Galaxy S5'.freeze
24
+ KindleFireHDX = 'Kindle Fire HDX'.freeze
25
+ IPadMini = 'iPad Mini'.freeze
26
+ BlackberryPlayBook = 'Blackberry PlayBook'.freeze
27
+ Nexus10 = 'Nexus 10'.freeze
28
+ Nexus7 = 'Nexus 7'.freeze
29
+ GalaxyNote3 = 'Galaxy Note 3'.freeze
30
+ GalaxyNote2 = 'Galaxy Note II'.freeze
31
+ LaptopWithTouch = 'Laptop with touch'.freeze
32
+ LaptopWithHDPIScreen = 'Laptop with HiDPI screen'.freeze
33
+ LaptopWithMDPIScreen = 'Laptop with MDPI screen'.freeze
34
+ end
@@ -0,0 +1,4 @@
1
+ module Orientations
2
+ PORTRAIT = 'portrait'
3
+ LANDSCAPE = 'landscape'
4
+ end
@@ -2,168 +2,133 @@ require 'applitools/selenium/visual_grid/emulation_base_info'
2
2
  module Applitools
3
3
  module Selenium
4
4
  class ChromeEmulationInfo < EmulationBaseInfo
5
- module DEVICES
6
- IPhone4 = 'iPhone 4'.freeze
7
- IPhone5SE = 'iPhone 5/SE'.freeze
8
- IPhone678 = 'iPhone 6/7/8'.freeze
9
- IPhone678Plus = 'iPhone 6/7/8 Plus'.freeze
10
- IPhoneX = 'iPhone X'.freeze
11
- IPad = 'iPad'.freeze
12
- IPadPro = 'iPad Pro'.freeze
13
- BlackBerryZ30 = 'BlackBerry Z30'.freeze
14
- Nexus4 = 'Nexus 4'.freeze
15
- Nexus5 = 'Nexus 5'.freeze
16
- Nexus5X = 'Nexus 5X'.freeze
17
- Nexus6 = 'Nexus 6'.freeze
18
- Nexus6P = 'Nexus 6P'.freeze
19
- Pixel2 = 'Pixel 2'.freeze
20
- Pixel2XL = 'Pixel 2 XL'.freeze
21
- LGOptimusL70 = 'LG Optimus L70'.freeze
22
- NokiaN9 = 'Nokia N9'.freeze
23
- NokiaLumia520 = 'Nokia Lumia 520'.freeze
24
- MicrosoftLumia550 = 'Microsoft Lumia 550'.freeze
25
- MicrosoftLumia950 = 'Microsoft Lumia 950'.freeze
26
- GalaxyS3 = 'Galaxy S III'.freeze
27
- GalaxyS5 = 'Galaxy S5'.freeze
28
- KindleFireHDX = 'Kindle Fire HDX'.freeze
29
- IPadMini = 'iPad Mini'.freeze
30
- BlackberryPlayBook = 'Blackberry PlayBook'.freeze
31
- Nexus10 = 'Nexus 10'.freeze
32
- Nexus7 = 'Nexus 7'.freeze
33
- GalaxyNote3 = 'Galaxy Note 3'.freeze
34
- GalaxyNote2 = 'Galaxy Note II'.freeze
35
- LaptopWithTouch = 'Laptop with touch'.freeze
36
- LaptopWithHDPIScreen = 'Laptop with HiDPI screen'.freeze
37
- LaptopWithMDPIScreen = 'Laptop with MDPI screen'.freeze
38
- end
39
-
40
5
  class << self
41
6
  def i_phone_4(orientation)
42
- new DEVICES::IPhone4, orientation
7
+ new Devices::IPhone4, orientation
43
8
  end
44
9
 
45
10
  def i_phone_5_se(orientation)
46
- new DEVICES::IPhone5SE, orientation
11
+ new Devices::IPhone5SE, orientation
47
12
  end
48
13
 
49
14
  def i_phone_6_7_8(orientation)
50
- new DEVICES::IPhone678, orientation
15
+ new Devices::IPhone678, orientation
51
16
  end
52
17
 
53
18
  def i_phone_6_7_8_plus(orientation)
54
- new DEVICES::IPhone678Plus, orientation
19
+ new Devices::IPhone678Plus, orientation
55
20
  end
56
21
 
57
22
  def i_phone_x(orientation)
58
- new DEVICES::IPhoneX, orientation
23
+ new Devices::IPhoneX, orientation
59
24
  end
60
25
 
61
26
  def i_pad(orientation)
62
- new DEVICES::IPad, orientation
27
+ new Devices::IPad, orientation
63
28
  end
64
29
 
65
30
  def i_pad_pro(orientation)
66
- new DEVICES::IPadPro, orientation
31
+ new Devices::IPadPro, orientation
67
32
  end
68
33
 
69
34
  def black_berry_z30(orientation)
70
- new DEVICES::BlackBerryZ30, orientation
35
+ new Devices::BlackBerryZ30, orientation
71
36
  end
72
37
 
73
38
  def nexus_4(orientation)
74
- new DEVICES::Nexus4, orientation
39
+ new Devices::Nexus4, orientation
75
40
  end
76
41
 
77
42
  def nexus_5(orientation)
78
- new DEVICES::Nexus5, orientation
43
+ new Devices::Nexus5, orientation
79
44
  end
80
45
 
81
46
  def nexus_5x(orientation)
82
- new DEVICES::Nexus5X, orientation
47
+ new Devices::Nexus5X, orientation
83
48
  end
84
49
 
85
50
  def nexus_6(orientation)
86
- new DEVICES::Nexus6, orientation
51
+ new Devices::Nexus6, orientation
87
52
  end
88
53
 
89
54
  def nexus_6p(orientation)
90
- new DEVICES::Nexus6P, orientation
55
+ new Devices::Nexus6P, orientation
91
56
  end
92
57
 
93
58
  def pixel_2(orientation)
94
- new DEVICES::Pixel2, orientation
59
+ new Devices::Pixel2, orientation
95
60
  end
96
61
 
97
62
  def pixel_2xl(orientation)
98
- new DEVICES::Pixel2XL, orientation
63
+ new Devices::Pixel2XL, orientation
99
64
  end
100
65
 
101
66
  def lg_optimus_l70(orientation)
102
- new DEVICES::LGOptimusL70, orientation
67
+ new Devices::LGOptimusL70, orientation
103
68
  end
104
69
 
105
70
  def nokia_n9(orientation)
106
- new DEVICES::NokiaN9, orientation
71
+ new Devices::NokiaN9, orientation
107
72
  end
108
73
 
109
74
  def nokia_lumia_520(orientation)
110
- new DEVICES::NokiaLumia520, orientation
75
+ new Devices::NokiaLumia520, orientation
111
76
  end
112
77
 
113
78
  def microsoft_lumia_550(orientation)
114
- new DEVICES::MicrosoftLumia550, orientation
79
+ new Devices::MicrosoftLumia550, orientation
115
80
  end
116
81
 
117
82
  def microsoft_lumia_950(orientation)
118
- new DEVICES::MicrosoftLumia950, orientation
83
+ new Devices::MicrosoftLumia950, orientation
119
84
  end
120
85
 
121
86
  def galaxy_s3(orientation)
122
- new DEVICES::GalaxyS3, orientation
87
+ new Devices::GalaxyS3, orientation
123
88
  end
124
89
 
125
90
  def galaxy_s5(orientation)
126
- new DEVICES::GalaxyS5, orientation
91
+ new Devices::GalaxyS5, orientation
127
92
  end
128
93
 
129
94
  def kndle_fire_hdx(orientation)
130
- new DEVICES::KindleFireHDX, orientation
95
+ new Devices::KindleFireHDX, orientation
131
96
  end
132
97
 
133
98
  def i_pad_mini(orientation)
134
- new DEVICES::IPadMini, orientation
99
+ new Devices::IPadMini, orientation
135
100
  end
136
101
 
137
102
  def blackberry_play_book(orientation)
138
- new DEVICES::BlackberryPlayBook, orientation
103
+ new Devices::BlackberryPlayBook, orientation
139
104
  end
140
105
 
141
106
  def nexus_10(orientation)
142
- new DEVICES::Nexus10, orientation
107
+ new Devices::Nexus10, orientation
143
108
  end
144
109
 
145
110
  def nexus_7(orientation)
146
- new DEVICES::Nexus7, orientation
111
+ new Devices::Nexus7, orientation
147
112
  end
148
113
 
149
114
  def galaxy_note_3(orientation)
150
- new DEVICES::GalaxyNote3, orientation
115
+ new Devices::GalaxyNote3, orientation
151
116
  end
152
117
 
153
118
  def galaxy_note_2(orientation)
154
- new DEVICES::GalaxyNote2, orientation
119
+ new Devices::GalaxyNote2, orientation
155
120
  end
156
121
 
157
122
  def laptop_with_touch(orientation)
158
- new DEVICES::LaptopWithTouch, orientation
123
+ new Devices::LaptopWithTouch, orientation
159
124
  end
160
125
 
161
126
  def laptop_with_hdpi_screen(orientation)
162
- new DEVICES::LaptopWithHDPIScreen, orientation
127
+ new Devices::LaptopWithHDPIScreen, orientation
163
128
  end
164
129
 
165
130
  def laptop_with_mdpi_screen(orientation)
166
- new DEVICES::LaptopWithMDPIScreen, orientation
131
+ new Devices::LaptopWithMDPIScreen, orientation
167
132
  end
168
133
  end
169
134
 
@@ -1,10 +1,6 @@
1
1
  module Applitools
2
2
  module Selenium
3
3
  class EmulationBaseInfo
4
- module ORIENTATIONS
5
- PORTRAIT = 'portrait'
6
- LANDSCAPE = 'landscape'
7
- end
8
4
  extend Applitools::Helpers
9
5
  attr_accessor :screen_orientation
10
6
  abstract_attr_accessor :device_name
@@ -6,7 +6,7 @@ module Applitools
6
6
  DEFAULT_CONFIG = proc do
7
7
  {
8
8
  platform: 'linux',
9
- browser_type: Applitools::Selenium::BrowserTypes::CHROME,
9
+ browser_type: BrowserTypes::CHROME,
10
10
  size_mode: 'full-page',
11
11
  viewport_size: Applitools::RectangleSize.from_any_argument(width: 0, height: 0)
12
12
  }
@@ -18,12 +18,21 @@ module Applitools
18
18
  end
19
19
 
20
20
  object_field :viewport_size, Applitools::RectangleSize
21
- enum_field :browser_type, Applitools::Selenium::BrowserTypes.enum_values
21
+ enum_field :browser_type, BrowserTypes.enum_values
22
22
  string_field :platform
23
23
  string_field :size_mode
24
24
  string_field :baseline_env_name
25
25
  object_field :emulation_info, Applitools::Selenium::EmulationBaseInfo
26
26
 
27
+ def platform
28
+ case browser_type
29
+ when BrowserTypes::EDGE
30
+ 'windows'
31
+ else
32
+ 'linux'
33
+ end
34
+ end
35
+
27
36
  def to_s
28
37
  return "#{viewport_size} (#{browser_type})" unless emulation_info
29
38
  "#{emulation_info.device_name} - #{emulation_info.screen_orientation}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Applitools
4
- VERSION = '3.15.5.beta'.freeze
4
+ VERSION = '3.15.6.beta'.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.15.5.beta
4
+ version: 3.15.6.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Applitools Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-03 00:00:00.000000000 Z
11
+ date: 2019-04-04 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.15.5.beta
19
+ version: 3.15.6.beta
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.15.5.beta
26
+ version: 3.15.6.beta
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: selenium-webdriver
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -82,6 +82,7 @@ files:
82
82
  - lib/applitools/selenium/css_transform/css_transform.rb
83
83
  - lib/applitools/selenium/css_translate_element_position_provider.rb
84
84
  - lib/applitools/selenium/css_translate_position_provider.rb
85
+ - lib/applitools/selenium/devices.rb
85
86
  - lib/applitools/selenium/dom_capture/dom_capture.rb
86
87
  - lib/applitools/selenium/dom_capture/dom_capture_script.rb
87
88
  - lib/applitools/selenium/driver.rb
@@ -101,6 +102,7 @@ files:
101
102
  - lib/applitools/selenium/mouse.rb
102
103
  - lib/applitools/selenium/move_to_region_visibility_strategy.rb
103
104
  - lib/applitools/selenium/nop_region_visibility_strategy.rb
105
+ - lib/applitools/selenium/orientations.rb
104
106
  - lib/applitools/selenium/region_provider.rb
105
107
  - lib/applitools/selenium/render_browser_info_fluent.rb
106
108
  - lib/applitools/selenium/render_resources.rb