Revision ee8a0262
Added by Andreas Kohlbecker over 3 years ago
src/main/java/eu/etaxonomy/dataportal/pages/PortalPage.java | ||
---|---|---|
1 | 1 |
package eu.etaxonomy.dataportal.pages; |
2 | 2 |
|
3 | 3 |
import static org.junit.Assert.assertFalse; |
4 |
import static org.junit.Assert.assertTrue; |
|
5 | 4 |
|
6 | 5 |
import java.io.File; |
7 | 6 |
import java.io.IOException; |
... | ... | |
148 | 147 |
|
149 | 148 |
takeScreenShot(); |
150 | 149 |
|
151 |
|
|
152 | 150 |
// This call sets the WebElement fields. |
153 | 151 |
PageFactory.initElements(driver, this); |
154 | 152 |
|
155 | 153 |
pageHealthChecks(); |
156 | 154 |
|
157 |
|
|
158 |
|
|
159 | 155 |
} |
160 | 156 |
|
161 | 157 |
/** |
162 | 158 |
* |
163 | 159 |
*/ |
164 | 160 |
protected void pageHealthChecks() { |
165 |
|
|
166 |
try { |
|
167 |
String ignore_error = "Expecting web service to return pager objects but received an array"; |
|
168 |
List<String> errors = getErrors().stream().filter(str -> str.startsWith(ignore_error)).collect(Collectors.toList()); |
|
169 |
assertTrue("The page must not show an error box", errors.size() == 0); |
|
170 |
} catch (NoSuchElementException e) { |
|
171 |
//IGNORE since this is expected! |
|
172 |
} |
|
173 | 161 |
assertFalse("The default footnote list key PAGE_GLOBAL must not occur in the page.", driver.getPageSource().contains("member-of-footnotes-PAGE_GLOBAL")); |
174 |
|
|
175 | 162 |
} |
176 | 163 |
|
177 | 164 |
|
Also available in: Unified diff
ref #9087 removing error box ignorrance in page health check