eyes_selenium 3.17.20 → 3.17.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 94222e9f9e0b16492fd4d984c42d0142865c54b35508492d177325a49337f69e
4
- data.tar.gz: b82d1d07bb6bd80c35e11631274dca4cb01f2f5901d297c861ceccc913c46f9b
3
+ metadata.gz: b85b01afecfff926ec6e9fed2d3eb971eb186518e926d3e453f8cb5a54e403bc
4
+ data.tar.gz: 1e4917c62353bc7fc638a1f7d0f964be97349231a200eabe90c3fdd3dba7080c
5
5
  SHA512:
6
- metadata.gz: c32c6b2ff43f980696d98f89cfbf7f39f856ead5600f1be984c7cfa9f454492a3a53090a89ca8c6437f95e12ae3d6dff3281a465c9f4328df2491698b85bbd87
7
- data.tar.gz: 89fb8dd500897f121d07f16c6cd38692e3832c15fe255d07e02f8ad8cb42d30e38078f69f29fb6dceec1244ee941ffd3e4aa57f40c06bfa7d244e739c70dd17d
6
+ metadata.gz: a77e08617d867e88b941669de834ffe30014c757b6c5950a03cd7385f4078ea404983d5a6fdfe51487e4e167454016b835dcb465b2042541d393f01cb0fb407e
7
+ data.tar.gz: fa478eb46ad0a39e8fd7cc7bc59c438ef63baefe80b3fd3a541f7b4f24a02790a9a9921aa54aafa69701b84a55cb6ad777ec23b4bc9ef7a3a4bea593a89f9f94
@@ -14,7 +14,8 @@ module Applitools
14
14
  hide_scrollbars: true,
15
15
  hide_caret: false,
16
16
  browsers_info: Applitools::Selenium::BrowsersInfo.new,
17
- rendering_grid_force_put: (ENV['APPLITOOLS_RENDERING_GRID_FORCE_PUT'] || 'false').casecmp('true') == 0
17
+ rendering_grid_force_put: (ENV['APPLITOOLS_RENDERING_GRID_FORCE_PUT'] || 'false').casecmp('true') == 0,
18
+ visual_grid_options: {}
18
19
  }
19
20
  end
20
21
  class << self
@@ -33,6 +34,12 @@ module Applitools
33
34
  object_field :browsers_info, Applitools::Selenium::BrowsersInfo
34
35
  int_field :concurrent_sessions
35
36
  boolean_field :rendering_grid_force_put
37
+ object_field :visual_grid_options, Hash, true
38
+
39
+ def custom_setter_for_visual_grid_options(value)
40
+ return {} if value.nil?
41
+ value
42
+ end
36
43
 
37
44
  def add_browser(*args)
38
45
  case args.size
@@ -30,7 +30,8 @@ module Applitools
30
30
  self.frames = []
31
31
  self.options = {
32
32
  ignore_mismatch: false,
33
- script_hooks: { beforeCaptureScreenshot: '' }
33
+ script_hooks: { beforeCaptureScreenshot: '' },
34
+ visual_grid_options: {}
34
35
  }
35
36
  self.regions = {}
36
37
  self.convert_coordinates_block = nil
@@ -191,6 +192,12 @@ module Applitools
191
192
  match_level(Applitools::MatchLevel::EXACT, *args)
192
193
  end
193
194
 
195
+ def visual_grid_options(value)
196
+ Applitools::ArgumentGuard.hash(value, 'value')
197
+ options[:visual_grid_options] = value
198
+ self
199
+ end
200
+
194
201
  def process_region(*args)
195
202
  r = args.first
196
203
  case r
@@ -8,7 +8,7 @@ module Applitools
8
8
  json_fields :renderId, :webhook, :url, :dom, :resources, :scriptHooks,
9
9
  :selectorsToFindRegionsFor, :sendDom, :agentId
10
10
 
11
- json_fields :renderInfo, :browser, :platform, :stitchingService
11
+ json_fields :renderInfo, :browser, :platform, :stitchingService, :options
12
12
 
13
13
  def initialize(*args)
14
14
  options = Applitools::Utils.extract_options! args
@@ -21,10 +21,11 @@ module Applitools
21
21
 
22
22
  attr_accessor :script, :running_tests, :resource_cache, :put_cache, :server_connector,
23
23
  :rendering_info, :request_resources, :dom_url_mod, :result, :region_selectors, :size_mode,
24
- :region_to_check, :script_hooks, :visual_grid_manager, :discovered_resources, :ua_string, :force_put
24
+ :region_to_check, :script_hooks, :visual_grid_manager, :discovered_resources, :ua_string, :force_put,
25
+ :visual_grid_options
25
26
 
26
27
  def initialize(name, script_result, visual_grid_manager, server_connector, region_selectors, size_mode,
27
- region, script_hooks, force_put, ua_string, mod = nil)
28
+ region, script_hooks, force_put, ua_string, options, mod = nil)
28
29
 
29
30
  self.result = nil
30
31
  self.script = script_result
@@ -41,6 +42,7 @@ module Applitools
41
42
  self.dom_url_mod = mod
42
43
  self.running_tests = []
43
44
  self.force_put = force_put
45
+ self.visual_grid_options = options
44
46
  @discovered_resources_lock = Mutex.new
45
47
  super(name) do
46
48
  perform
@@ -58,6 +60,7 @@ module Applitools
58
60
  rescue StandardError => e
59
61
  Applitools::EyesLogger.error(e.message)
60
62
  fetch_fails += 1
63
+ break if fetch_fails > 3
61
64
  sleep 2
62
65
  end
63
66
  next unless response
@@ -270,7 +273,8 @@ module Applitools
270
273
  false.to_s
271
274
  else
272
275
  running_test.eyes.configuration.send_dom.to_s
273
- end
276
+ end,
277
+ options: visual_grid_options
274
278
  )
275
279
  end
276
280
  requests
@@ -166,6 +166,7 @@ module Applitools
166
166
  target_to_check.options[:script_hooks],
167
167
  config.rendering_grid_force_put,
168
168
  Applitools::Utils::EyesSeleniumUtils.user_agent(driver),
169
+ visual_grid_options.merge(target_to_check.options[:visual_grid_options]),
169
170
  mod
170
171
  )
171
172
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Applitools
4
- VERSION = '3.17.20'.freeze
4
+ VERSION = '3.17.21'.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.20
4
+ version: 3.17.21
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-08-20 00:00:00.000000000 Z
11
+ date: 2020-09-06 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.20
19
+ version: 3.17.21
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.20
26
+ version: 3.17.21
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: selenium-webdriver
29
29
  requirement: !ruby/object:Gem::Requirement