Revision 59e4b8b9
Added by Andreas Kohlbecker about 8 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.assertNull; |
4 |
import static org.junit.Assert.assertTrue; |
|
4 | 5 |
|
5 | 6 |
import java.io.File; |
6 | 7 |
import java.io.IOException; |
... | ... | |
100 | 101 |
@CacheLookup |
101 | 102 |
protected WebElement classificationBrowserBlock; |
102 | 103 |
|
104 |
// @FindBys({ |
|
105 |
// @FindBy(className="messages"), |
|
106 |
// @FindBy(className="error")} |
|
107 |
// ) |
|
108 |
@FindBy(className="messages") |
|
109 |
@CacheLookup |
|
110 |
protected WebElement messagesErrorCichorieaeTheme; |
|
111 |
|
|
103 | 112 |
@FindBy(className="messages_error") |
104 | 113 |
@CacheLookup |
105 |
protected WebElement messagesError; |
|
114 |
protected WebElement messagesErrorOtherThemes;
|
|
106 | 115 |
|
107 | 116 |
/** |
108 | 117 |
* Creates a new PortaPage. Implementations of this class will provide the base path of the page by |
... | ... | |
142 | 151 |
|
143 | 152 |
|
144 | 153 |
try { |
145 |
assertNull("The page must not show an error box", messagesError.getText()); |
|
154 |
assertTrue("The page must not show an error box", !messagesErrorCichorieaeTheme.getAttribute("class").contains("error") && messagesErrorCichorieaeTheme.getText() == null); |
|
155 |
} catch (NoSuchElementException e) { |
|
156 |
//IGNORE since this is expected! |
|
157 |
} |
|
158 |
try { |
|
159 |
assertNull("The page must not show an error box", messagesErrorOtherThemes.getText()); |
|
146 | 160 |
} catch (NoSuchElementException e) { |
147 | 161 |
//IGNORE since this is expected! |
148 | 162 |
} |
Also available in: Unified diff
error box check support for cichorieae theme