screengrab 0.4.0 → 0.5.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
  SHA1:
3
- metadata.gz: 743b0f8af7f0ec6de3aa80d03aa61847db7c8bfb
4
- data.tar.gz: 7b7959a8b42f88eca5b1dc2885d78d59f5e95946
3
+ metadata.gz: a3c2e526db2791c531486fdef0a50fb647644fe3
4
+ data.tar.gz: 2ae54fb11017acc35fc50ae5a7955fda2f2f9121
5
5
  SHA512:
6
- metadata.gz: 24dfcd3e54c91a52a1acf5bf863e1117300128e149ce1999855d504fb20c39226a5e89a31725c6692742b6ba9dfe21ca0ada6004ade40ceae628efefbc178a93
7
- data.tar.gz: 7e98d055a361f43556567b0d4979ef0aab7eceff03d423a174c07bcb00fe85470a8c0acc0b37b915257fe69e379c7f65b3b3c44768fecc2436588fef658c35f2
6
+ metadata.gz: 7421606ad781981f72e68e02956942b8e4181c85b89856238c184642df199edf2f399332d27d99a56ece6cfdf54a9470f05d332d34c6ab4327f8e8246dc6c20d
7
+ data.tar.gz: 1298dfd3bd8987d5d12691599572e155d901ca449285bbd18a2f6521101aa75477ef6e771b3584ecb3e590adfaef7480cec90725d1c09cdb45ad1a8ca903f568
data/README.md CHANGED
@@ -84,7 +84,21 @@ Ensure that the following permissions exist in your **src/debug/AndroidManifest.
84
84
  - You can create your APKs with `./gradlew assembleDebug assembleAndroidTest`
85
85
  - Once complete run `screengrab` in your app project directory to generate screenshots
86
86
  - You will be prompted to provide any required parameters which are not in your **Screengrabfile** or provided as command line arguments
87
- - Your screenshots will be saved in a /screenshots directory in the directory where you ran `screengrab`
87
+ - Your screenshots will be saved to `fastlane/metadata/android` in the directory where you ran `screengrab`
88
+
89
+ ## Improved screenshot capture with UI Automator
90
+
91
+ As of `screengrab` 0.5.0, you can specify different strategies to control the way `screengrab` captures screenshots. The newer strategy delegates to [UI Automator](https://developer.android.com/topic/libraries/testing-support-library/index.html#UIAutomator) which fixes a number of problems compared to the original strategy:
92
+
93
+ * Shadows/elevation are correctly captured for Material UI
94
+ * Multi-window situations are correctly captured (dialogs, etc.)
95
+ * Works on Android N
96
+
97
+ However, UI Automator requires a device with **API level >= 18**, so it is not yet the default strategy. To enable it for all screenshots by default, make the following call before your tests run:
98
+
99
+ ```java
100
+ Screengrab.setDefaultScreenshotStrategy(new UiAutomatorScreenshotStrategy());
101
+ ```
88
102
 
89
103
  ## Advanced Screengrabfile Configuration
90
104
 
@@ -220,7 +220,7 @@ module Screengrab
220
220
  print_all: true,
221
221
  print_command: true)
222
222
 
223
- UI.user_error! "Tests failed" if test_output.include?("FAILURES!!!")
223
+ UI.user_error!("Tests failed", show_github_issues: false) if test_output.include?("FAILURES!!!")
224
224
  end
225
225
  end
226
226
 
@@ -303,6 +303,9 @@ module Screengrab
303
303
  print_command: false).include?('No such file')
304
304
 
305
305
  yield device_path
306
+ rescue
307
+ # Some versions of ADB will have a non-zero exit status for this, which will cause the executor to raise.
308
+ # We can safely ignore that and treat it as if it returned 'No such file'
306
309
  end
307
310
 
308
311
  def open_screenshots_summary(device_type_dir_name)
@@ -1,3 +1,3 @@
1
1
  major=0
2
- minor=4
2
+ minor=5
3
3
  patch=0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: screengrab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrea Falcone
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-08-02 00:00:00.000000000 Z
12
+ date: 2016-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fastlane_core
@@ -17,7 +17,7 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 0.38.0
20
+ version: 0.50.0
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
23
  version: 1.0.0
@@ -27,7 +27,7 @@ dependencies:
27
27
  requirements:
28
28
  - - ">="
29
29
  - !ruby/object:Gem::Version
30
- version: 0.38.0
30
+ version: 0.50.0
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.0.0