bugsnag-maze-runner 9.15.0 → 9.17.0

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: 4ce5f9ee2bd12d032b5255c2eb7a37e80b81733ba14d8b8245a80f10c6f97a9b
4
- data.tar.gz: df2943d57544c8815b128ee139e4fc8b6756a0c686e049e25d25887432018936
3
+ metadata.gz: c9030ac2f7abdbeae92dd93722ea67c366d12b3eca63e4d4a83e63aead8487a7
4
+ data.tar.gz: 1b1e1932f4f1d6a33b63093ea5c26f745041593fe0515ddd987b2cb11abe5554
5
5
  SHA512:
6
- metadata.gz: 9fb38d691fb4d17246ea742100387a1c5fd1a6da70613e7f60eba9f1981c82085faf03668c85c4fff3c21f97da3d21dcfc727fae6b64e6dad46b740da71751e8
7
- data.tar.gz: 39486b860cd75c00a9fc537f293a4e838a40f1946de9b83cba25ad332c0d3008724188461ea167116f3191d3a0c961435af39f06b53db20f3508c7fb01bf12a6
6
+ metadata.gz: 71739fc49bb2d280db6ffeb330e29aa33ebd77c47ac055edb2434f4ad6a24159772ba2e83182de94ce32db323ca3e9dc2e810eb4edb96128d1fb66d875f39204
7
+ data.tar.gz: e6203434b23df13a7aa4d984f3b693d44163249a689db391c1aae7a0a5ca8c3a2eb215a12434d959879c6f1e4785f8381147d2ea44872ab576371b563ee9cd0a
@@ -270,7 +270,7 @@ def attribute_value_matches?(attribute_value, expected_type, expected_value)
270
270
  when 'intValue'
271
271
  expected_value.to_i.eql?(attribute_value[expected_type].to_i)
272
272
  when 'doubleValue'
273
- expected_value.to_f.eql?(attribute_value[expected_type])
273
+ expected_value.to_f.eql?(attribute_value[expected_type].to_f)
274
274
  when 'boolValue'
275
275
  expected_value.eql?('true').eql?(attribute_value[expected_type])
276
276
  when 'arrayValue'
@@ -71,6 +71,7 @@ module Maze
71
71
  def create_hash
72
72
  hash = {
73
73
  # Classic, non-specific devices for each Android version
74
+ 'ANDROID_15' => make_android_hash('Google Pixel 9', '15.0'),
74
75
  'ANDROID_14' => make_android_hash('Google Pixel 8', '14.0'),
75
76
  'ANDROID_13' => make_android_hash('Google Pixel 6 Pro', '13.0'),
76
77
  'ANDROID_12' => make_android_hash('Google Pixel 5', '12.0'),
@@ -12,6 +12,7 @@ module Maze
12
12
  capabilities.merge! browsers[config.browser]
13
13
  capabilities.merge! JSON.parse(config.capabilities_option)
14
14
  capabilities['bitbar:options']['testTimeout'] = 900
15
+ capabilities['acceptInsecureCerts'] = true unless Maze.config.browser.include? 'ie_'
15
16
  config.capabilities = capabilities
16
17
 
17
18
  if Maze::Client::BitBarClientUtils.use_local_tunnel?
@@ -16,6 +16,7 @@ module Maze
16
16
  capabilities['browserstack.local'] = 'true'
17
17
  capabilities['browserstack.localIdentifier'] = Maze.run_uuid
18
18
  capabilities['browserstack.console'] = 'errors'
19
+ capabilities['acceptInsecureCerts'] = 'true'
19
20
 
20
21
  # Convert W3S capabilities to JSON-WP
21
22
  capabilities['browser'] = browser['browserName']
@@ -29,6 +30,7 @@ module Maze
29
30
  config.capabilities = capabilities
30
31
  else
31
32
  capabilities = {
33
+ 'acceptInsecureCerts' => true,
32
34
  'bstack:options' => {
33
35
  'local' => 'true',
34
36
  'localIdentifier' => Maze.run_uuid
@@ -22,6 +22,9 @@ module Maze
22
22
  # Server configuration
23
23
  #
24
24
 
25
+ # Whether the mock server should use https
26
+ attr_accessor :https
27
+
25
28
  # Mock server bind address
26
29
  attr_accessor :bind_address
27
30
 
@@ -118,7 +118,13 @@ module Maze
118
118
  capabilities: @capabilities
119
119
  end
120
120
  else
121
- driver = ::Selenium::WebDriver.for driver_for
121
+ if driver_for == :chrome
122
+ options = Selenium::WebDriver::Options.chrome
123
+ elsif driver_for == :firefox
124
+ options = Selenium::WebDriver::Options.firefox
125
+ end
126
+ options.accept_insecure_certs = true
127
+ driver = ::Selenium::WebDriver.for driver_for, options: options
122
128
  end
123
129
  $logger.info "Selenium driver started in #{(Time.now - time).to_i}s"
124
130
  @driver = driver
@@ -35,8 +35,12 @@ module Maze
35
35
  begin
36
36
  Maze.driver.terminate_app Maze.driver.app_id
37
37
  rescue Selenium::WebDriver::Error::UnknownError
38
- $logger.warn 'terminate_app failed, using the slower but more forceful close_app instead'
39
- Maze.driver.close_app
38
+ if Maze.config.appium_version && Maze.config.appium_version.to_f < 2.0
39
+ $logger.warn 'terminate_app failed, using the slower but more forceful close_app instead'
40
+ Maze.driver.close_app
41
+ else
42
+ $logger.warn 'terminate_app failed, future errors may occur if the application did not close remotely'
43
+ end
40
44
  end
41
45
  Maze::Server.reset!
42
46
  Maze.driver.activate_app Maze.driver.app_id
@@ -60,6 +60,11 @@ module Maze
60
60
  text ''
61
61
  text 'Server options:'
62
62
 
63
+ opt Option::HTTPS,
64
+ 'Use HTTPS for the mock server',
65
+ short: :none,
66
+ type: :boolean,
67
+ default: false
63
68
  opt Option::BIND_ADDRESS,
64
69
  'Mock server bind address',
65
70
  short: :none,
@@ -13,6 +13,7 @@ module Maze
13
13
  def populate(config, options)
14
14
 
15
15
  # Server options
16
+ config.https = options[Maze::Option::HTTPS]
16
17
  config.bind_address = options[Maze::Option::BIND_ADDRESS]
17
18
  config.port = options[Maze::Option::PORT]
18
19
  config.null_port = options[Maze::Option::NULL_PORT]
data/lib/maze/option.rb CHANGED
@@ -6,12 +6,13 @@ module Maze
6
6
  # Document server options
7
7
  DS_BIND_ADDRESS = 'document-server-bind-address'
8
8
  DS_PORT = 'document-server-port'
9
- DS_ROOT = 'document-server-root'
10
9
 
11
10
  # Server options
11
+ HTTPS = 'https'
12
12
  BIND_ADDRESS = 'bind-address'
13
13
  NULL_PORT = 'null-port'
14
14
  PORT = 'port'
15
+ DS_ROOT = 'document-server-root'
15
16
 
16
17
  # Appium options
17
18
  A11Y_LOCATOR = 'a11y-locator'
data/lib/maze/server.rb CHANGED
@@ -209,11 +209,20 @@ module Maze
209
209
  loop do
210
210
 
211
211
  @thread = Thread.new do
212
+
212
213
  options = {
213
- Port: Maze.config.port,
214
- Logger: $logger,
215
- AccessLog: []
214
+ Port: Maze.config.port,
215
+ Logger: $logger,
216
+ AccessLog: []
216
217
  }
218
+ # SSL config if enabled
219
+ if Maze.config.https
220
+ cert_name = [
221
+ %w[CN localhost],
222
+ ]
223
+ options[:SSLEnable] = true
224
+ options[:SSLCertName] = cert_name
225
+ end
217
226
  options[:BindAddress] = Maze.config.bind_address unless Maze.config.bind_address.nil?
218
227
  server = WEBrick::HTTPServer.new(options)
219
228
 
@@ -243,6 +252,7 @@ module Maze
243
252
  server.mount '/metrics', Servlets::Servlet, :metrics
244
253
  server.mount '/reflect', Servlets::ReflectiveServlet
245
254
  server.mount '/docs', WEBrick::HTTPServlet::FileHandler, Maze.config.document_server_root unless Maze.config.document_server_root.nil?
255
+
246
256
  server.start
247
257
  rescue StandardError => e
248
258
  Bugsnag.notify e
data/lib/maze.rb CHANGED
@@ -7,7 +7,7 @@ require_relative 'maze/timers'
7
7
  # Glues the various parts of MazeRunner together that need to be accessed globally,
8
8
  # providing an alternative to the proliferation of global variables or singletons.
9
9
  module Maze
10
- VERSION = '9.15.0'
10
+ VERSION = '9.17.0'
11
11
 
12
12
  class << self
13
13
  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.15.0
4
+ version: 9.17.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: 2024-10-09 00:00:00.000000000 Z
11
+ date: 2024-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber