Author: jjamrich
Date: 2011-11-09 09:40:33 -0500 (Wed, 09 Nov 2011)
New Revision: 22913
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richEditor/TestRichEditor.java
Log:
EFPL-1638: cover @ondirty by selenium tests
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richEditor/TestRichEditor.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richEditor/TestRichEditor.java 2011-11-09
14:40:21 UTC (rev 22912)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richEditor/TestRichEditor.java 2011-11-09
14:40:33 UTC (rev 22913)
@@ -19,6 +19,7 @@
import org.jboss.test.selenium.locator.AttributeLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.utils.URLUtils;
+import org.jboss.test.selenium.waiting.EventFiredCondition;
import org.jboss.test.selenium.waiting.selenium.SeleniumCondition;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
@@ -213,6 +214,18 @@
}
@Test
+ public void testOnDirty1() {
+ testFireEvent(new Event("dirty"), editorTextArea);
+ }
+
+ @Test
+ public void testOnDirty2() {
+ editorAttributes.set(ondirty, "alert('editor is in dirty
state')");
+ typeTextToEditor(" xyg pojads goihasrg u");
+ assertTrue(selenium.isAlertPresent());
+ }
+
+ @Test
public void testOnChange() {
testFireEvent(Event.CHANGE, editorTextArea);
}
Show replies by date