From c4e14ffac9b93f1f2c4cdd8ead9a56adc3e5ba67 Mon Sep 17 00:00:00 2001 From: John Smart Date: Mon, 29 Sep 2014 12:33:20 -0700 Subject: [PATCH] Made test more robust --- .../services/acceptancetests/pages/MyAccountPage.java | 4 ++++ .../services/acceptancetests/steps/MyAccountUISteps.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/pages/MyAccountPage.java b/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/pages/MyAccountPage.java index b9666cf..03553bd 100644 --- a/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/pages/MyAccountPage.java +++ b/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/pages/MyAccountPage.java @@ -26,4 +26,8 @@ public int getCalculatedPoints() { public int getPointBalance() { return Integer.valueOf($(".status-points-balance").getText()); } + + public void waitForDestionionList() { + waitFor(".possible-destination"); + } } diff --git a/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/steps/MyAccountUISteps.java b/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/steps/MyAccountUISteps.java index 64b93f6..c45d618 100644 --- a/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/steps/MyAccountUISteps.java +++ b/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/steps/MyAccountUISteps.java @@ -12,7 +12,7 @@ public class MyAccountUISteps { @Step public void openAccountPage() { myAccountPage.open(); - myAccountPage.waitFor(500).milliseconds(); + myAccountPage.waitForDestionionList(); } @Step