Author: sergeyhalipov
Date: 2008-05-28 12:39:58 -0400 (Wed, 28 May 2008)
New Revision: 8809
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/OrderingListTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PanelBarTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java
Log:
Selenium: some small changes.
Modified: trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-05-28
15:44:42 UTC (rev 8808)
+++
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-05-28
16:39:58 UTC (rev 8809)
@@ -107,7 +107,7 @@
<managed-bean>
<managed-bean-name>orderingListBean</managed-bean-name>
<managed-bean-class>org.ajax4jsf.bean.OrderingListTestBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
+ <managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>dataTableBean</managed-bean-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-05-28
15:44:42 UTC (rev 8808)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/OrderingListTest.java 2008-05-28
16:39:58 UTC (rev 8809)
@@ -120,8 +120,6 @@
clickById(firstButton);
checkButtons(true, true, false, false);
Assert.assertEquals(selenium.getElementIndex("id=" + firstRow), 0);
-
- cleanSelection();
}
private void _testActions() {
@@ -148,8 +146,6 @@
AssertTextEquals(selectionText, "item0");
AssertTextEquals(activeItemText, "Item [item0]");
checkButtons(true, true, false, false);
-
- cleanSelection();
}
private void _testJSFunctions() {
@@ -171,23 +167,8 @@
writeStatus("Check if 'onbottomclick' event works");
clickById(lastButton);
Assert.assertEquals(selenium.getEval("window.status"), "bottom
orderchanged");
-
- cleanSelection();
}
- private void cleanSelection() {
- writeStatus("Unselect element");
- clickById(firstRow);
- selenium.controlKeyDown();
- clickById(firstRow);
- selenium.controlKeyUp();
- checkButtons(true, true, true, true);
-
- writeStatus("Submit empty selection to save it into server bean");
- clickById(ajax);
- waitForAjaxCompletion();
- }
-
private void checkButtons(boolean firstDisabled, boolean upDisabled, boolean
downDisabled, boolean lastDisabled) {
if (firstDisabled) {
Assert.assertTrue(isVisibleById(firstButtonDisabled));
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PanelBarTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PanelBarTest.java 2008-05-28
15:44:42 UTC (rev 8808)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PanelBarTest.java 2008-05-28
16:39:58 UTC (rev 8809)
@@ -76,21 +76,25 @@
String ajaxButton = parentId + "button_ajax";
String simpleButton = parentId + "button_simple";
+ writeStatus("Click on label two. It should be opened.");
clickById(label2);
Assert.assertFalse(isVisibleById(output1));
Assert.assertTrue(isVisibleById(output2));
Assert.assertFalse(isVisibleById(output3));
+ writeStatus("Click on simple commandButton. Opened states should not change
after page reloaded.");
clickCommandAndWait(simpleButton);
Assert.assertFalse(isVisibleById(output1));
Assert.assertTrue(isVisibleById(output2));
Assert.assertFalse(isVisibleById(output3));
+ writeStatus("Click on label three. It should be opened.");
clickById(label3);
Assert.assertFalse(isVisibleById(output1));
Assert.assertFalse(isVisibleById(output2));
Assert.assertTrue(isVisibleById(output3));
+ writeStatus("Click on ajax commandButton. Opened states should not
change.");
clickById(ajaxButton);
waitForAjaxCompletion();
Assert.assertFalse(isVisibleById(output1));
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java 2008-05-28
15:44:42 UTC (rev 8808)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java 2008-05-28
16:39:58 UTC (rev 8809)
@@ -74,28 +74,34 @@
String serverBody = parentId + "panel2_body";
String clientBody = parentId + "panel3_body";
+ writeStatus("Click on client simple toggle panel. It should be opened.");
clickById(clientHeader);
Assert.assertTrue(isVisibleById(clientBody));
+ writeStatus("Click on client simple toggle panel again. It should be
closed.");
clickById(clientHeader);
Assert.assertFalse(isVisibleById(clientBody));
+ writeStatus("Click on ajax simple toggle panel. It should be
opened.");
clickById(ajaxHeader);
- waitForAjaxCompletion(5000);
+ waitForAjaxCompletion();
AssertValueEquals(inputId, "panel1");
AssertTextEquals(outputId, "1");
Assert.assertTrue(isVisibleById(ajaxBody));
+ writeStatus("Click on ajax simple toggle panel again. It should be
closed.");
clickById(ajaxHeader);
- waitForAjaxCompletion(5000);
+ waitForAjaxCompletion();
AssertValueEquals(inputId, "panel1");
AssertTextEquals(outputId, "2");
Assert.assertFalse(isVisibleById(ajaxBody));
+ writeStatus("Click on server simple toggle panel. It should be
opened.");
clickCommandAndWait(serverHeader);
AssertValueEquals(inputId, "panel2");
AssertTextEquals(outputId, "3");
Assert.assertTrue(isVisibleById(serverBody));
+ writeStatus("Click on server simple toggle panel. It should be
closed.");
clickCommandAndWait(serverHeader);
AssertValueEquals(inputId, "panel2");
AssertTextEquals(outputId, "4");
Show replies by date