eyes_core 3.11.3 → 3.12.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/core/app_environment.rb +1 -1
- data/lib/applitools/core/eyes_base.rb +24 -18
- data/lib/applitools/core/eyes_screenshot.rb +1 -0
- data/lib/applitools/core/region.rb +1 -0
- data/lib/applitools/utils/eyes_selenium_utils.rb +1 -1
- data/lib/applitools/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc49ba9e29b2b8a74c01e6434f9771a2cd27073e
|
4
|
+
data.tar.gz: 3d3ae218ea0cceedbe4d54f9f5c73a30a170998a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7dd3be6a04caab29073db00e05ed79daa0a240dbd8f607a66e543872162876c078ef658afbcc890ac84dafb791a888741d3afa166a0528194a1b26abf5f020e
|
7
|
+
data.tar.gz: a669d428b9fd58029c7248f4a77a7483d42030471c9446cb1df5e5800fa784b0dfe8c76dfe3adc70d30a8b6e19d0e00273651d9670a647437d726dd2998c1aff
|
@@ -195,6 +195,11 @@ module Applitools
|
|
195
195
|
return false
|
196
196
|
end
|
197
197
|
|
198
|
+
if open?
|
199
|
+
abort_if_not_closed
|
200
|
+
raise Applitools::EyesError.new 'A test is already running'
|
201
|
+
end
|
202
|
+
|
198
203
|
Applitools::ArgumentGuard.hash options, 'open_base parameter', [:test_name]
|
199
204
|
default_options = { session_type: 'SEQUENTIAL' }
|
200
205
|
options = default_options.merge options
|
@@ -214,20 +219,32 @@ module Applitools
|
|
214
219
|
|
215
220
|
raise Applitools::EyesError.new 'API key is missing! Please set it using api_key=' if api_key.nil?
|
216
221
|
|
217
|
-
if open?
|
218
|
-
abort_if_not_closed
|
219
|
-
raise Applitools::EyesError.new 'A test is already running'
|
220
|
-
end
|
221
|
-
|
222
222
|
self.viewport_size = options[:viewport_size]
|
223
223
|
self.session_type = options[:session_type]
|
224
224
|
|
225
|
+
yield if block_given?
|
226
|
+
|
225
227
|
self.open = true
|
226
228
|
rescue Applitools::EyesError => e
|
227
229
|
logger.error e.message
|
228
230
|
raise e
|
229
231
|
end
|
230
232
|
|
233
|
+
def ensure_running_session
|
234
|
+
return if running_session
|
235
|
+
|
236
|
+
logger.info 'No running session, calling start session..'
|
237
|
+
start_session
|
238
|
+
logger.info 'Done!'
|
239
|
+
@match_window_task = Applitools::MatchWindowTask.new(
|
240
|
+
logger,
|
241
|
+
running_session,
|
242
|
+
match_timeout,
|
243
|
+
app_output_provider,
|
244
|
+
server_connector
|
245
|
+
)
|
246
|
+
end
|
247
|
+
|
231
248
|
def check_window_base(region_provider, retry_timeout, match_window_data)
|
232
249
|
if disabled?
|
233
250
|
logger.info "#{__method__} Ignored"
|
@@ -246,18 +263,7 @@ module Applitools
|
|
246
263
|
|
247
264
|
tag = '' if tag.nil?
|
248
265
|
|
249
|
-
|
250
|
-
logger.info 'No running session, calling start session..'
|
251
|
-
start_session
|
252
|
-
logger.info 'Done!'
|
253
|
-
@match_window_task = Applitools::MatchWindowTask.new(
|
254
|
-
logger,
|
255
|
-
running_session,
|
256
|
-
match_timeout,
|
257
|
-
app_output_provider,
|
258
|
-
server_connector
|
259
|
-
)
|
260
|
-
end
|
266
|
+
ensure_running_session
|
261
267
|
|
262
268
|
match_window_data.user_inputs = user_inputs
|
263
269
|
|
@@ -551,7 +557,7 @@ module Applitools
|
|
551
557
|
logger.info 'start_session()'
|
552
558
|
|
553
559
|
if viewport_size
|
554
|
-
set_viewport_size(viewport_size)
|
560
|
+
set_viewport_size(viewport_size, true)
|
555
561
|
else
|
556
562
|
self.viewport_size = get_viewport_size
|
557
563
|
end
|
@@ -314,7 +314,7 @@ module Applitools::Utils
|
|
314
314
|
Applitools::EyesLogger.error 'Zoom workaround failed.'
|
315
315
|
end
|
316
316
|
|
317
|
-
raise Applitools::TestFailedError.new
|
317
|
+
raise Applitools::TestFailedError.new "Failed to set viewport size (#{viewport_size})"
|
318
318
|
end
|
319
319
|
|
320
320
|
def set_browser_size(executor, required_size)
|
data/lib/applitools/version.rb
CHANGED
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: 3.
|
4
|
+
version: 3.12.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: 2017-
|
11
|
+
date: 2017-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oily_png
|