Project

General

Profile

Download (2.97 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.cyprus;
10

    
11
import static org.junit.Assert.assertEquals;
12
import static org.junit.Assert.assertTrue;
13

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

    
17
import org.junit.Test;
18

    
19
import eu.etaxonomy.dataportal.DataPortalContext;
20
import eu.etaxonomy.dataportal.elements.ClassificationTreeBlock;
21
import eu.etaxonomy.dataportal.elements.ClassificationTreeElement;
22
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
23
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
24
import eu.etaxonomy.dataportal.pages.TaxonProfilePage;
25
import eu.etaxonomy.dataportal.pages.TaxonSynonymyPage;
26

    
27
/**
28
 *
29
 * @author a.kohlbecker
30
 *
31
 */
32

    
33
@DataPortalContexts( { DataPortalContext.cyprus })
34
public class Cyprus_HybridTest extends CdmDataPortalTestBase{
35

    
36

    
37
    static UUID orchiserapias_Uuid = UUID.fromString("0aee7eea-84e7-4b61-8cb6-d17313cc9b80");
38

    
39
    static UUID epilobium_aschersonianum_Uuid = UUID.fromString("e13ea422-5d45-477b-ade3-8dc84dbc9dbc");
40

    
41
    //
42
    static UUID aegilops_biuncialis_x_geniculata_Uuid = UUID.fromString("88ff0fbb-c0df-46c1-9969-cf318ea97dbb");
43

    
44

    
45
    @Test
46
    public void orchiserapias() throws MalformedURLException {
47
        TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), orchiserapias_Uuid);
48
        String expectedName = "×Orchiserapias";
49
        assertEquals(getContext().prepareTitle(expectedName), driver.getTitle());
50
        assertEquals(expectedName, p.getAcceptedNameText());
51
        assertEquals("≡ Orchis × Serapias", p.getHomotypicalGroupSynonymName(1));
52
    }
53

    
54
    @Test
55
    public void epilobium_aschersonianum() throws MalformedURLException {
56
        TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), epilobium_aschersonianum_Uuid);
57
        assertEquals(getContext().prepareTitle("Epilobium ×aschersonianum"), driver.getTitle());
58
        assertEquals("Epilobium ×aschersonianum Hausskn.", p.getAcceptedNameText());
59
        assertEquals("≡ Epilobium lanceolatum × parviflorum", p.getHomotypicalGroupSynonymName(1));
60
    }
61

    
62
    @Test
63
    public void aegilops_biuncialis_x_geniculata() throws MalformedURLException {
64
        TaxonProfilePage p = new TaxonProfilePage(driver, getContext(), aegilops_biuncialis_x_geniculata_Uuid);
65
        assertEquals(getContext().prepareTitle("Aegilops biuncialis × geniculata"), driver.getTitle());
66
        ClassificationTreeBlock classificationTree = p.getClassificationTree();
67
        ClassificationTreeElement focusedElement = classificationTree.getFocusedElement();
68
        assertTrue(classificationTree.isVisibleInViewPort(focusedElement));
69
        assertEquals("Abbreviated form of name should be used", "A. biuncialis × geniculata", focusedElement.getTaxonName());
70
    }
71

    
72
}
(5-5/6)