Repository: tapestry-5 Updated Branches: refs/heads/master 0795a42b5 -> 2bfc3d7c2
More test fixing. Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/2bfc3d7c Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/2bfc3d7c Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/2bfc3d7c Branch: refs/heads/master Commit: 2bfc3d7c2f2c385168ea82866d43615804d5759b Parents: 0795a42 Author: Thiago H. de Paula Figueiredo <[email protected]> Authored: Sat Nov 24 16:33:55 2018 -0200 Committer: Thiago H. de Paula Figueiredo <[email protected]> Committed: Sat Nov 24 16:33:55 2018 -0200 ---------------------------------------------------------------------- .../integration/app1/AlertsTests.groovy | 10 +++++----- .../integration/TapestryCoreTestCase.java | 2 +- .../tapestry5/integration/app1/FormTests.java | 6 +++--- .../apache/tapestry5/test/SeleniumTestCase.java | 20 -------------------- 4 files changed, 9 insertions(+), 29 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/2bfc3d7c/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy ---------------------------------------------------------------------- diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy index 92854f7..de1df6c 100644 --- a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy +++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy @@ -34,13 +34,13 @@ class AlertsTests extends App1TestCase { clickAndWait "//input[@value='Traditional Update']" - waitForCSSSelectedElementToAppear "$CONTAINER .alert" + waitForCssSelectorToAppear "$CONTAINER .alert" assertTextPresent "trad warn until" clickAndWait BACK_TO_INDEX - waitForCSSSelectedElementToAppear "$CONTAINER .alert" + waitForCssSelectorToAppear "$CONTAINER .alert" assertTextPresent "trad warn until" @@ -78,7 +78,7 @@ class AlertsTests extends App1TestCase { clickAndWait "//input[@value='Traditional Update']" - waitForCSSSelectedElementToAppear "$CONTAINER .alert" + waitForCssSelectorToAppear "$CONTAINER .alert" assertTextPresent "trad warn transient" @@ -110,7 +110,7 @@ class AlertsTests extends App1TestCase { click "//input[@value='Ajax Update']" - waitForCSSSelectedElementToAppear "$CONTAINER .alert" + waitForCssSelectorToAppear "$CONTAINER .alert" assertTextPresent "ajax error until" @@ -133,7 +133,7 @@ class AlertsTests extends App1TestCase { click "//input[@value='Ajax Update']" - waitForCSSSelectedElementToAppear "$CONTAINER .alert" + waitForCssSelectorToAppear "$CONTAINER .alert" assert isElementPresent("//div[@class='alert alert-dismissable alert-warning']/a/span[text()='Markup!']") http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/2bfc3d7c/tapestry-core/src/test/java/org/apache/tapestry5/integration/TapestryCoreTestCase.java ---------------------------------------------------------------------- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/TapestryCoreTestCase.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/TapestryCoreTestCase.java index 204f9ad..b9f71a9 100644 --- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/TapestryCoreTestCase.java +++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/TapestryCoreTestCase.java @@ -69,7 +69,7 @@ public abstract class TapestryCoreTestCase extends SeleniumTestCase */ protected final void assertFirstAlert(String text) { - waitForCSSSelectedElementToAppear("[data-container-type=alerts] .alert"); + waitForCssSelectorToAppear("*[data-container-type=alerts] .alert"); // Add the special "x" for the close button to the text. assertText("css=[data-container-type=alerts] .alert span", text); http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/2bfc3d7c/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java ---------------------------------------------------------------------- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java index fa792b6..5db2f79 100644 --- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java +++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java @@ -278,7 +278,7 @@ public class FormTests extends App1TestCase //make sure it's still selected if we navigate back... click("css=button.previousButton"); - waitForCSSSelectedElementToAppear("td.selected"); + waitForCssSelectorToAppear("td.selected"); click("css=button.nextButton"); @@ -316,7 +316,7 @@ public class FormTests extends App1TestCase waitForSelectedToBeRemoved(); click("css=div.datePicker .footerTable button"); - waitForCSSSelectedElementToAppear("td.selected"); + waitForCssSelectorToAppear("td.selected"); //#1 click("css=div.datePicker .footerTable button"); @@ -382,7 +382,7 @@ public class FormTests extends App1TestCase click("css=.x-impact .btn"); waitForCondition(datePickerVisible); click("css=a.topLabel"); - waitForCSSSelectedElementToAppear("div.labelPopup"); + waitForCssSelectorToAppear("div.labelPopup"); click("css=div.labelPopup a"); waitForInvisible("css=div.labelPopup"); http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/2bfc3d7c/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java ---------------------------------------------------------------------- diff --git a/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java b/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java index b684895..d7ac8ab 100644 --- a/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java +++ b/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java @@ -1654,26 +1654,6 @@ public abstract class SeleniumTestCase extends Assert implements Selenium } /** - * Waits, up to the page load limit for an element (identified by a CSS rule) to exist - * (it is not assured that the element will be visible). - * - * This implementation only works if the application provides a function onto the - * window object: "testSupport.findCSSMatchCount()" which accepts a CSS rule and returns the number - * of matching elements. - * - * @param cssSelector - * used to locate the element - * @since 5.3 - * @deprecated Deprecated in 5.4 with no replacement - */ - protected void waitForCSSSelectedElementToAppear(String cssSelector) - { - String condition = String.format("window.testSupport.findCSSMatchCount(\"%s\") > 0", cssSelector); - - waitForCondition(condition, PAGE_LOAD_TIMEOUT); - } - - /** * Waits for the element with the given client-side id to be present in the DOM ( * does not assure that the element is visible). *
