Fixes automation tests.
This commit is contained in:
parent
cf7dd1714c
commit
e3154bd2b7
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue