Project

General

Profile

Download (2.25 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.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.By;
18

    
19
import eu.etaxonomy.dataportal.DataPortalSite;
20
import eu.etaxonomy.dataportal.elements.TypeDesignationElement;
21
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
22
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
23
import eu.etaxonomy.dataportal.pages.NamePage;
24

    
25
/**
26
 * Issues to be covered by this TestClass:
27
 *
28
 * https://dev.e-taxonomy.eu/redmine/issues/8134
29
 *
30
 * @author a.kohlbecker
31
 *
32
 */
33
@DataPortalContexts( { DataPortalSite.reference })
34
public class TextualTypeDesignationTest extends CdmDataPortalTestBase{
35

    
36
    static final UUID equisetum_arvense_n_uuid = UUID.fromString("96ad7144-a898-4694-94a9-335d0cab9c24");
37

    
38

    
39
    @Before
40
    public void setUp() throws Exception {
41
        driver.get(getContext().getSiteUri().toString());
42
    }
43

    
44
    @Test
45
    public void testPageTitles() throws MalformedURLException {
46
        NamePage p = new NamePage(driver, getContext(), equisetum_arvense_n_uuid);
47
        assertEquals(
48
                "Equisetum arvense | Integration test reference",
49
                driver.getTitle()
50
                );
51
        assertEquals(
52
                "Equisetum arvense",
53
                driver.findElement(By.id("page-title")).getText()
54
                );
55

    
56
    }
57

    
58
    @Test
59
    public void testNamePage() throws MalformedURLException {
60
        NamePage p = new NamePage(driver, getContext(), equisetum_arvense_n_uuid);
61
        List<TypeDesignationElement> typeDesignations = p.getTypeDesignations(0, "div");
62
        assertEquals("Type: \"LT: Clayton 341; (BM) LT designated by Jonsell & Jarvis, Nord. J. Bot. 14: 148 (1994)\"", typeDesignations.get(0).getText());
63
        assertEquals("Type: Type specimen which may have beed assigned already: Jonsell & Jarvis, Nord. J. Bot. 14: 148 (1994)1,2", typeDesignations.get(1).getText());
64
    }
65

    
66
}
(16-16/16)