Skip to content

Commit b10f8ab

Browse files
authored
Merge pull request #224 from pennlabs/development
Update 5.1
2 parents f53b8a0 + cac15cd commit b10f8ab

64 files changed

Lines changed: 1796 additions & 692 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

FastlaneUIAutomation/SnapshotHelper.swift

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,14 @@ open class Snapshot: NSObject {
114114
} catch {
115115
print("Couldn't detect/set locale...")
116116
}
117-
if locale.isEmpty {
117+
118+
if locale.isEmpty && !deviceLanguage.isEmpty {
118119
locale = Locale(identifier: deviceLanguage).identifier
119120
}
120-
app.launchArguments += ["-AppleLocale", "\"\(locale)\""]
121+
122+
if !locale.isEmpty {
123+
app.launchArguments += ["-AppleLocale", "\"\(locale)\""]
124+
}
121125
}
122126

123127
class func setLaunchArguments(_ app: XCUIApplication) {
@@ -152,7 +156,12 @@ open class Snapshot: NSObject {
152156
sleep(1) // Waiting for the animation to be finished (kind of)
153157

154158
#if os(OSX)
155-
XCUIApplication().typeKey(XCUIKeyboardKeySecondaryFn, modifierFlags: [])
159+
guard let app = self.app else {
160+
print("XCUIApplication is not set. Please call setupSnapshot(app) before snapshot().")
161+
return
162+
}
163+
164+
app.typeKey(XCUIKeyboardKeySecondaryFn, modifierFlags: [])
156165
#else
157166

158167
guard let app = self.app else {
@@ -178,7 +187,12 @@ open class Snapshot: NSObject {
178187
return
179188
#endif
180189

181-
let networkLoadingIndicator = XCUIApplication().otherElements.deviceStatusBars.networkLoadingIndicators.element
190+
guard let app = self.app else {
191+
print("XCUIApplication is not set. Please call setupSnapshot(app) before snapshot().")
192+
return
193+
}
194+
195+
let networkLoadingIndicator = app.otherElements.deviceStatusBars.networkLoadingIndicators.element
182196
let networkLoadingIndicatorDisappeared = XCTNSPredicateExpectation(predicate: NSPredicate(format: "exists == false"), object: networkLoadingIndicator)
183197
_ = XCTWaiter.wait(for: [networkLoadingIndicatorDisappeared], timeout: timeout)
184198
}
@@ -253,7 +267,11 @@ private extension XCUIElementQuery {
253267
}
254268

255269
var deviceStatusBars: XCUIElementQuery {
256-
let deviceWidth = XCUIApplication().windows.firstMatch.frame.width
270+
guard let app = Snapshot.app else {
271+
fatalError("XCUIApplication is not set. Please call setupSnapshot(app) before snapshot().")
272+
}
273+
274+
let deviceWidth = app.windows.firstMatch.frame.width
257275

258276
let isStatusBar = NSPredicate { (evaluatedObject, _) in
259277
guard let element = evaluatedObject as? XCUIElementAttributes else { return false }
@@ -273,4 +291,4 @@ private extension CGFloat {
273291

274292
// Please don't remove the lines below
275293
// They are used to detect outdated configuration files
276-
// SnapshotHelperVersion [1.12]
294+
// SnapshotHelperVersion [1.14]

Gemfile.lock

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ GEM
22
remote: https://rubygems.org/
33
specs:
44
CFPropertyList (3.0.0)
5-
addressable (2.5.2)
5+
addressable (2.6.0)
66
public_suffix (>= 2.0.2, < 4.0)
77
atomos (0.1.3)
88
babosa (1.0.2)
@@ -13,35 +13,37 @@ GEM
1313
highline (~> 1.7.2)
1414
declarative (0.0.10)
1515
declarative-option (0.1.0)
16+
digest-crc (0.4.1)
1617
domain_name (0.5.20180417)
1718
unf (>= 0.0.5, < 1.0.0)
18-
dotenv (2.5.0)
19-
emoji_regex (0.1.1)
19+
dotenv (2.7.2)
20+
emoji_regex (1.0.1)
2021
excon (0.62.0)
21-
faraday (0.15.2)
22+
faraday (0.15.4)
2223
multipart-post (>= 1.2, < 3)
2324
faraday-cookie_jar (0.0.6)
2425
faraday (>= 0.7.4)
2526
http-cookie (~> 1.0.0)
26-
faraday_middleware (0.12.2)
27+
faraday_middleware (0.13.1)
2728
faraday (>= 0.7.4, < 1.0)
28-
fastimage (2.1.3)
29-
fastlane (2.104.0)
29+
fastimage (2.1.5)
30+
fastlane (2.119.0)
3031
CFPropertyList (>= 2.3, < 4.0.0)
3132
addressable (>= 2.3, < 3.0.0)
3233
babosa (>= 1.0.2, < 2.0.0)
33-
bundler (>= 1.12.0, < 2.0.0)
34+
bundler (>= 1.12.0, < 3.0.0)
3435
colored
3536
commander-fastlane (>= 4.4.6, < 5.0.0)
3637
dotenv (>= 2.1.1, < 3.0.0)
37-
emoji_regex (~> 0.1)
38+
emoji_regex (>= 0.1, < 2.0)
3839
excon (>= 0.45.0, < 1.0.0)
3940
faraday (~> 0.9)
4041
faraday-cookie_jar (~> 0.0.6)
4142
faraday_middleware (~> 0.9)
4243
fastimage (>= 2.1.0, < 3.0.0)
4344
gh_inspector (>= 1.1.2, < 2.0.0)
4445
google-api-client (>= 0.21.2, < 0.24.0)
46+
google-cloud-storage (>= 1.15.0, < 2.0.0)
4547
highline (>= 1.7.2, < 2.0.0)
4648
json (< 3.0.0)
4749
mini_magick (~> 4.5.1)
@@ -54,48 +56,57 @@ GEM
5456
security (= 0.1.3)
5557
simctl (~> 1.6.3)
5658
slack-notifier (>= 2.0.0, < 3.0.0)
57-
terminal-notifier (>= 1.6.2, < 2.0.0)
59+
terminal-notifier (>= 2.0.0, < 3.0.0)
5860
terminal-table (>= 1.4.5, < 2.0.0)
5961
tty-screen (>= 0.6.3, < 1.0.0)
6062
tty-spinner (>= 0.8.0, < 1.0.0)
6163
word_wrap (~> 1.0.0)
62-
xcodeproj (>= 1.6.0, < 2.0.0)
64+
xcodeproj (>= 1.8.1, < 2.0.0)
6365
xcpretty (~> 0.3.0)
6466
xcpretty-travis-formatter (>= 0.0.3)
6567
gh_inspector (1.1.3)
66-
google-api-client (0.23.8)
68+
google-api-client (0.23.9)
6769
addressable (~> 2.5, >= 2.5.1)
6870
googleauth (>= 0.5, < 0.7.0)
6971
httpclient (>= 2.8.1, < 3.0)
7072
mime-types (~> 3.0)
7173
representable (~> 3.0)
7274
retriable (>= 2.0, < 4.0)
7375
signet (~> 0.9)
74-
googleauth (0.6.6)
76+
google-cloud-core (1.3.0)
77+
google-cloud-env (~> 1.0)
78+
google-cloud-env (1.0.5)
79+
faraday (~> 0.11)
80+
google-cloud-storage (1.16.0)
81+
digest-crc (~> 0.4)
82+
google-api-client (~> 0.23)
83+
google-cloud-core (~> 1.2)
84+
googleauth (>= 0.6.2, < 0.10.0)
85+
googleauth (0.6.7)
7586
faraday (~> 0.12)
7687
jwt (>= 1.4, < 3.0)
77-
memoist (~> 0.12)
88+
memoist (~> 0.16)
7889
multi_json (~> 1.11)
7990
os (>= 0.9, < 2.0)
8091
signet (~> 0.7)
8192
highline (1.7.10)
8293
http-cookie (1.0.3)
8394
domain_name (~> 0.5)
8495
httpclient (2.8.3)
85-
json (2.1.0)
96+
json (2.2.0)
8697
jwt (2.1.0)
8798
memoist (0.16.0)
8899
mime-types (3.2.2)
89100
mime-types-data (~> 3.2015)
90-
mime-types-data (3.2018.0812)
101+
mime-types-data (3.2019.0331)
91102
mini_magick (4.5.1)
92103
multi_json (1.13.1)
93104
multi_xml (0.6.0)
94105
multipart-post (2.0.0)
95106
nanaimo (0.2.6)
96107
naturally (2.2.0)
97108
os (1.0.0)
98-
plist (3.4.0)
109+
plist (3.5.0)
99110
public_suffix (2.0.5)
100111
representable (3.0.4)
101112
declarative (< 0.1.0)
@@ -105,7 +116,7 @@ GEM
105116
rouge (2.0.7)
106117
rubyzip (1.2.2)
107118
security (0.1.3)
108-
signet (0.9.1)
119+
signet (0.11.0)
109120
addressable (~> 2.3)
110121
faraday (~> 0.9)
111122
jwt (>= 1.5, < 3.0)
@@ -114,20 +125,20 @@ GEM
114125
CFPropertyList
115126
naturally
116127
slack-notifier (2.3.2)
117-
terminal-notifier (1.8.0)
128+
terminal-notifier (2.0.0)
118129
terminal-table (1.8.0)
119130
unicode-display_width (~> 1.1, >= 1.1.1)
120-
tty-cursor (0.6.0)
131+
tty-cursor (0.6.1)
121132
tty-screen (0.6.5)
122-
tty-spinner (0.8.0)
123-
tty-cursor (>= 0.5.0)
133+
tty-spinner (0.9.0)
134+
tty-cursor (~> 0.6.0)
124135
uber (0.1.0)
125136
unf (0.1.4)
126137
unf_ext
127138
unf_ext (0.0.7.5)
128-
unicode-display_width (1.4.0)
139+
unicode-display_width (1.5.0)
129140
word_wrap (1.0.0)
130-
xcodeproj (1.6.0)
141+
xcodeproj (1.8.2)
131142
CFPropertyList (>= 2.3.3, < 4.0)
132143
atomos (~> 0.1.3)
133144
claide (>= 1.0.2, < 2.0)
@@ -145,4 +156,4 @@ DEPENDENCIES
145156
fastlane
146157

147158
BUNDLED WITH
148-
1.16.1
159+
2.0.1

0 commit comments

Comments
 (0)