Revision 535407a1
Added by Andreas Kohlbecker over 12 years ago
modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cyprus/Allium_guttatum_subsp_guttatum_TaxonProfileTest.java | ||
---|---|---|
22 | 22 |
import org.openqa.selenium.WebElement; |
23 | 23 |
|
24 | 24 |
import eu.etaxonomy.dataportal.DataPortalContext; |
25 |
import eu.etaxonomy.dataportal.elements.BaseElement; |
|
25 | 26 |
import eu.etaxonomy.dataportal.elements.FeatureBlock; |
26 | 27 |
import eu.etaxonomy.dataportal.elements.ImgElement; |
27 | 28 |
import eu.etaxonomy.dataportal.elements.LinkElement; |
... | ... | |
95 | 96 |
// assertEquals("Systematics\nTaxonomy and nomenclature follow Mathew (1996).\nMathew B. 1996: A review of Allium section Allium . - Kew.", featureBlock.getText()); |
96 | 97 |
|
97 | 98 |
featureBlock = p.getFeatureBlockAt(4, "distribution", "div", "span"); |
98 |
assertEquals("Distribution Division 2 1 1. R. D. Meikle, Flora of Cyprus 1. 1977", featureBlock.getText());
|
|
99 |
assertEquals("Distribution\nDivision 21\n1. R. D. Meikle, Flora of Cyprus 1. 1977", featureBlock.getText());
|
|
99 | 100 |
assertEquals("Distribution", featureBlock.getHeader()); |
100 | 101 |
assertEquals("expecting one footnote key", 1, featureBlock.getFootNoteKeys().size()); |
101 |
assertTrue("expecting one footnote 0 to be the footnote for key 0",featureBlock.getFootNotes().get(0).startsWith(featureBlock.getFootNoteKeys().get(0))); |
|
102 |
assertEquals("1. R. D. Meikle, Flora of Cyprus 1. 1977", featureBlock.getFootNotes().get(0)); |
|
102 |
|
|
103 |
LinkElement footNoteKey_1 = featureBlock.getFootNoteKeys().get(0); |
|
104 |
BaseElement footNote_1 = featureBlock.getFootNotes().get(0); |
|
105 |
assertTrue("expecting one footnote 0 to be the footnote for key 0",footNote_1.getText().startsWith(footNoteKey_1.getText())); |
|
106 |
// FIXME hovering does not jet work |
|
107 |
// footNoteKey_1.getElement().hover(); |
|
108 |
// assertEquals("yellow", footNoteKey_1.getElement().getValueOfCssProperty("background-color")); |
|
109 |
// assertEquals("yellow", footNote_1.getElement().getValueOfCssProperty("background-color")); |
|
110 |
|
|
111 |
assertEquals("1. R. D. Meikle, Flora of Cyprus 1. 1977", footNote_1.getText()); |
|
112 |
|
|
103 | 113 |
WebElement distributionMapImage = featureBlock.getElement().findElement(By.className("distribution_map")); |
104 | 114 |
assertEquals("http://edit.br.fgov.be/edit_wp5/v1.1/rest_gen.php?title=a:Indigenous&ad=cyprusdivs:bdcode:a:2&as=z:ffffff,606060,,|y:1874CD,,|a:339966,,0.1,&l=background_gis:y,cyprusdivs:z&ms=500&bbox=32,34,35,36&label=1&img=true&legend=1&mlp=3&mc_s=Georgia,15,blue&mc=&recalculate=false", distributionMapImage.getAttribute("src")); |
105 | 115 |
|
Also available in: Unified diff
upgrade to selenium 2.0rc3