bugsnag-maze-runner 9.15.0 → 9.16.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: ee36c242d277dcadc7deb388ddc408bdbc416fef634f4dcd50b8f47ab001483f
4
+ data.tar.gz: 806dbe2236e1e8d4dbc65eda74e63e49fefacfede87752f5beee19127b5df4e1
5
5
  SHA512:
6
- metadata.gz: 9fb38d691fb4d17246ea742100387a1c5fd1a6da70613e7f60eba9f1981c82085faf03668c85c4fff3c21f97da3d21dcfc727fae6b64e6dad46b740da71751e8
7
- data.tar.gz: 39486b860cd75c00a9fc537f293a4e838a40f1946de9b83cba25ad332c0d3008724188461ea167116f3191d3a0c961435af39f06b53db20f3508c7fb01bf12a6
6
+ metadata.gz: 601b6afc508d59eedb48080be2980d66868ae253ea0114740dee82c2db0e2e92159a8b023dc204f7e9056acf47ad8a1e7f62e218c54712094758ca60e72cfed0
7
+ data.tar.gz: 404f98797234da38d267f9078769f4505449f7748d99f3365ea0cef682b8864c7089703591c8cad911d38fd736b88dc8ec17169240833a216ce846bc2dcf615f
@@ -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'
@@ -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
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.16.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.16.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-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber