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.reference;
|
10
|
|
11
|
import java.net.MalformedURLException;
|
12
|
import java.util.UUID;
|
13
|
|
14
|
import org.junit.Before;
|
15
|
import org.junit.Test;
|
16
|
|
17
|
import eu.etaxonomy.dataportal.DataPortalSite;
|
18
|
import eu.etaxonomy.dataportal.elements.FeatureBlock;
|
19
|
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
|
20
|
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
|
21
|
import eu.etaxonomy.dataportal.pages.TaxonProfilePage;
|
22
|
|
23
|
/**
|
24
|
* Issues to be covered by this TestClass:
|
25
|
*
|
26
|
* #3616
|
27
|
*
|
28
|
* @author a.kohlbecker
|
29
|
*
|
30
|
*/
|
31
|
|
32
|
@DataPortalContexts( { DataPortalSite.reference })
|
33
|
public class DescriptionElementsTest extends CdmDataPortalTestBase{
|
34
|
|
35
|
static final UUID achilllea_santolina_uuid = UUID.fromString("c246856f-c03e-4cb7-ac92-d9b2864084cd");
|
36
|
|
37
|
|
38
|
@Before
|
39
|
public void setUp() throws Exception {
|
40
|
driver.get(getContext().getBaseUri().toString());
|
41
|
}
|
42
|
|
43
|
/**
|
44
|
* Test to reproduce issue https://dev.e-taxonomy.eu/redmine/issues/3616
|
45
|
*
|
46
|
*/
|
47
|
@Test
|
48
|
public void tesIssue3616() throws MalformedURLException {
|
49
|
|
50
|
|
51
|
TaxonProfilePage p = new TaxonProfilePage(driver, getContext(), achilllea_santolina_uuid);
|
52
|
|
53
|
FeatureBlock fb = p.getFeatureBlockAt(0, "biology-and-ecology", "div", "span");
|
54
|
assertNotNull(fb);
|
55
|
assertEquals(2, fb.getFeatureBlockElements().size());
|
56
|
assertEquals("Flowers with white blossoms on Testisland A. 00-05-00 to 00-06-00 (Lem, New Species in the solar system: p.99)", fb.getFeatureBlockElements().get(0).getText());
|
57
|
assertEquals("Flowers with white blossoms on Testisland B. Mai to June (Lem, New Species in the solar system: p.99)", fb.getFeatureBlockElements().get(1).getText());
|
58
|
|
59
|
}
|
60
|
|
61
|
}
|