63 |
63 |
public void testPage() {
|
64 |
64 |
WebElement specimensTable = p.getDataPortalContent().getElement().findElement(By.cssSelector("#specimens table.derivate_tree"));
|
65 |
65 |
List<WebElement> summaryRows = specimensTable.findElements(By.cssSelector("tr.summary_row"));
|
66 |
|
assertEquals(2, summaryRows.size());
|
67 |
|
assertEquals("Germany, Berlin, 2 Apr 1835.", summaryRows.get(0).getText());
|
68 |
|
assertEquals("Germany, Berlin, alt. 165 m, 52°31'1.2\"N, 13°21'E (WGS84), 28 Mar 2016, Ehrenberg D047.", summaryRows.get(1).getText());
|
|
66 |
assertEquals(3, summaryRows.size());
|
|
67 |
assertEquals("(B SP-99999).", summaryRows.get(0).getText());
|
|
68 |
assertEquals("Germany, Berlin, 2 Apr 1835.", summaryRows.get(1).getText());
|
|
69 |
assertEquals("Germany, Berlin, alt. 165 m, 52°31'1.2\"N, 13°21'E (WGS84), 28 Mar 2016, Ehrenberg D047.", summaryRows.get(2).getText());
|
69 |
70 |
}
|
70 |
71 |
|
71 |
72 |
@Test
|
... | ... | |
161 |
162 |
assertEquals("52°31'1.2\"N, 13°21'E +/-20 m (WGS84)", dl1.joinedDescriptionElementText("Exact location:"));
|
162 |
163 |
// TODO test Exact location link
|
163 |
164 |
descriptionListContainer = new BaseElement(derivateTreeContainer);
|
164 |
|
assertEquals(10, descriptionListContainer.getLinksInElement().size()); // other links in the derivate tree are also found
|
|
165 |
assertEquals(24, descriptionListContainer.getLinksInElement().size()); // other links in the derivate tree are also found
|
165 |
166 |
// TODO one of the links is a footnote key for which the footnote is missing
|
166 |
167 |
link1 = descriptionListContainer.getLinksInElement().get(1);
|
167 |
168 |
assertEquals("Detail page", link1.getText());
|
168 |
169 |
assertTrue(link1.getUrl().endsWith("/cdm_dataportal/occurrence/89d36e79-3e80-4468-986e-411ca391452e"));
|
169 |
170 |
|
170 |
|
dl2 = new DescriptionList(dls.get(1).findElement(By.tagName("dl")));
|
|
171 |
dl2 = new DescriptionList(dls.get(3).findElement(By.tagName("dl")));
|
171 |
172 |
|
172 |
173 |
assertEquals("Preserved Specimen", dl2.joinedDescriptionElementText("Record base:"));
|
173 |
174 |
assertEquals("2017E68", dl2.joinedDescriptionElementText("Accession number:"));
|
... | ... | |
180 |
181 |
specimenTypeDesignationLinks = specimenTypeDesignation_dd.getLinksInElement();
|
181 |
182 |
assertEquals("expecting one footnote key link", 1, specimenTypeDesignationLinks.size());
|
182 |
183 |
|
183 |
|
dl3 = new DescriptionList(dls.get(2).findElement(By.tagName("dl")));
|
|
184 |
dl3 = new DescriptionList(dls.get(6).findElement(By.tagName("dl")));
|
184 |
185 |
|
185 |
186 |
assertEquals("Preserved Specimen", dl3.joinedDescriptionElementText("Record base:"));
|
186 |
187 |
assertEquals("M-0289351", dl3.joinedDescriptionElementText("Accession number:"));
|
... | ... | |
192 |
193 |
specimenTypeDesignationLinks = dl3.getDescriptionGroups().get("Specimen type designations:").get(0).getLinksInElement();
|
193 |
194 |
assertEquals("expecting one footnote key link", 1, specimenTypeDesignationLinks.size());
|
194 |
195 |
|
195 |
|
|
196 |
|
|
197 |
|
|
198 |
|
|
199 |
196 |
}
|
200 |
197 |
|
201 |
198 |
}
|
fix #7704 fix #9397 adapting specimen tree and table view to cdmlib improvements for complete root unit display - adapting tests