Author: jharting
Date: 2011-01-18 09:13:56 -0500 (Tue, 18 Jan 2011)
New Revision: 13999
Modified:
branches/community/Seam_2_2/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SearchTest.java
Log:
JBSEAM-4764
Modified:
branches/community/Seam_2_2/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SearchTest.java
===================================================================
---
branches/community/Seam_2_2/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SearchTest.java 2011-01-18
12:08:08 UTC (rev 13998)
+++
branches/community/Seam_2_2/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SearchTest.java 2011-01-18
14:13:56 UTC (rev 13999)
@@ -47,8 +47,9 @@
browser.type(getProperty("SEARCH_FIELD"), searchString);
browser.click(getProperty("SEARCH_SUBMIT"));
browser.waitForPageToLoad(TIMEOUT);
- assertEquals("Unexpected number of results. One result expected.", 1,
- browser.getXpathCount(getProperty("SEARCH_RESULT_ITEM")));
+ //exact number of matches depends on search algorithm,
+ //so we only check that at least something was found:
+ assertTrue("Unexpected number of results. One result expected.",
browser.getXpathCount(getProperty("SEARCH_RESULT_ITEM")).intValue() > 0);
browser.click(getProperty("SEARCH_RESULT_FIRST_ROW_LINK"));
browser.waitForPageToLoad(TIMEOUT);
assertTrue("Navigation failure.", browser.getLocation().contains(