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.List;
|
13
|
import java.util.UUID;
|
14
|
|
15
|
import org.junit.Before;
|
16
|
import org.junit.Test;
|
17
|
import org.openqa.selenium.WebElement;
|
18
|
|
19
|
import eu.etaxonomy.dataportal.DataPortalSite;
|
20
|
import eu.etaxonomy.dataportal.ElementUtils;
|
21
|
import eu.etaxonomy.dataportal.elements.BaseElement;
|
22
|
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
|
23
|
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
|
24
|
import eu.etaxonomy.dataportal.pages.TaxonSynonymyPage;
|
25
|
|
26
|
/**
|
27
|
* @author a.kohlbecker
|
28
|
*
|
29
|
*/
|
30
|
|
31
|
@DataPortalContexts( { DataPortalSite.reference })
|
32
|
public class MisappliedNamesTest extends CdmDataPortalTestBase{
|
33
|
|
34
|
static final UUID miconia_cubacinerea_Uuid = UUID.fromString("c6716cee-2039-4ba8-a239-4b1b353f9c84");
|
35
|
|
36
|
@Before
|
37
|
public void setUp() throws Exception {
|
38
|
driver.get(getContext().getBaseUri().toString());
|
39
|
}
|
40
|
|
41
|
/**
|
42
|
* Test for correct sensu representation of misapplied names, see #5676
|
43
|
*/
|
44
|
@Test
|
45
|
public void testTitleAndTabs() throws MalformedURLException {
|
46
|
|
47
|
TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), miconia_cubacinerea_Uuid);
|
48
|
|
49
|
WebElement misappliedName = p.getMisappliedName(1);
|
50
|
assertNotNull(misappliedName);
|
51
|
assertEquals("–\n\"Ossaea glomerata\" sensu Species solaris; sensu A&S; sensu Lem1", misappliedName.getText());
|
52
|
List<BaseElement> footnotes = ElementUtils.findFootNotes(p.getTaxonRelationships());
|
53
|
assertEquals(1, footnotes.size());
|
54
|
assertEquals("1. Lem, New Species in the solar system", footnotes.get(0).getText());
|
55
|
|
56
|
}
|
57
|
|
58
|
|
59
|
|
60
|
}
|