Project

General

Profile

Download (2.18 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 static org.junit.Assert.*;
12
import static org.junit.Assert.assertEquals;
13

    
14
import java.net.MalformedURLException;
15
import java.util.List;
16
import java.util.UUID;
17

    
18
import org.junit.Ignore;
19
import org.junit.Test;
20

    
21
import eu.etaxonomy.dataportal.DataPortalContext;
22
import eu.etaxonomy.dataportal.elements.BaseElement;
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
import eu.etaxonomy.dataportal.pages.TaxonSynonymyPage;
29

    
30
/**
31
 *
32
 * @author a.kohlbecker
33
 *
34
 */
35

    
36
@DataPortalContexts( { DataPortalContext.cichorieae })
37
public class Cichorieae_FootnoteTest extends CdmDataPortalTestBase{
38

    
39

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

    
42

    
43
    /**
44
     * test for issue #2772 (some footnotes in synonymy missing)
45
     *
46
     * @throws MalformedURLException
47
     */
48
    @Test
49
    public void crepidiastrum_chelidoniifolium_issue_2772() throws MalformedURLException {
50
        TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), crepidiastrum_chelidoniifolium_uuid);
51
        String expectedName = "Crepidiastrum chelidoniifolium";
52
        assertEquals(getContext().prepareTitle(expectedName), p.getTitle());
53

    
54
        assertEquals("expecting one footnoteKey", 1, p.getHeterotypicalGroupFootNoteKeys(2).size());
55
        List<BaseElement> footNotes = p.getHeterotypicalGroupFootNotes(2);
56
        assertEquals("expecting one footnotw", 1, footNotes.size());
57
        String first100Chars = footNotes.get(0).getText().substring(0, 100);
58
        assertEquals("1. As has been noted first by Sennikov (in Bot Zhurn. 82(5): 114. 1997), the names Lactuca saxatilis", first100Chars);
59
    }
60

    
61
}
(3-3/13)