bugsnag-maze-runner 8.14.1 → 8.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: 53b48f66affb077bec0df23e0894d1183bb56d95c1b92ef2b2859dd7caebc094
4
- data.tar.gz: 787d02dee7cd763a800fcfe4bc9ccf868570859f999f1b8ccf74134e2a1b938b
3
+ metadata.gz: 31b4428b6ac193d28a644c60b7fd932896a77ca570089211b8dc476ed3d09175
4
+ data.tar.gz: 5cf2b51bc3174f104d2c2677cc2153c079805151f4314fe482ba36180d6e46fe
5
5
  SHA512:
6
- metadata.gz: 43f83e92fcfbc071fb010f46e3d598c7fd388e1ac5f321b6a67dcfe6b9b8e86d9ebd38c6853a8f2444cb34a2fa5ba20efb295c60131e4503f11617309f31b614
7
- data.tar.gz: a220624d25f34bedf10a8f858a6e4bd7feb051e885e76f89cabda34a8491840f4d16c66c6a22855a62163bb75e4447e63c32af5c314535f5bc62bcd8e5567bdf
6
+ metadata.gz: 98515748221eff4ab123e8da5ace1b578a750b770715ee793afe4a6c4dac60585915ce25b288c82b12b06f4b3995f2cd14493070fa54b56e0288b6462b175fd9
7
+ data.tar.gz: e62f2b7dde8900b4d45404d85a1f806e50804116deab0a49bbf6a55abdafecdc04b74a4f33f6b206a6f8b4ef71993a7b3383aae9e382653d1203abf64fae4512
@@ -146,7 +146,7 @@ After do |scenario|
146
146
 
147
147
  # Log all received requests to the console if the scenario fails and/or config says to
148
148
  if (scenario.failed? && Maze.config.log_requests) || Maze.config.always_log
149
- $stdout.puts '^^^ +++'
149
+ $stdout.puts '^^^ +++' if ENV['BUILDKITE']
150
150
  output_received_requests('errors')
151
151
  output_received_requests('sessions')
152
152
  output_received_requests('traces')
@@ -25,6 +25,28 @@ module Maze
25
25
  $logger.trace "Pushing file to '#{path}' with contents: #{contents}"
26
26
  @driver.push_file(path, contents)
27
27
  end
28
+
29
+ # Attempts to retrieve a given file from the device (using Appium). The default location for the file will be
30
+ # the app's documents directory for iOS. On Android, it will be /sdcard/Android/data/<app-id>/files unless
31
+ # Maze.config.android_app_files_directory has been set.
32
+ # @param filename [String] Name (with no path) of the file to be retrieved from the device
33
+ # @param directory [String] Directory on the device where the file is located (optional)
34
+ def read_app_file(filename, directory = nil)
35
+ if directory
36
+ path = directory
37
+ else
38
+ path = case Maze::Helper.get_current_platform
39
+ when 'ios'
40
+ "@#{@driver.app_id}/Documents/#{filename}"
41
+ when 'android'
42
+ dir = Maze.config.android_app_files_directory || "/sdcard/Android/data/#{@driver.app_id}/files"
43
+ "#{dir}/#{filename}"
44
+ end
45
+ end
46
+
47
+ $logger.trace "Attempting to read file from '#{path}'"
48
+ file = @driver.pull_file(path)
49
+ end
28
50
  end
29
51
  end
30
52
  end
@@ -99,6 +99,8 @@ module Maze
99
99
  'uiautomator2ServerInstallTimeout' => 60000,
100
100
  'uiautomator2ServerLaunchTimeout' => 60000
101
101
  }
102
+ appium_options['appActivity'] = Maze.config.app_activity unless Maze.config.app_activity.nil?
103
+ appium_options['appPackage'] = Maze.config.app_package unless Maze.config.app_package.nil?
102
104
  hash = {
103
105
  'platformName' => 'Android',
104
106
  'deviceName' => 'Android Phone',
@@ -137,6 +137,12 @@ module Maze
137
137
  # Test browser version
138
138
  attr_accessor :browser_version
139
139
 
140
+ # The appActivity to be set in the Appium capabilities
141
+ attr_accessor :app_activity
142
+
143
+ # The appPackage to be set in the Appium capabilities
144
+ attr_accessor :app_package
145
+
140
146
  # Appium version to use
141
147
  attr_accessor :appium_version
142
148
 
@@ -134,6 +134,14 @@ module Maze
134
134
  'Device farm access key. Consumes env var from environment based on farm set',
135
135
  short: :none,
136
136
  type: :string
137
+ opt Option::APP_ACTIVITY,
138
+ 'The appActivity to set in the Appium capabilities (for BitBar only)',
139
+ short: :none,
140
+ type: :string
141
+ opt Option::APP_PACKAGE,
142
+ 'The appPackage to set in the Appium capabilities (for BitBar only)',
143
+ short: :none,
144
+ type: :string
137
145
  opt Option::APPIUM_VERSION,
138
146
  'The Appium version to use',
139
147
  short: :none,
@@ -47,6 +47,8 @@ module Maze
47
47
  end
48
48
  config.locator = options[Maze::Option::A11Y_LOCATOR] ? :accessibility_id : :id
49
49
  config.capabilities_option = options[Maze::Option::CAPABILITIES]
50
+ config.app_activity = options[Maze::Option::APP_ACTIVITY]
51
+ config.app_package = options[Maze::Option::APP_PACKAGE]
50
52
  config.legacy_driver = !ENV['USE_LEGACY_DRIVER'].nil?
51
53
  config.start_tunnel = options[Maze::Option::TUNNEL]
52
54
 
data/lib/maze/option.rb CHANGED
@@ -21,7 +21,9 @@ module Maze
21
21
 
22
22
  # Generic device farm options
23
23
  ACCESS_KEY = 'access-key'
24
+ APP_ACTIVITY = 'app-activity'
24
25
  APP_BUNDLE_ID = 'app-bundle-id'
26
+ APP_PACKAGE = 'app-package'
25
27
  APPIUM_VERSION = 'appium-version'
26
28
  BROWSER = 'browser'
27
29
  BROWSER_VERSION = 'browser-version'
@@ -31,9 +31,6 @@ module Maze
31
31
  commands.next
32
32
  end
33
33
  else
34
- $logger.info "request.query = #{request.query}"
35
-
36
-
37
34
  # Idempotent mode
38
35
  after_uuid = request.query['after']
39
36
  if after_uuid.nil?
@@ -87,5 +84,3 @@ module Maze
87
84
  end
88
85
  end
89
86
  end
90
-
91
-
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 = '8.14.1'
10
+ VERSION = '8.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: 8.14.1
4
+ version: 8.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Kirkland
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-21 00:00:00.000000000 Z
11
+ date: 2024-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -449,11 +449,11 @@ files:
449
449
  - lib/maze/wait.rb
450
450
  - lib/utils/deep_merge.rb
451
451
  - lib/utils/selenium_money_patch.rb
452
- homepage:
452
+ homepage:
453
453
  licenses:
454
454
  - MIT
455
455
  metadata: {}
456
- post_install_message:
456
+ post_install_message:
457
457
  rdoc_options: []
458
458
  require_paths:
459
459
  - lib
@@ -469,7 +469,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
469
469
  version: '0'
470
470
  requirements: []
471
471
  rubygems_version: 3.1.6
472
- signing_key:
472
+ signing_key:
473
473
  specification_version: 4
474
474
  summary: Bugsnag API request validation harness
475
475
  test_files: []