Author: sergeyhalipov
Date: 2008-04-21 10:02:04 -0400 (Mon, 21 Apr 2008)
New Revision: 7999
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TabPanelTest.java
Log:
Some changes in selenium tests for tab panel.
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TabPanelTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TabPanelTest.java 2008-04-21
14:01:59 UTC (rev 7998)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TabPanelTest.java 2008-04-21
14:02:04 UTC (rev 7999)
@@ -29,6 +29,8 @@
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
+import com.thoughtworks.selenium.SeleniumException;
+
public class TabPanelTest extends SeleniumTestBase implements RichSeleniumTest {
public TabPanelTest() {
@@ -76,16 +78,30 @@
clickById(linkId);
waitForAjaxCompletion();
AssertValueEquals(inputId, "tab2");
+ AssertTextEquals(outputId, "2");
Assert.assertTrue(isVisibleById(tabId2));
- AssertTextEquals(outputId, "2");
+ Assert.assertFalse(isVisibleById(tabId4));
+ try {
+ getTextById(tabId1);
+ Assert.fail("Both of 'tab1' and 'tab2' tabs were rendered
for tab panel.");
+ } catch (SeleniumException se) {
+
+ }
linkId = parentId + "tab1_lbl";
clickById(linkId);
waitForPageToLoad();
AssertValueEquals(inputId, "tab1");
+ AssertTextEquals(outputId, "1");
Assert.assertTrue(isVisibleById(tabId1));
- AssertTextEquals(outputId, "1");
+ Assert.assertFalse(isVisibleById(tabId4));
+ try {
+ getTextById(tabId2);
+ Assert.fail("Both of 'tab1' and 'tab2' tabs were rendered
for tab panel.");
+ } catch (SeleniumException se) {
+
+ }
linkId = parentId + "tab3_lbl";
clickById(linkId);
@@ -95,6 +111,13 @@
linkId = parentId + "tab4_lbl";
clickById(linkId);
Assert.assertTrue(isVisibleById(tabId4));
+ Assert.assertFalse(isVisibleById(tabId1));
+ try {
+ getTextById(tabId2);
+ Assert.fail("Both of 'tab1' and 'tab2' tabs were rendered
for tab panel.");
+ } catch (SeleniumException se) {
+
+ }
}
}
Show replies by date