You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2012/02/22 14:24:13 UTC
svn commit: r1292274 -
/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/popup/BugTobago1091SeleniumTest.java
Author: lofwyr
Date: Wed Feb 22 13:24:13 2012
New Revision: 1292274
URL: http://svn.apache.org/viewvc?rev=1292274&view=rev
Log:
TOBAGO-1091: Closing a Popup with defaultCommand="true" will flush checkboxes on the page
- true and checked are the same, but in different test scenarios both values are possible
Modified:
myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/popup/BugTobago1091SeleniumTest.java
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/popup/BugTobago1091SeleniumTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/popup/BugTobago1091SeleniumTest.java?rev=1292274&r1=1292273&r2=1292274&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/popup/BugTobago1091SeleniumTest.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/popup/BugTobago1091SeleniumTest.java Wed Feb 22 13:24:13 2012
@@ -23,6 +23,9 @@ import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
+import static org.hamcrest.CoreMatchers.anyOf;
+import static org.hamcrest.CoreMatchers.is;
+
@RunWith(Parameterized.class)
public class BugTobago1091SeleniumTest extends MultiSuffixSeleniumTest {
@@ -35,8 +38,10 @@ public class BugTobago1091SeleniumTest e
// load page
open("/tc/popup/popup-bug-tobago-1091.");
- Assert.assertEquals(
- "Checkbox should be checked!", "true", getSelenium().getAttribute("page:check@checked"));
+ Assert.assertThat(
+ "Checkbox should be checked!",
+ getSelenium().getAttribute("page:check@checked"),
+ anyOf(is("true"), is("checked")));
// click on open popup
getSelenium().click("page:open");
@@ -46,7 +51,9 @@ public class BugTobago1091SeleniumTest e
getSelenium().click("page:popup:close");
getSelenium().waitForPageToLoad("5000");
- Assert.assertEquals(
- "Checkbox should be checked!", "true", getSelenium().getAttribute("page:check@checked"));
+ Assert.assertThat(
+ "Checkbox should be checked!",
+ getSelenium().getAttribute("page:check@checked"),
+ anyOf(is("true"), is("checked")));
}
}