1
|
/**
|
2
|
* Copyright (C) 2014 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.dataportal.selenium.tests.cichorieae;
|
10
|
|
11
|
import static org.junit.Assert.assertEquals;
|
12
|
|
13
|
import java.net.MalformedURLException;
|
14
|
import java.util.UUID;
|
15
|
|
16
|
import org.junit.Test;
|
17
|
|
18
|
import eu.etaxonomy.dataportal.DataPortalSite;
|
19
|
import eu.etaxonomy.dataportal.elements.FeatureBlock;
|
20
|
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
|
21
|
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
|
22
|
import eu.etaxonomy.dataportal.pages.TaxonProfilePage;
|
23
|
|
24
|
/**
|
25
|
* @author a.kohlbecker
|
26
|
*
|
27
|
*/
|
28
|
@DataPortalContexts( { DataPortalSite.cichorieae })
|
29
|
public class Chichorieae_Feature_ImageSourcesTest extends CdmDataPortalTestBase {
|
30
|
|
31
|
static UUID hieracium_bupleuroides_aggr = UUID.fromString("f85a5f90-fc61-4622-939f-ba6e50500b0d");
|
32
|
static UUID pilosella_anchusoides = UUID.fromString("b384de9c-0a70-48e9-8fcc-1f772a331544");
|
33
|
|
34
|
@Test
|
35
|
public void hieracium_bupleuroides_aggr() throws MalformedURLException {
|
36
|
TaxonProfilePage p = new TaxonProfilePage(driver, getContext(), hieracium_bupleuroides_aggr);
|
37
|
String expectedName = "Hieracium bupleuroides aggr.";
|
38
|
assertEquals(getContext().prepareTitle(expectedName), driver.getTitle());
|
39
|
|
40
|
FeatureBlock imageSourcesBlock = p.getFeatureBlockAt(0, "image-sources", "div", "span");
|
41
|
|
42
|
assertEquals("Gottschlich 2009: t. 20-21 (specimen photos)A", imageSourcesBlock.getFeatureBlockElements().get(0).getText());
|
43
|
assertEquals("A. Gottschlich, G. 2009: Die Gattung Hieracium (Compositae) in der Region Abruzzen (Italien). – Stapfia 89 (as Hieracium bupleuroides C. C. Gmel.)", imageSourcesBlock.getFootNote(0).getText());
|
44
|
}
|
45
|
|
46
|
@Test
|
47
|
public void pilosella_anchusoides() throws MalformedURLException {
|
48
|
TaxonProfilePage p = new TaxonProfilePage(driver, getContext(), pilosella_anchusoides);
|
49
|
String expectedName = "Pilosella anchusoides";
|
50
|
assertEquals(getContext().prepareTitle(expectedName), driver.getTitle());
|
51
|
|
52
|
FeatureBlock imageSourcesBlock = p.getFeatureBlockAt(0, "image-sources", "div", "span");
|
53
|
|
54
|
assertEquals("Gottschlich 2009: t. 14 (specimen photo)A", imageSourcesBlock.getFeatureBlockElements().get(0).getText());
|
55
|
assertEquals("A. Gottschlich, G. 2009: Die Gattung Hieracium (Compositae) in der Region Abruzzen (Italien). – Stapfia 89 (as Hieracium anchusoides (Arv.-Touv.) St.-Lag.)", imageSourcesBlock.getFootNote(0).getText());
|
56
|
}
|
57
|
|
58
|
|
59
|
}
|