1
|
/**
|
2
|
* Copyright (C) 2009 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.flMalesiana;
|
10
|
|
11
|
import static org.junit.Assert.assertEquals;
|
12
|
import static org.junit.Assert.assertNotNull;
|
13
|
|
14
|
import java.util.List;
|
15
|
import java.util.UUID;
|
16
|
|
17
|
import org.junit.After;
|
18
|
import org.junit.Before;
|
19
|
import org.junit.Test;
|
20
|
import org.openqa.selenium.WebElement;
|
21
|
|
22
|
import eu.etaxonomy.dataportal.DataPortalContext;
|
23
|
import eu.etaxonomy.dataportal.elements.FeatureBlock;
|
24
|
import eu.etaxonomy.dataportal.elements.LinkElement;
|
25
|
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
|
26
|
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
|
27
|
import eu.etaxonomy.dataportal.pages.TaxonProfilePage;
|
28
|
|
29
|
/**
|
30
|
*
|
31
|
* @author a.kohlbecker
|
32
|
*
|
33
|
*/
|
34
|
|
35
|
@DataPortalContexts( { DataPortalContext.floramalesiana})
|
36
|
public class FloraMalesiana_DescriptionTest extends CdmDataPortalTestBase{
|
37
|
|
38
|
private static final UUID tristiropsis_acutangula_uuid = UUID.fromString("87e76e43-e4b7-44a1-a195-2c36a63b34bb");
|
39
|
|
40
|
@Before
|
41
|
public void setUp() throws Exception {
|
42
|
|
43
|
driver.get(getContext().getBaseUri().toString());
|
44
|
}
|
45
|
|
46
|
@After
|
47
|
public void tearDown(){
|
48
|
logger.debug("@After");
|
49
|
}
|
50
|
|
51
|
|
52
|
@Test
|
53
|
public void tristiropsis_acutangula() throws Exception {
|
54
|
|
55
|
TaxonProfilePage p = new TaxonProfilePage(driver, getContext(), tristiropsis_acutangula_uuid);
|
56
|
|
57
|
List<LinkElement> primaryTabs = p.getPrimaryTabs();
|
58
|
|
59
|
assertEquals("Expecting 4 tabs", 4, primaryTabs.size());
|
60
|
assertEquals("General\n(active tab)", primaryTabs.get(0).getText());
|
61
|
assertEquals("Synonymy", primaryTabs.get(1).getText());
|
62
|
assertEquals("Images", primaryTabs.get(2).getText());
|
63
|
assertEquals("Specimens", primaryTabs.get(3).getText());
|
64
|
|
65
|
FeatureBlock descriptionBlock = p.getFeatureBlockAt(0, "description", "div", "div");
|
66
|
assertNotNull(descriptionBlock);
|
67
|
List<WebElement> featureBlockElements = descriptionBlock.getFeatureBlockElements();
|
68
|
assertEquals("Tree, up to 35(-53) m, dbh up to at least 6 cm, often with buttresses up to 3 m high, 4 m wide, and 3 cm thick. Branchlets 4-10 mm thick, fulvous -tomentose, glabrescent and then shiny purple-brown, older parts more or less pustular lenti-cellate. Leaves up to 2 m long; Sepals cream to greenish, persistent and black in fruit, Petals cuneate at base, broad-elliptic to broad-ovate, 2.5-3.5 b) 2.2-2.5 mm, creamy-white, margin below the insertion of the scale long-ciliate, furthermore sparsely ciliate, apex crenulate, inside glabrous; Stamens: Fruits ellipsoid to subglobular, widest about or above the middle, narrowed to short-stipitate at base, 3-4-angular to 3-4-ribbed in cross section, 20-30 by 14-25 mm, yellowish green to dark-yellow when ripe, patently short-hairy inside, often sterile but well developed.", featureBlockElements.get(0).getText());
|
69
|
|
70
|
}
|
71
|
|
72
|
}
|