1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2009 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
package eu.etaxonomy.dataportal.selenium.tests.cichorieae;
|
11
|
|
12
|
import static org.junit.Assert.*;
|
13
|
import static org.junit.Assert.assertEquals;
|
14
|
|
15
|
import java.net.MalformedURLException;
|
16
|
import java.util.List;
|
17
|
import java.util.UUID;
|
18
|
|
19
|
import org.junit.Ignore;
|
20
|
import org.junit.Test;
|
21
|
|
22
|
import eu.etaxonomy.dataportal.DataPortalContext;
|
23
|
import eu.etaxonomy.dataportal.elements.BaseElement;
|
24
|
import eu.etaxonomy.dataportal.elements.FeatureBlock;
|
25
|
import eu.etaxonomy.dataportal.elements.LinkElement;
|
26
|
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
|
27
|
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
|
28
|
import eu.etaxonomy.dataportal.pages.TaxonProfilePage;
|
29
|
import eu.etaxonomy.dataportal.pages.TaxonSynonymyPage;
|
30
|
|
31
|
/**
|
32
|
*
|
33
|
* @author a.kohlbecker
|
34
|
*
|
35
|
*/
|
36
|
|
37
|
@DataPortalContexts( { DataPortalContext.cichorieae })
|
38
|
public class Cichorieae_FootnoteTest extends CdmDataPortalTestBase{
|
39
|
|
40
|
|
41
|
static UUID crepidiastrum_chelidoniifolium_uuid = UUID.fromString("3e0cdb93-020c-4e2f-be85-e9eb1ec107be");
|
42
|
|
43
|
|
44
|
/**
|
45
|
* test for issue #2772 (some footnotes in synonymy missing)
|
46
|
*
|
47
|
* @throws MalformedURLException
|
48
|
*/
|
49
|
@Test
|
50
|
public void crepidiastrum_chelidoniifolium_issue_2772() throws MalformedURLException {
|
51
|
TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), crepidiastrum_chelidoniifolium_uuid);
|
52
|
String expectedName = "Crepidiastrum chelidoniifolium";
|
53
|
assertEquals(getContext().prepareTitle(expectedName), p.getTitle());
|
54
|
|
55
|
assertEquals("expecting one footnoteKey", 1, p.getHeterotypicalGroupFootNoteKeys(2).size());
|
56
|
List<BaseElement> footNotes = p.getHeterotypicalGroupFootNotes(2);
|
57
|
assertEquals("expecting one footnotw", 1, footNotes.size());
|
58
|
String first100Chars = footNotes.get(0).getText().substring(0, 100);
|
59
|
assertEquals("1. As has been noted first by Sennikov (in Bot Zhurn. 82(5): 114. 1997), the names Lactuca saxatilis", first100Chars);
|
60
|
}
|
61
|
|
62
|
}
|