Author: dsvyatobatsko
Date: 2009-03-09 07:38:06 -0400 (Mon, 09 Mar 2009)
New Revision: 12888
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelBarTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PickListTest.java
Log:
RF-6163
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2009-03-08
16:41:16 UTC (rev 12887)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2009-03-09
11:38:06 UTC (rev 12888)
@@ -413,7 +413,7 @@
changeValue();
clickSubmit();
- checkValueChangeListener(false);
+ checkValueChangeListener(true);
checkUpdateModel(false);
}
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelBarTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelBarTest.java 2009-03-08
16:41:16 UTC (rev 12887)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelBarTest.java 2009-03-09
11:38:06 UTC (rev 12888)
@@ -26,7 +26,6 @@
import org.ajax4jsf.template.Template;
import org.richfaces.AutoTester;
import org.richfaces.SeleniumTestBase;
-import org.testng.Assert;
import org.testng.annotations.Test;
public class PanelBarTest extends SeleniumTestBase {
@@ -52,28 +51,28 @@
writeStatus("Click on label two. It should be opened.");
clickById(label2);
- Assert.assertFalse(isVisibleById(output1));
- Assert.assertTrue(isVisibleById(output2));
- Assert.assertFalse(isVisibleById(output3));
+ AssertNotVisible(output1);
+ AssertVisible(output2);
+ AssertNotVisible(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));
+ AssertNotVisible(output1);
+ AssertVisible(output2);
+ AssertNotVisible(output3);
writeStatus("Click on label three. It should be opened.");
clickById(label3);
- Assert.assertFalse(isVisibleById(output1));
- Assert.assertFalse(isVisibleById(output2));
- Assert.assertTrue(isVisibleById(output3));
+ AssertNotVisible(output1);
+ AssertNotVisible(output2);
+ AssertVisible(output3);
writeStatus("Click on ajax commandButton. Opened states should not
change.");
clickById(ajaxButton);
waitForAjaxCompletion();
- Assert.assertFalse(isVisibleById(output1));
- Assert.assertFalse(isVisibleById(output2));
- Assert.assertTrue(isVisibleById(output3));
+ AssertNotVisible(output1);
+ AssertNotVisible(output2);
+ AssertVisible(output3);
}
@Test
@@ -89,7 +88,15 @@
AutoTester tester = getAutoTester(this);
tester.renderPage(template, null);
writeStatus("Test component's form submission with an invalid element in
it");
- tester.testSubmitWithExternalValidationFailed();
+ tester.reset();
+ tester.clickLoad();
+
+ tester.setExtrenalValidationFailed();
+ changeValue();
+ tester.clickSubmit();
+
+ tester.checkValueChangeListener(false);
+ tester.checkUpdateModel(false);
}
@Test
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PickListTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PickListTest.java 2009-03-08
16:41:16 UTC (rev 12887)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PickListTest.java 2009-03-09
11:38:06 UTC (rev 12888)
@@ -326,6 +326,14 @@
}
@Test
+ public void testWithExternalValidationFailure(Template template) {
+ AutoTester autoTester = getAutoTester(this);
+ autoTester.renderPage(template, null);
+ writeStatus("Check component in case of external validation failure:
valueChangeListeners are invoked, model is not updated");
+ autoTester.testSubmitWithExternalValidationFailed();
+ }
+
+ @Test
public void testI18N(Template template) {
renderPage(I18N_TEST_URL, template, RESET_METHOD);