eyes_core 6.6.1 → 6.7.1

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: 5650f4cfdd27ccdc0f6aeadf885b158fcad3b85c30155771ac658a6e531c0a37
4
- data.tar.gz: 33ef7adab7f26ce6550afd3d6238132dfaed926fd8a765994314a12a70590760
3
+ metadata.gz: 9e8270b52cdd58ec5d01252e085200ba62f8c9b9c056cfb6a5f217f58003f2a5
4
+ data.tar.gz: 8f01ec47b288f64c84aad4d7684d691a52376fc635014e059ecab49b3dec76ce
5
5
  SHA512:
6
- metadata.gz: 23134c9dc775f6af18baecffce730e44f81c67832f8d7e8958219ef94aa8d2c3ceea4b2b289b92d6918dd88158d5ef8317587577758b2e0294590c91f554140d
7
- data.tar.gz: bffd4883d9e0d7e9aebf7668648f5cfa67dfeb8971bdef767007f2bc9269c11f6d17fe3e4ea1178c265b34ff91ce2b8cec13cc5d79c958a4a893745220cff70b
6
+ metadata.gz: d78fa4f0fc03842d096f0af4fb7cca76b4416176fd0cdb84b30d34ef90d9bef40c839a8093197a0f111ac1e8ae1a6764df697b09850350824b5e40cd819e7f55
7
+ data.tar.gz: 9cd38ffa78203fdfb4615259a3d426f30bf8178f112e5c56d6f992d23be14cad0bdc6d5d9fca7ff840e5ef54fcad8e05e249161f2a619bf6e7b57e126b61c3f2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,118 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.7.1](https://github.com/Applitools-Dev/sdk/compare/ruby/eyes_core@6.7.0...ruby/eyes_core@6.7.1) (2025-05-22)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * eyes_universal bumped to 4.38.0
9
+ #### Features
10
+
11
+ * adding the mac-arm64 binary ([#2975](https://github.com/Applitools-Dev/sdk/issues/2975)) ([95d647f](https://github.com/Applitools-Dev/sdk/commit/95d647ff4a451309d985a786f7cec544d926f0e5))
12
+
13
+ ## [6.7.0](https://github.com/Applitools-Dev/sdk/compare/ruby/eyes_core@6.6.1...ruby/eyes_core@6.7.0) (2025-04-17)
14
+
15
+
16
+ ### Features
17
+
18
+ * height layout breakpoints ([#2801](https://github.com/Applitools-Dev/sdk/issues/2801)) ([819e241](https://github.com/Applitools-Dev/sdk/commit/819e2418f1fd93220a07dfbcf1157ffcf4995dd7))
19
+
20
+
21
+ ### Performance Improvements
22
+
23
+ * cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
24
+
25
+
26
+ ### Dependencies
27
+
28
+ * @applitools/dom-snapshot bumped to 4.11.18
29
+ #### Bug Fixes
30
+
31
+ * simplify sandbox creation and ensure cleanup after execution ([#2869](https://github.com/Applitools-Dev/sdk/issues/2869)) ([72c5e01](https://github.com/Applitools-Dev/sdk/commit/72c5e01307f6abd83fab365a7e235124caae0694))
32
+
33
+
34
+
35
+ * @applitools/snippets bumped to 2.6.5
36
+ #### Performance Improvements
37
+
38
+ * cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
39
+ * @applitools/driver bumped to 1.21.1
40
+ #### Bug Fixes
41
+
42
+ * executePoll error logging FLD-2870 ([#2890](https://github.com/Applitools-Dev/sdk/issues/2890)) ([a8ff720](https://github.com/Applitools-Dev/sdk/commit/a8ff720efafacabe2023282748a6d8a0f1b3ff73))
43
+
44
+
45
+
46
+ * @applitools/spec-driver-webdriver bumped to 1.2.2
47
+ #### Performance Improvements
48
+
49
+ * cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
50
+
51
+
52
+
53
+ * @applitools/spec-driver-selenium bumped to 1.5.98
54
+ #### Performance Improvements
55
+
56
+ * cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
57
+
58
+
59
+
60
+ * @applitools/spec-driver-puppeteer bumped to 1.4.27
61
+ #### Performance Improvements
62
+
63
+ * cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
64
+
65
+
66
+
67
+ * @applitools/screenshoter bumped to 3.11.1
68
+ #### Performance Improvements
69
+
70
+ * cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
71
+
72
+
73
+
74
+ * @applitools/nml-client bumped to 1.9.1
75
+ #### Performance Improvements
76
+
77
+ * cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
78
+
79
+
80
+
81
+ * @applitools/tunnel-client bumped to 1.6.5
82
+ #### Bug Fixes
83
+
84
+ * enhance error messages in tunnel client ([cab26e6](https://github.com/Applitools-Dev/sdk/commit/cab26e6e3d56fa3cbabaa1a9c68de13046b8f57e))
85
+ * @applitools/ufg-client bumped to 1.16.9
86
+ #### Bug Fixes
87
+
88
+ * basic auth protected resources | FLD-2761 | FMRI-120 ([#2444](https://github.com/Applitools-Dev/sdk/issues/2444)) ([b48cf49](https://github.com/Applitools-Dev/sdk/commit/b48cf49dec50bbf1ed2ba111608a48cf09962565))
89
+
90
+
91
+ #### Performance Improvements
92
+
93
+ * cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
94
+ * @applitools/ec-client bumped to 1.10.9
95
+ #### Performance Improvements
96
+
97
+ * cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
98
+
99
+
100
+
101
+ * @applitools/core bumped to 4.37.0
102
+ #### Features
103
+
104
+ * height layout breakpoints ([#2801](https://github.com/Applitools-Dev/sdk/issues/2801)) ([819e241](https://github.com/Applitools-Dev/sdk/commit/819e2418f1fd93220a07dfbcf1157ffcf4995dd7))
105
+
106
+
107
+
108
+ * eyes_universal bumped to 4.37.0
109
+ #### Performance Improvements
110
+
111
+ * cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
112
+
113
+
114
+
115
+
3
116
  ## [6.6.1](https://github.com/Applitools-Dev/sdk/compare/ruby/eyes_core@6.6.0...ruby/eyes_core@6.6.1) (2025-04-03)
4
117
 
5
118
 
data/eyes_core.gemspec CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
38
38
  spec.add_dependency 'colorize'
39
39
  spec.add_dependency 'websocket'
40
40
  spec.add_dependency 'sorted_set'
41
- spec.add_dependency 'eyes_universal', "= 4.35.1"
41
+ spec.add_dependency 'eyes_universal', "= 4.38.0"
42
42
 
43
43
  spec.add_development_dependency 'bundler'
44
44
  spec.add_development_dependency 'rake'
@@ -207,9 +207,11 @@ module Applitools
207
207
 
208
208
  # layoutBreakpoints?: boolean | number[]
209
209
  def layout_breakpoints=(value)
210
- config_hash[:layout_breakpoints] = { breakpoints: value } if value === true || value === false
211
- config_hash[:layout_breakpoints] = { breakpoints: value } if value.is_a?(Array) && value.all? {|v| v.is_a?(Numeric)}
212
- if value.is_a?(Hash)
210
+ if value === true || value === false
211
+ config_hash[:layout_breakpoints] = { breakpoints: value }
212
+ elsif value.is_a?(Array) && value.all? {|v| v.is_a?(Numeric)}
213
+ config_hash[:layout_breakpoints] = { breakpoints: value }
214
+ elsif value.is_a?(Hash)
213
215
  if value.has_key?(:breakpoints) || value.has_key?('breakpoints')
214
216
  config_hash[:layout_breakpoints] = value
215
217
  else
@@ -217,8 +219,27 @@ module Applitools
217
219
  end
218
220
  end
219
221
  end
220
- def layout_breakpoints
221
- config_hash[:layout_breakpoints]
222
+
223
+ def layout_breakpoints(value = nil, reload: nil, height_breakpoints: nil)
224
+ if value.nil?
225
+ config_hash[:layout_breakpoints]
226
+ else
227
+ if value.is_a?(Hash)
228
+ # If it's already a hash, add our options if not present
229
+ # Need to check both symbol and string keys
230
+ value[:layout_breakpoints][:reload] = value[:reload] || value['reload'] || reload
231
+ value[:layout_breakpoints][:height_breakpoints] = value[:height_breakpoints] || value['height_breakpoints'] || height_breakpoints
232
+ self.layout_breakpoints = value
233
+ else
234
+ # For non-hash values, create a hash with all options
235
+ self.layout_breakpoints = {
236
+ breakpoints: value,
237
+ reload: reload,
238
+ height_breakpoints: height_breakpoints
239
+ }
240
+ end
241
+ self
242
+ end
222
243
  end
223
244
  collect_method :layout_breakpoints
224
245
 
@@ -3,6 +3,70 @@
3
3
  require 'yaml'
4
4
 
5
5
  module Applitools
6
+ # First, extend OpenStruct with a custom method for case-insensitive hash access
7
+ class FlexibleOpenStruct < OpenStruct
8
+ def [](key)
9
+ # Convert the key to string in case it's a symbol or number
10
+ key_str = key.to_s
11
+
12
+ # Direct access first (most efficient)
13
+ return super(key) if respond_to?(key)
14
+
15
+ # If the key contains uppercase letters, try snake_case version
16
+ if key_str =~ /[A-Z]/
17
+ snake_case_key = key_str.gsub(/([A-Z])/, '_\1').downcase.gsub(/^_/, '')
18
+ return send(snake_case_key) if respond_to?(snake_case_key)
19
+ else
20
+ # If the key is snake_case, try camelCase version
21
+ camel_case_key = key_str.gsub(/_([a-z])/) { $1.upcase }
22
+ return send(camel_case_key) if respond_to?(camel_case_key)
23
+ end
24
+
25
+ # Fall back to nil if no matching attribute is found
26
+ nil
27
+ end
28
+
29
+ # Also handle nested hashes by recursively converting them to FlexibleOpenStruct
30
+ def method_missing(name, *args)
31
+ value = super
32
+
33
+ if value.is_a?(Hash)
34
+ send("#{name}=", hash_to_flexible_open_struct(value))
35
+ value = send(name)
36
+ elsif value.is_a?(Array)
37
+ send("#{name}=", array_to_flexible_open_struct(value))
38
+ value = send(name)
39
+ end
40
+
41
+ value
42
+ end
43
+
44
+ private
45
+
46
+ def hash_to_flexible_open_struct(hash)
47
+ result = FlexibleOpenStruct.new
48
+ hash.each do |k, v|
49
+ result[k] = process_value(v)
50
+ end
51
+ result
52
+ end
53
+
54
+ def array_to_flexible_open_struct(array)
55
+ array.map { |item| process_value(item) }
56
+ end
57
+
58
+ def process_value(value)
59
+ case value
60
+ when Hash
61
+ hash_to_flexible_open_struct(value)
62
+ when Array
63
+ array_to_flexible_open_struct(value)
64
+ else
65
+ value
66
+ end
67
+ end
68
+ end
69
+
6
70
  class TestResults
7
71
  class AccessibilityStatus
8
72
  attr_accessor :status, :level, :version
@@ -19,11 +83,16 @@ module Applitools
19
83
  attr_accessor :is_new, :url, :screenshot
20
84
  attr_reader :status, :steps, :matches, :mismatches, :missing, :original_results, :browser_info, :renderer
21
85
 
86
+ attr_reader :results
87
+
22
88
  def initialize(init_results = {})
23
89
  environment = init_results[:environment] || {}
24
90
  @renderer = Applitools::Utils.deep_stringify_keys(Applitools::Utils.underscore_hash_keys(environment[:requested]))
25
- @browser_info = JSON.parse(@renderer.to_json, object_class: OpenStruct)
26
- results = Applitools::Utils.deep_stringify_keys(init_results[:result] ? init_results[:result] : init_results)
91
+
92
+ # Use allow querying as both with camel and snake cases
93
+ @browser_info = JSON.parse(@renderer.to_json, object_class: FlexibleOpenStruct)
94
+
95
+ @results = Applitools::Utils.deep_stringify_keys(init_results[:result] ? init_results[:result] : init_results)
27
96
  @original_results = results
28
97
  @steps = results.fetch('steps', 0)
29
98
  @matches = results.fetch('matches', 0)
@@ -34,6 +103,10 @@ module Applitools
34
103
  @url = results.fetch('url', nil)
35
104
  end
36
105
 
106
+ def [](index)
107
+ @results[index]
108
+ end
109
+
37
110
  def test_results
38
111
  self
39
112
  end
@@ -87,7 +87,10 @@ module Applitools
87
87
 
88
88
  self.app_name = options[:app_name] if options[:app_name]
89
89
  self.test_name = options[:test_name] if options[:test_name]
90
- if (config.viewport_size.nil? || config.viewport_size&.empty?) && options[:viewport_size]
90
+
91
+ if (config.respond_to?(:viewport_size, true) &&
92
+ (config.send(:viewport_size).nil? || config.send(:viewport_size)&.empty?)) &&
93
+ options[:viewport_size]
91
94
  self.viewport_size = Applitools::RectangleSize.from_any_argument options[:viewport_size]
92
95
  end
93
96
  self.session_type = options[:session_type] if options[:session_type]
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Applitools
4
4
  module EyesCore
5
- VERSION = '6.6.1'.freeze
5
+ VERSION = '6.7.1'.freeze
6
6
  end
7
7
 
8
8
  VERSION = Applitools::EyesCore::VERSION
@@ -186,7 +186,23 @@ module Applitools
186
186
 
187
187
  def from_original_sdk(original_eyes)
188
188
  from_eyes = original_eyes.class.name != 'Applitools::Images::Eyes' ? FROM_ORIGINAL_EYES : from_eyes_images
189
- from_eyes.each {|m| copy_from(m, original_eyes) }
189
+
190
+ # Use a filtered list to avoid accessing private viewport_size method
191
+ # We will handle viewport_size specially
192
+ filtered_eyes = from_eyes.reject { |m| m == :viewport_size }
193
+
194
+ # Copy all properties except viewport_size
195
+ filtered_eyes.each { |m| copy_from(m, original_eyes) }
196
+
197
+ # Handle viewport_size specially to avoid private method access warning
198
+ # Access the config's viewport_size directly if available
199
+ if original_eyes.respond_to?(:config) && original_eyes.config.respond_to?(:viewport_size)
200
+ self.viewport_size = original_eyes.config.viewport_size
201
+ elsif original_eyes.respond_to?(:viewport_size)
202
+ # Fallback to original_eyes.viewport_size if necessary
203
+ self.viewport_size = original_eyes.viewport_size
204
+ end
205
+
190
206
  self.agent_id = original_eyes.base_agent_id if original_eyes.respond_to?(:base_agent_id)
191
207
  self.agent_id = original_eyes.full_agent_id if original_eyes.respond_to?(:full_agent_id)
192
208
  # self.display_name = original_eyes.app_name
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eyes_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.6.1
4
+ version: 6.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Applitools Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-03 00:00:00.000000000 Z
11
+ date: 2025-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 4.35.1
117
+ version: 4.38.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: 4.35.1
124
+ version: 4.38.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: bundler
127
127
  requirement: !ruby/object:Gem::Requirement