8 |
8 |
*/
|
9 |
9 |
package eu.etaxonomy.dataportal.selenium.tests.palmae;
|
10 |
10 |
|
11 |
|
import static org.junit.Assert.*;
|
12 |
|
|
13 |
11 |
import java.net.MalformedURLException;
|
14 |
12 |
import java.util.List;
|
15 |
13 |
import java.util.UUID;
|
16 |
14 |
|
17 |
|
import org.apache.commons.lang.StringUtils;
|
18 |
|
import org.junit.After;
|
19 |
15 |
import org.junit.Before;
|
20 |
|
import org.junit.Ignore;
|
21 |
16 |
import org.junit.Test;
|
22 |
17 |
import org.openqa.selenium.By;
|
23 |
|
import org.openqa.selenium.WebElement;
|
24 |
18 |
|
25 |
19 |
import eu.etaxonomy.dataportal.DataPortalContext;
|
26 |
|
import eu.etaxonomy.dataportal.elements.BaseElement;
|
27 |
|
import eu.etaxonomy.dataportal.elements.DescriptionElementRepresentation;
|
28 |
20 |
import eu.etaxonomy.dataportal.elements.FeatureBlock;
|
29 |
21 |
import eu.etaxonomy.dataportal.elements.ImgElement;
|
30 |
22 |
import eu.etaxonomy.dataportal.elements.LinkElement;
|
... | ... | |
77 |
69 |
|
78 |
70 |
|
79 |
71 |
@Test
|
80 |
|
@Ignore /* ignoring until the change of T. Evans et al. 2002 to T. Evans, K. Sengdala, B. Thammavong, O.V. Viengkham and J. Dransfield. 2002 is clarified */
|
|
72 |
//@Ignore /* ignoring until the change of T. Evans et al. 2002 to T. Evans, K. Sengdala, B. Thammavong, O.V. Viengkham and J. Dransfield. 2002 is clarified */
|
81 |
73 |
public void testFeatures() {
|
82 |
74 |
assertEquals("Content", p.getTableOfContentHeader());
|
83 |
75 |
List<LinkElement> links = p.getTableOfContentLinks();
|
... | ... | |
96 |
88 |
/* distribution */
|
97 |
89 |
String featureClass = "distribution";
|
98 |
90 |
String featureLabel = "Distribution";
|
99 |
|
String blockTextFull = featureLabel + "\n\n\nMap accurate to TDWG level 3 distributions\n\nAssam, China South-Central, China Southeast, East Himalaya, India, Laos, Myanmar, Nepal, Thailand, Tibet (World Checklist of Monocotyledons)\nIndia (North-east), Bhutan, Myanmar, China (Tibet, South-east and South Yunnan), Thailand (North) and Laos (North). (T. Evans et al. 2002)";
|
|
91 |
String blockTextFull = featureLabel + "\n\n\nMap uses TDWG level 3 distributions (http://www.nhm.ac.uk/hosted_sites/tdwg/geogrphy.html)\n\nAssam, China South-Central, China Southeast, East Himalaya, India, Laos, Myanmar, Nepal, Thailand, Tibet (World Checklist of Monocotyledons)\nIndia (North-east), Bhutan, Myanmar, China (Tibet, South-east and South Yunnan), Thailand (North) and Laos (North). (T. Evans et al. 2002)";
|
100 |
92 |
|
101 |
93 |
p.testTableOfContentEntry(featureId++, featureLabel, featureClass);
|
102 |
|
featureBlock = p.getFeatureBlockAt(featureId, featureClass, "p", "span");
|
|
94 |
featureBlock = p.getFeatureBlockAt(featureId, featureClass, "div", "span");
|
103 |
95 |
|
104 |
96 |
assertEquals(blockTextFull, featureBlock.getText());
|
105 |
97 |
featureBlock.testDescriptionElementLayout(0, indent, descriptionElementFontSize, expectedCssDisplay, expectedListStyleType, expectedListStylePosition, expectedListStyleImage);
|
... | ... | |
108 |
100 |
assertTrue(LinkElement.testIfLinkElement(featureBlock.getOriginalSourcesSections().get(1).getLinksInElement().get(0), "T. Evans et al. 2002", this.getContext().getBaseUri().toString() + "?q=cdm_dataportal/reference/706c5e5e-1dac-4fb2-b849-8e99ad7d63aa"));
|
109 |
101 |
|
110 |
102 |
assertNotNull("Expecting an OpenLayers map", featureBlock.getElement().findElement(By.id("openlayers-map-distribution")));
|
111 |
|
assertEquals("Map accurate to TDWG level 3 distributions", featureBlock.getElement().findElement(By.className("distribution_map_caption")).getText());
|
|
103 |
assertEquals("Map uses TDWG level 3 distributions (http://www.nhm.ac.uk/hosted_sites/tdwg/geogrphy.html)", featureBlock.getElement().findElement(By.className("distribution_map_caption")).getText());
|
112 |
104 |
|
113 |
105 |
|
114 |
106 |
/* Biology And Ecology */
|
ref #6374 using the correct feature block settings for use descriptions