snapshot 1.4.2 → 1.4.3
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 +4 -4
- data/README.md +1 -1
- data/lib/snapshot.rb +1 -0
- data/lib/snapshot/collector.rb +5 -11
- data/lib/snapshot/dependency_checker.rb +1 -1
- data/lib/snapshot/options.rb +8 -10
- data/lib/snapshot/runner.rb +1 -0
- data/lib/snapshot/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c5edfee2a420a70bee0a6af831f2f5d42950767
|
4
|
+
data.tar.gz: e3c20c036bb41d12cb7dfcf2a444e7a6c233024d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09fbafd083e1435dcbdac39a795d9f530bb5dc3e8a2bf3b01f5d0a484f327f91dff7bec6ce7ae0ec9fbf1fac897701fe50b71af7ca0ef8e5fc2c5cfe35388969
|
7
|
+
data.tar.gz: c1435617ea8b08662ffb1092ab7020d79e002a74b278e68b0fc7555fb786440003ae832dc36d9c114e7cd0976c7fd95590fee537e0cbbad0cfd9c261cc91dc83
|
data/README.md
CHANGED
@@ -142,7 +142,7 @@ Here a few links to get started:
|
|
142
142
|
- Run `snapshot init` in your project folder
|
143
143
|
- Add the ./SnapshotHelper.swift to your UI Test target (You can move the file anywhere you want)
|
144
144
|
- (Objective C only) add the bridging header to your test class.
|
145
|
-
- `#import
|
145
|
+
- `#import "MYUITests-Swift.h"`
|
146
146
|
- The bridging header is named after your test target with -Swift.h appended.
|
147
147
|
- In your UI Test class, click the `Record` button on the bottom left and record your interaction
|
148
148
|
- To take a snapshot, call the following between interactions
|
data/lib/snapshot.rb
CHANGED
data/lib/snapshot/collector.rb
CHANGED
@@ -41,7 +41,7 @@ module Snapshot
|
|
41
41
|
Helper.log.info "Loading up '#{plist_path}'..." if $verbose
|
42
42
|
report = Plist.parse_xml(plist_path)
|
43
43
|
|
44
|
-
|
44
|
+
to_store = [] # contains the names of all the attachments we want to use
|
45
45
|
report["TestableSummaries"].each do |summary|
|
46
46
|
(summary["Tests"] || []).each do |test|
|
47
47
|
(test["Subtests"] || []).each do |subtest|
|
@@ -49,8 +49,9 @@ module Snapshot
|
|
49
49
|
(subtest2["Subtests"] || []).each do |subtest3|
|
50
50
|
(subtest3["ActivitySummaries"] || []).each do |activity|
|
51
51
|
# We now check if it's the rotation gesture, because that's the only thing we care about
|
52
|
-
|
53
|
-
|
52
|
+
if activity["Title"] == "Set device orientation to Unknown"
|
53
|
+
to_store << activity["Attachments"].last["FileName"]
|
54
|
+
end
|
54
55
|
end
|
55
56
|
end
|
56
57
|
end
|
@@ -58,14 +59,7 @@ module Snapshot
|
|
58
59
|
end
|
59
60
|
end
|
60
61
|
|
61
|
-
Helper.log.info "Found #{
|
62
|
-
|
63
|
-
to_store = [] # contains the names of all the attachments we want to use
|
64
|
-
activities.each do |activity|
|
65
|
-
attachment_entry = activity
|
66
|
-
to_store << attachment_entry["Attachments"].last["FileName"]
|
67
|
-
end
|
68
|
-
|
62
|
+
Helper.log.info "Found #{to_store.count} screenshots..."
|
69
63
|
Helper.log.info "Found #{to_store.join(', ')}" if $verbose
|
70
64
|
return to_store
|
71
65
|
end
|
@@ -19,7 +19,7 @@ module Snapshot
|
|
19
19
|
|
20
20
|
if Snapshot::LatestIosVersion.version.to_f < 9 # to_f is bad, but should be good enough
|
21
21
|
Helper.log.fatal '#############################################################'
|
22
|
-
Helper.log.fatal "# Your xcode-select Xcode version is below
|
22
|
+
Helper.log.fatal "# Your xcode-select Xcode version is below 7.0"
|
23
23
|
Helper.log.fatal "# To use snapshot 1.0 and above you need at least iOS 9"
|
24
24
|
Helper.log.fatal "# Set the path to the Xcode version that supports UI Tests"
|
25
25
|
Helper.log.fatal "# or downgrade to versions older than snapshot 1.0"
|
data/lib/snapshot/options.rb
CHANGED
@@ -31,10 +31,10 @@ module Snapshot
|
|
31
31
|
end),
|
32
32
|
FastlaneCore::ConfigItem.new(key: :devices,
|
33
33
|
description: "A list of devices you want to take the screenshots from",
|
34
|
-
|
34
|
+
short_option: "-d",
|
35
|
+
type: Array,
|
35
36
|
optional: true,
|
36
37
|
verify_block: proc do |value|
|
37
|
-
raise "Devices must be an array" unless value.kind_of?(Array)
|
38
38
|
available = FastlaneCore::Simulator.all
|
39
39
|
value.each do |current|
|
40
40
|
unless available.any? { |d| d.name.strip == current.strip }
|
@@ -44,17 +44,15 @@ module Snapshot
|
|
44
44
|
end),
|
45
45
|
FastlaneCore::ConfigItem.new(key: :languages,
|
46
46
|
description: "A list of languages which should be used",
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
]),
|
47
|
+
short_option: "-g",
|
48
|
+
type: Array,
|
49
|
+
default_value: ['en-US']),
|
51
50
|
FastlaneCore::ConfigItem.new(key: :launch_arguments,
|
52
51
|
env_name: 'SNAPSHOT_LAUNCH_ARGUMENTS',
|
53
52
|
description: "A list of launch arguments which should be used",
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
]),
|
53
|
+
short_option: "-m",
|
54
|
+
type: Array,
|
55
|
+
default_value: ['']),
|
58
56
|
FastlaneCore::ConfigItem.new(key: :output_directory,
|
59
57
|
short_option: "-o",
|
60
58
|
env_name: "SNAPSHOT_OUTPUT_DIRECTORY",
|
data/lib/snapshot/runner.rb
CHANGED
@@ -36,6 +36,7 @@ module Snapshot
|
|
36
36
|
results[device][language] = true
|
37
37
|
rescue => ex
|
38
38
|
Helper.log.error ex # we should to show right here as well
|
39
|
+
Helper.log.error "Backtrace:\n\t#{ex.backtrace.join("\n\t")}"
|
39
40
|
errors << ex
|
40
41
|
results[device][language] = false
|
41
42
|
raise ex if Snapshot.config[:stop_after_first_error]
|
data/lib/snapshot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snapshot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastimage
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.30.0
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: 1.0.0
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.
|
43
|
+
version: 0.30.0
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 1.0.0
|
@@ -250,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
250
250
|
version: '0'
|
251
251
|
requirements: []
|
252
252
|
rubyforge_project:
|
253
|
-
rubygems_version: 2.4.
|
253
|
+
rubygems_version: 2.4.5.1
|
254
254
|
signing_key:
|
255
255
|
specification_version: 4
|
256
256
|
summary: Automate taking localized screenshots of your iOS app on every device
|