Author: lfryc(a)redhat.com
Date: 2010-07-10 17:12:23 -0400 (Sat, 10 Jul 2010)
New Revision: 17909
Modified:
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/a4jCommandButton/A4JCommandButtonTestCase.java
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/a4jCommandLink/A4JCommandLinkTestCase.java
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/hCommandButton/HCommandButtonTestCase.java
Log:
attribute inputs reacts to CHANGE event but tests was firing BLUR event (note that
selenium.type fires CHANGE event out-of-the-box)
Modified:
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/a4jCommandButton/A4JCommandButtonTestCase.java
===================================================================
---
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/a4jCommandButton/A4JCommandButtonTestCase.java 2010-07-10
21:11:53 UTC (rev 17908)
+++
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/a4jCommandButton/A4JCommandButtonTestCase.java 2010-07-10
21:12:23 UTC (rev 17909)
@@ -228,7 +228,6 @@
ElementLocator renderInput = pjq("input[name$=renderInput]");
selenium.type(renderInput, "output1");
- selenium.fireEvent(renderInput, Event.BLUR);
selenium.waitForPageToLoad(TIMEOUT);
selenium.typeKeys(input, "aaa");
@@ -246,7 +245,6 @@
assertEquals(output, "", "output3 when 'aaa' in input and
'output1' set to be rerendered");
selenium.type(renderInput, "output2 output3");
- selenium.fireEvent(renderInput, Event.BLUR);
selenium.waitForPageToLoad(TIMEOUT);
selenium.typeKeys(input, "bbb");
@@ -302,9 +300,8 @@
final String value = "font-size: 20px;";
selenium.type(styleInput, value);
- selenium.fireEvent(styleInput, Event.BLUR);
-
selenium.waitForPageToLoad(TIMEOUT);
+
assertEquals(selenium.getAttribute(attribute), value, "Style of the button
did not change");
}
@@ -315,9 +312,8 @@
final String value = "new label";
selenium.type(valueInput, value);
- selenium.fireEvent(valueInput, Event.BLUR);
-
selenium.waitForPageToLoad(TIMEOUT);
+
assertEquals(selenium.getAttribute(attribute), value, "Value of the button
did not change");
}
Modified:
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/a4jCommandLink/A4JCommandLinkTestCase.java
===================================================================
---
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/a4jCommandLink/A4JCommandLinkTestCase.java 2010-07-10
21:11:53 UTC (rev 17908)
+++
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/a4jCommandLink/A4JCommandLinkTestCase.java 2010-07-10
21:12:23 UTC (rev 17909)
@@ -231,7 +231,6 @@
ElementLocator renderInput = pjq("input[name$=renderInput]");
selenium.type(renderInput, "output1");
- selenium.fireEvent(renderInput, Event.BLUR);
selenium.waitForPageToLoad(TIMEOUT);
selenium.typeKeys(input, "aaa");
@@ -249,7 +248,6 @@
assertEquals(output, "", "output3 when 'aaa' in input and
'output1' set to be rerendered");
selenium.type(renderInput, "output2 output3");
- selenium.fireEvent(renderInput, Event.BLUR);
selenium.waitForPageToLoad(TIMEOUT);
selenium.typeKeys(input, "bbb");
@@ -305,9 +303,8 @@
final String value = "font-size: 20px;";
selenium.type(styleInput, value);
- selenium.fireEvent(styleInput, Event.BLUR);
-
selenium.waitForPageToLoad(TIMEOUT);
+
assertEquals(selenium.getAttribute(attribute), value, "Style of the button
did not change");
}
@@ -317,9 +314,8 @@
final String value = "new label";
selenium.type(valueInput, value);
- selenium.fireEvent(valueInput, Event.BLUR);
-
selenium.waitForPageToLoad(TIMEOUT);
+
assertEquals(selenium.getText(link), value, "Value of the button did not
change");
}
Modified:
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/hCommandButton/HCommandButtonTestCase.java
===================================================================
---
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/hCommandButton/HCommandButtonTestCase.java 2010-07-10
21:11:53 UTC (rev 17908)
+++
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/hCommandButton/HCommandButtonTestCase.java 2010-07-10
21:12:23 UTC (rev 17909)
@@ -270,9 +270,8 @@
final String value = "font-size: 20px;";
selenium.type(styleInput, value);
- selenium.fireEvent(styleInput, Event.BLUR);
-
selenium.waitForPageToLoad(TIMEOUT);
+
assertEquals(selenium.getAttribute(attribute), value, "Style of the button
did not change");
}
@@ -283,9 +282,8 @@
final String value = "new label";
selenium.type(valueInput, value);
- selenium.fireEvent(valueInput, Event.BLUR);
-
selenium.waitForPageToLoad(TIMEOUT);
+
assertEquals(selenium.getAttribute(attribute), value, "Value of the button
did not change");
}