Project

General

Profile

Download (1.88 KB) Statistics
| Branch: | Tag: | Revision:
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.cichorieae;
10

    
11
import java.net.MalformedURLException;
12
import java.util.List;
13
import java.util.UUID;
14

    
15
import org.junit.Test;
16

    
17
import eu.etaxonomy.dataportal.DataPortalSite;
18
import eu.etaxonomy.dataportal.elements.BaseElement;
19
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
20
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
21
import eu.etaxonomy.dataportal.pages.TaxonSynonymyPage;
22

    
23
/**
24
 *
25
 * @author a.kohlbecker
26
 *
27
 */
28

    
29
@DataPortalContexts( { DataPortalSite.cichorieae })
30
public class Cichorieae_FootnoteTest extends CdmDataPortalTestBase{
31

    
32

    
33
    static UUID crepidiastrum_chelidoniifolium_uuid = UUID.fromString("3e0cdb93-020c-4e2f-be85-e9eb1ec107be");
34

    
35

    
36
    /**
37
     * test for issue #2772 (some footnotes in synonymy missing)
38
     *
39
     */
40
    @Test
41
    public void crepidiastrum_chelidoniifolium_issue_2772() throws MalformedURLException {
42
        TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), crepidiastrum_chelidoniifolium_uuid);
43
        String expectedName = "Crepidiastrum chelidoniifolium";
44
        assertEquals(getContext().prepareTitle(expectedName), p.getTitle());
45

    
46
        assertEquals("expecting one footnoteKey", 1, p.getHeterotypicalGroupFootNoteKeys(2).size());
47
        List<BaseElement> footNotes = p.getHeterotypicalGroupFootNotes(2);
48
        assertEquals("expecting one footnotw", 1, footNotes.size());
49
        String first100Chars = footNotes.get(0).getText().substring(0, 100);
50
        assertEquals("1. As has been noted first by Sennikov (in Bot Zhurn. 82(5): 114. 1997), the names Lactuca saxatilis", first100Chars);
51
    }
52

    
53
}
(3-3/13)