diff --git a/scripts/automation-tests/01_githubSignUp.js b/scripts/automation-tests/01_githubSignUp.js index ee825886..165add64 100644 --- a/scripts/automation-tests/01_githubSignUp.js +++ b/scripts/automation-tests/01_githubSignUp.js @@ -5,9 +5,9 @@ test("----- githubSignUp -----", function (check, pass) { var target = UIATarget.localTarget(); UIATarget.onAlert = function(alert){ - var okButton = UIATarget.localTarget().frontMostApp().alert().buttons()["OK"]; - okButton.tap(); + var okButton = UIATarget.localTarget().frontMostApp().alert().cancelButton().tap(); + sleep(1) UIATarget.localTarget().frontMostApp().navigationBar().leftButton().tap(); pass() @@ -17,16 +17,17 @@ test("----- githubSignUp -----", function (check, pass) { target.frontMostApp().mainWindow().tableViews()[0].cells()[2].tap(); target.frontMostApp().mainWindow().textFields()[0].tap(); - writeInElement(target.frontMostApp().mainWindow().textFields()[0], "rxrevolution") + target.frontMostApp().keyboard().typeString("rxrevolution") target.frontMostApp().mainWindow().secureTextFields()[0].tap(); - writeInElement(target.frontMostApp().mainWindow().secureTextFields()[0], "mypassword") - + target.frontMostApp().keyboard().typeString("mypassword") target.frontMostApp().mainWindow().secureTextFields()[1].tap(); - writeInElement(target.frontMostApp().mainWindow().secureTextFields()[1], "mypassword") + target.frontMostApp().keyboard().typeString("mypassword") UIATarget.localTarget().tap({x:14.50, y:80.00}); target.frontMostApp().mainWindow().buttons()["Sign up"].tap(); + + sleep(2) }); diff --git a/scripts/automation-tests/02_searchWikipedia.js b/scripts/automation-tests/02_searchWikipedia.js index 6c27fa58..26300193 100644 --- a/scripts/automation-tests/02_searchWikipedia.js +++ b/scripts/automation-tests/02_searchWikipedia.js @@ -6,7 +6,7 @@ test("----- searchWikipedia -----", function (check, pass) { var width = target.frontMostApp().mainWindow().rect().size.width - target.frontMostApp().mainWindow().tableViews()[0].cells()[9].tap(); + target.frontMostApp().mainWindow().tableViews()[0].cells()[10].tap(); target.delay(2); diff --git a/scripts/automation-tests/05_reactivePartialUpdates.js b/scripts/automation-tests/05_reactivePartialUpdates.js index 2d8e0b45..86dfa865 100644 --- a/scripts/automation-tests/05_reactivePartialUpdates.js +++ b/scripts/automation-tests/05_reactivePartialUpdates.js @@ -3,7 +3,7 @@ test("----- reactivePartialUpdates -----", function (check, pass) { var target = UIATarget.localTarget() - target.frontMostApp().mainWindow().tableViews()[0].cells()[11].tap(); + target.frontMostApp().mainWindow().tableViews()[0].cells()[9].tap(); target.frontMostApp().navigationBar().rightButton().tap(); target.frontMostApp().navigationBar().rightButton().tap(); target.frontMostApp().navigationBar().rightButton().tap(); diff --git a/scripts/automation-tests/common.js b/scripts/automation-tests/common.js index 0991fa36..0a9707cb 100644 --- a/scripts/automation-tests/common.js +++ b/scripts/automation-tests/common.js @@ -45,10 +45,4 @@ function warning(string) { function sleep(time) { UIATarget.localTarget().delay(time); -} - -function writeInElement(element, text) { - for (var i = 1; i < text.length + 1; i++) { - element.setValue(text.substring(0, i)); - } -} +} \ No newline at end of file diff --git a/scripts/pre-release-tests.sh b/scripts/pre-release-tests.sh index 4135dd3e..ebe48e79 100755 --- a/scripts/pre-release-tests.sh +++ b/scripts/pre-release-tests.sh @@ -9,7 +9,7 @@ if [ `xcodebuild -showsdks | grep tvOS | wc -l` -gt 0 ]; then fi if [ "$1" == "r" ]; then - printf "${GREEN}Pre release tests on, hang on tight ...${RESET}" + printf "${GREEN}Pre release tests on, hang on tight ...${RESET}\n" RELEASE_TEST=1 fi