Revision 8db5e42f
Added by Andreas Kohlbecker over 3 years ago
src/main/java/eu/etaxonomy/dataportal/pages/PortalPage.java | ||
---|---|---|
289 | 289 |
for(WebElement m : messages){ |
290 | 290 |
if(m.getAttribute("class").contains(messageType.name())){ |
291 | 291 |
List<WebElement> messageItems = m.findElements(By.cssSelector("ul.messages__list li")); |
292 |
if(messageItems.size() == 0 && !m.getText().isEmpty()) { |
|
293 |
// we have only one item which is not shown as list. |
|
294 |
messageItems.add(m); |
|
295 |
|
|
296 |
} |
|
292 | 297 |
return messageItems.stream().map(mi -> mi.getText()).collect(Collectors.toList()); |
293 | 298 |
} |
294 | 299 |
} |
src/test/java/eu/etaxonomy/dataportal/selenium/tests/reference/RegistrationPageTest.java | ||
---|---|---|
110 | 110 |
} catch(NoSuchElementException e) {/* IGNORE */} |
111 | 111 |
assertNull(regItem); |
112 | 112 |
|
113 |
List<String> statusMessageItems = p.getMessageItems(MessageType.status); |
|
113 | 114 |
assertEquals( |
114 | 115 |
"Status message\nA registration with the identifier http://testbank.org/100003 is in preparation", |
115 |
p.getMessageItems(MessageType.status).get(0));
|
|
116 |
statusMessageItems.get(0));
|
|
116 | 117 |
} |
117 | 118 |
|
118 | 119 |
|
... | ... | |
211 | 212 |
|
212 | 213 |
// 2. Lectotype |
213 | 214 |
assertTrue( |
214 |
regItem.getSpecimenTypeDesignations().get(1).getText().startsWith("Lectotype: Germany, Berlin, 2.4.1835 (BHUPM 671). Naturkundemuseum Berlin (MFN) - Ehrenberg Collection"));
|
|
215 |
regItem.getSpecimenTypeDesignations().get(1).getText().startsWith("Lectotype: Germany, Berlin, 2 Apr 1835 (BHUPM 671). Naturkundemuseum Berlin (MFN) - Ehrenberg Collection"));
|
|
215 | 216 |
assertEquals( |
216 | 217 |
"BHUPM 671", |
217 | 218 |
regItem.getSpecimenTypeDesignations().get(1).getLinksInElement().get(0).getText()); |
... | ... | |
226 | 227 |
|
227 | 228 |
// 3. Isolectotype |
228 | 229 |
assertEquals( |
229 |
"Isolectotype: Germany, Berlin, 52°31'1.2\"N, 13°21'E, 28.3.2016, D047 (M M-0289351). http://herbarium.bgbm.org/object/B400042045",
|
|
230 |
"Isolectotype: Germany, Berlin, 52°31'1.2\"N, 13°21'E, 28 Mar 2016, D047 (M M-0289351). http://herbarium.bgbm.org/object/B400042045",
|
|
230 | 231 |
regItem.getSpecimenTypeDesignations().get(2).getText()); |
231 | 232 |
assertEquals( |
232 | 233 |
"M M-0289351", |
Also available in: Unified diff
adapting tests