bugsnag-maze-runner 9.27.4 → 9.28.0
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 +4 -4
- data/lib/features/steps/app_automator_steps.rb +2 -2
- data/lib/maze/api/appium/app_manager.rb +19 -1
- data/lib/maze/client/appium/bb_client.rb +2 -0
- data/lib/maze.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cd6f7e392e3c048cf4775a2715f3d87f692bc0a34234ff31a887dbf45c9e01d
|
4
|
+
data.tar.gz: af10924777104f0532f7294f49350244280938fb022ecea647f8756902c3be43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95163d0e29cba6dc81ae339604626396233c4d7aeb2cf779f8e1f91e9877eb09c9e3d722d90822ec356b6cef28e6df0175b575a05bde7665820cfdfc5bea63e9
|
7
|
+
data.tar.gz: c61f7b8579b2e918d402b0736ab872c56cff6843df8e87386a4f1bfec849f2a83dd4dea900eb005dc518a2af0fecadf33717c0d79f2a064f7bee0be30e372a1f
|
@@ -38,7 +38,7 @@ end
|
|
38
38
|
# Sends the app to the background indefinitely
|
39
39
|
# Requires a running Appium driver
|
40
40
|
When('I send the app to the background') do
|
41
|
-
Maze.
|
41
|
+
Maze::Api::Appium::AppManager.new.background(-1)
|
42
42
|
end
|
43
43
|
|
44
44
|
# Sends the app to the background for a number of seconds
|
@@ -46,7 +46,7 @@ end
|
|
46
46
|
#
|
47
47
|
# @step_input timeout [Integer] The amount of time the app is in the background in seconds
|
48
48
|
When('I send the app to the background for {int} second(s)') do |timeout|
|
49
|
-
Maze.
|
49
|
+
Maze::Api::Appium::AppManager.new.background(timeout)
|
50
50
|
end
|
51
51
|
|
52
52
|
# Clears a given element
|
@@ -26,7 +26,7 @@ module Maze
|
|
26
26
|
|
27
27
|
# Terminates the app. If terminate fails then clients may wish to ty the legacy close method, so an option
|
28
28
|
# is provided to not fail the Appium driver.
|
29
|
-
# @fail_driver [Boolean] Whether to fail the Appium driver if the app cannot be terminated
|
29
|
+
# @param fail_driver [Boolean] Whether to fail the Appium driver if the app cannot be terminated
|
30
30
|
# @returns [Boolean] Whether the app was successfully closed
|
31
31
|
def terminate(fail_driver = true)
|
32
32
|
if failed_driver?
|
@@ -43,6 +43,24 @@ module Maze
|
|
43
43
|
raise e
|
44
44
|
end
|
45
45
|
|
46
|
+
# Instructs Appium to background the app
|
47
|
+
# @param seconds [Integers] The number of seconds to background the app for, or -1 for indefinitely
|
48
|
+
# @returns [Boolean] Whether the instruction to Appium was successfully made
|
49
|
+
def background(seconds = -1)
|
50
|
+
if failed_driver?
|
51
|
+
$logger.error 'Cannot background the app - Appium driver failed.'
|
52
|
+
return false
|
53
|
+
end
|
54
|
+
|
55
|
+
@driver.background_app(seconds)
|
56
|
+
true
|
57
|
+
rescue Selenium::WebDriver::Error::ServerError, Selenium::WebDriver::Error::UnknownError => e
|
58
|
+
$logger.error "Failed to background app: #{e.message}"
|
59
|
+
# Assume the remote appium session has stopped, so crash out of the session
|
60
|
+
fail_driver(e.message)
|
61
|
+
raise e
|
62
|
+
end
|
63
|
+
|
46
64
|
# Launches the app (legacy method).
|
47
65
|
# @returns [Boolean] Whether the app was successfully launched
|
48
66
|
def launch
|
@@ -38,6 +38,8 @@ module Maze
|
|
38
38
|
interval = 10
|
39
39
|
elsif error.message.include? '\'platformVersion\' must be a valid version number.'
|
40
40
|
interval = 10
|
41
|
+
elsif error.message.include?('Device model with name') && error.message.include?('is currently unavailable')
|
42
|
+
interval = 10
|
41
43
|
else
|
42
44
|
# Do not retry in any other case
|
43
45
|
end
|
data/lib/maze.rb
CHANGED
@@ -8,7 +8,7 @@ require_relative 'maze/timers'
|
|
8
8
|
# providing an alternative to the proliferation of global variables or singletons.
|
9
9
|
module Maze
|
10
10
|
|
11
|
-
VERSION = '9.
|
11
|
+
VERSION = '9.28.0'
|
12
12
|
|
13
13
|
class << self
|
14
14
|
attr_accessor :check, :driver, :internal_hooks, :mode, :start_time, :dynamic_retry, :public_address,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bugsnag-maze-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.28.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Kirkland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-04-
|
11
|
+
date: 2025-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|