bugsnag-maze-runner 8.15.0 → 9.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cebeb631cc91a03c41573b39a4977d0d21af876299e851f359176d98c672231c
4
- data.tar.gz: 0e8ae1131849a1a215347103764f0691b0a760016e404265c879f7e255cf0942
3
+ metadata.gz: b7294cf169ef0a66ead9789be570496771a20734bb793340653b4235aa016f07
4
+ data.tar.gz: 30bfe8f408345f79524c37165e9760b97a9acfb1c546628a1cac3b0aa3063f1f
5
5
  SHA512:
6
- metadata.gz: 1036bf6e74cf99b3f784e4d552740d23fc8df33806822620a0371672d41ae77f49c39e9ac7fdf4f2f42facf9d08dbbd9e1b894d0915912a5081de5f8e38a71f0
7
- data.tar.gz: d5094c3dd7c71135b270d5a5b087e58923bb1f1be8c4cbd549b5d83f88c442789155f38ec6ad2315e27459c50b19f4375846e0b850614263dc1a257129046006
6
+ metadata.gz: ec4f97ffe50aa33479d9c3f36748ffe72932798d165e71f25072c69613cbb30c485a2efe0aec792aac6c50149ee885d9ecc52dc11a71c813313e79d7b2bfb4d5
7
+ data.tar.gz: dd0e9a17df5d6298b59d5932777f423486ab8aed01b95625c47e72450325b61a71df0b417c984cf73a9c3fe029f29ec383defa29fd168270a0658abec418ff19
@@ -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
@@ -30,14 +30,11 @@ module Maze
30
30
  elsif [:bb, :bs, :local].include? Maze.config.farm
31
31
  write_device_logs(scenario) if scenario.failed?
32
32
 
33
- # TODO: PLAT-10300 - Review our general approach to resetting the app between scenarios
34
- re = Regexp.new('^1\.1[56]\.\d$')
35
- if re.match? Maze.config.appium_version
36
- Maze.driver.close_app
37
- Maze.driver.launch_app
38
- else
39
- Maze.driver.reset
40
- end
33
+ # Reset the server to ensure that test fixtures cannot fetch
34
+ # commands from the previous scenario (in idempotent mode).
35
+ Maze.driver.terminate_app Maze.driver.app_id
36
+ Maze::Server.reset!
37
+ Maze.driver.activate_app Maze.driver.app_id
41
38
  end
42
39
  rescue => error
43
40
  # Notify and re-raise for Cucumber to handle
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.15.0'
10
+ VERSION = '9.0.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.15.0
4
+ version: 9.0.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-01-03 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