Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jonkykong committed Oct 11, 2019
1 parent 17b8fcd commit 538e84a
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions ExampleTests/ExampleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ class ExampleTests: XCTestCase {
private var mainViewController: XCUIElement {
return app.navigationBars[swipeHere]
}
private var mainViewControllerNavigation: XCUIElement {
return mainViewController.otherElements[swipeHere]
}

override func setUp() {
// Put setup code here. This method is called before the invocation of each test method in the class.
Expand Down Expand Up @@ -55,19 +52,18 @@ class ExampleTests: XCTestCase {
mainViewController.buttons["Right Menu"].tap()
app.tables/*@START_MENU_TOKEN@*/.staticTexts["Present View Controller 1"]/*[[".cells.staticTexts[\"Present View Controller 1\"]",".staticTexts[\"Present View Controller 1\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap()
app.buttons["Dismiss"].tap()
mainViewController.tap()
validate()
}
}

func testSwiping() {
mainViewControllerNavigation.swipeRight()
let element = app.children(matching: .window).element(boundBy: 0).children(matching: .other).element
element.swipeLeft()
mainViewController.swipeRight()
mainViewController.swipeLeft()
validate()

element.swipeLeft()
mainViewControllerNavigation.swipeLeft()
element.swipeRight()
mainViewController.swipeLeft()
mainViewController.swipeRight()
validate()
}

Expand Down

0 comments on commit 538e84a

Please sign in to comment.