Fixes automation tests.

This commit is contained in:
Krunoslav Zaher 2016-03-13 16:21:14 +01:00
parent cf7dd1714c
commit e3154bd2b7
2 changed files with 11 additions and 4 deletions

View File

@ -70,11 +70,16 @@ class TableViewWithEditingCommandsViewController: ViewController, UITableViewDel
imageURL: "http://nerdreactor.com/wp-content/uploads/2015/02/Superman1.jpg"
)
let watMan = User(firstName: "Wat",
lastName: "Man",
imageURL: "http://www.iri.upc.edu/files/project/98/main.GIF"
)
let loadFavoriteUsers = RandomUserAPI.sharedAPI
.getExampleUserResultSet()
.map(TableViewEditingCommand.SetUsers)
let initialLoadCommand = Observable.just(TableViewEditingCommand.SetFavoriteUsers(favoriteUsers: [superMan]))
let initialLoadCommand = Observable.just(TableViewEditingCommand.SetFavoriteUsers(favoriteUsers: [superMan, watMan]))
.concat(loadFavoriteUsers)
.observeOn(MainScheduler.instance)

View File

@ -8,21 +8,23 @@ test("----- masterDetail -----", function (check, pass) {
var target = UIATarget.localTarget()
target.delay(2)
target.frontMostApp().mainWindow().tableViews()[0].cells()[10].tap();
target.frontMostApp().navigationBar().rightButton().tap();
target.frontMostApp().mainWindow().dragInsideWithOptions({startOffset:{x:0.93, y:yOffset(300)}, endOffset:{x:0.95, y:yOffset(200)}, duration:1.5});
target.frontMostApp().mainWindow().dragInsideWithOptions({startOffset:{x:0.93, y:yOffset(300)}, endOffset:{x:0.95, y:yOffset(100)}, duration:1.5});
var firstCell = UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[1]
var firstCell = UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[0]
firstCell.buttons()[0].tap();
firstCell.tapWithOptions({tapOffset:{x:0.05, y:0.77}});
firstCell.buttons()["Delete"].tap();
target.delay( 3 );
target.frontMostApp().navigationBar().rightButton().tap();
target.frontMostApp().mainWindow().tableViews()[0].cells()[1].tap();
target.frontMostApp().mainWindow().tableViews()[0].cells()[0].tap();
goBack();
goBack();