Author: dsvyatobatsko
Date: 2008-08-05 10:10:24 -0400 (Tue, 05 Aug 2008)
New Revision: 9918
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/pages/orderingList/orderingListTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/OrderingListTest.java
Log:
an orderingListTest partial fix
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/pages/orderingList/orderingListTest.xhtml
===================================================================
---
trunk/test-applications/seleniumTest/src/main/webapp/pages/orderingList/orderingListTest.xhtml 2008-08-05
11:58:14 UTC (rev 9917)
+++
trunk/test-applications/seleniumTest/src/main/webapp/pages/orderingList/orderingListTest.xhtml 2008-08-05
14:10:24 UTC (rev 9918)
@@ -11,6 +11,9 @@
.link {margin: 0px 5px}
</ui:define>
<ui:define name="component">
+ <script>
+ var theLatestEvent = "";
+ </script>
<h:form id="_form">
<rich:orderingList id="orderingList"
converter="#{orderingListBean.converter}"
@@ -20,13 +23,12 @@
selection="#{orderingListBean.selection}"
activeItem="#{orderingListBean.activeItem}"
- onbottomclick="window.status = 'bottom';"
- ondownclick="window.status = 'down';"
- ontopclick="window.status = 'top';"
- onupclick="window.status = 'up';"
- onorderchanged="window.status += ' orderchanged';"
+ onbottomclick="theLatestEvent = 'bottom';"
+ ondownclick="theLatestEvent = 'down';"
+ ontopclick="theLatestEvent = 'top';"
+ onupclick="theLatestEvent = 'up';"
+ onorderchanged="theLatestEvent += ' orderchanged';"
-
<h:column>
<f:facet name="header">
<h:outputText value="Name" />
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/OrderingListTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/OrderingListTest.java 2008-08-05
11:58:14 UTC (rev 9917)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/OrderingListTest.java 2008-08-05
14:10:24 UTC (rev 9918)
@@ -126,19 +126,19 @@
writeStatus("Check if 'onupclick' event works");
clickById(upButton);
- Assert.assertEquals(selenium.getEval("window.status"), "up
orderchanged");
+ Assert.assertEquals(runScript("theLatestEvent"), "up
orderchanged");
writeStatus("Check if 'ondownclick' event works");
clickById(downButton);
- Assert.assertEquals(selenium.getEval("window.status"), "down
orderchanged");
+ Assert.assertEquals(runScript("theLatestEvent"), "down
orderchanged");
writeStatus("Check if 'ontopclick' event works");
clickById(firstButton);
- Assert.assertEquals(selenium.getEval("window.status"), "top
orderchanged");
+ Assert.assertEquals(runScript("theLatestEvent"), "top
orderchanged");
writeStatus("Check if 'onbottomclick' event works");
clickById(lastButton);
- Assert.assertEquals(selenium.getEval("window.status"), "bottom
orderchanged");
+ Assert.assertEquals(runScript("theLatestEvent"), "bottom
orderchanged");
}
private void checkButtons(boolean firstDisabled, boolean upDisabled, boolean
downDisabled, boolean lastDisabled) {