Skip to content

Commit

Permalink
Update screenshot script
Browse files Browse the repository at this point in the history
  • Loading branch information
acorscadden committed Sep 20, 2017
1 parent 8c10246 commit 86d4b3e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
19 changes: 17 additions & 2 deletions Screenshots/Screenshots.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,26 @@ class Screenshots: XCTestCase {

app.buttons["SEND"].tap()
snapshot("1Send")

let closeButton = app.buttons["Close"]
closeButton.tap()


app.buttons["RECEIVE"].tap()
snapshot("1Receive")
snapshot("2Receive")
let receiveClose = app.buttons["Close"]
receiveClose.tap()


app.buttons["MENU"].tap()
let scrollViewsQuery = app.scrollViews
scrollViewsQuery.children(matching: .other).element.children(matching: .other).element.children(matching: .other).element(boundBy: 0).tap()
snapshot("3Security")
scrollViewsQuery.otherElements.buttons["Close"].tap()

app.buttons["MENU"].tap()
let scrollViewsQuery2 = app.scrollViews
scrollViewsQuery2.children(matching: .other).element.children(matching: .other).element.children(matching: .other).element(boundBy: 1).tap()
snapshot("4Support")

}

Expand Down
10 changes: 5 additions & 5 deletions Screenshots/SnapshotHelper.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// SnapshotHelper.swift
// SnapshotHelperXcode8.swift
// Example
//
// Created by Felix Krause on 10/8/15.
Expand All @@ -10,7 +10,7 @@
// IMPORTANT: When modifying this file, make sure to
// increment the version number at the very
// bottom of the file to notify users about
// the new SnapshotHelper.swift
// the new SnapshotHelperXcode8.swift
// -----------------------------------------------------

import Foundation
Expand Down Expand Up @@ -129,8 +129,8 @@ open class Snapshot: NSObject {

class func pathPrefix() -> URL? {
let homeDir: URL
//on OSX config is stored in /Users/<username>/Library
//and on iOS/tvOS/WatchOS it's in simulator's home dir
// on OSX config is stored in /Users/<username>/Library
// and on iOS/tvOS/WatchOS it's in simulator's home dir
#if os(OSX)
guard let user = ProcessInfo().environment["USER"] else {
print("Couldn't find Snapshot configuration files - can't detect current user ")
Expand Down Expand Up @@ -170,4 +170,4 @@ extension XCUIElement {

// Please don't remove the lines below
// They are used to detect outdated configuration files
// SnapshotHelperVersion [1.4]
// SnapshotHelperXcode8Version [1.4]
6 changes: 5 additions & 1 deletion Snapfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ languages([
"da",
"de",
"es",
"fa",
"fr",
"it",
"ja",
"ko",
"nl",
"pt",
"ru",
"sv-SE"
"sv",
"zh-Hans",
"zh-Hant"
])

# The name of the scheme which contains the UI Tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
skipped = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "75A2A7A31DA5934300A983D8"
Expand All @@ -49,7 +49,7 @@
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
skipped = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "75A2A7AE1DA5934300A983D8"
Expand Down

0 comments on commit 86d4b3e

Please sign in to comment.