Project

General

Profile

Download (3.03 KB) Statistics
| Branch: | Tag: | Revision:
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.assertEquals;
13
import static org.junit.Assert.assertNotNull;
14

    
15
import java.util.UUID;
16

    
17
import org.junit.Test;
18
import org.openqa.selenium.By;
19
import org.openqa.selenium.WebElement;
20

    
21
import eu.etaxonomy.dataportal.DataPortalContext;
22
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
23
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
24
import eu.etaxonomy.dataportal.pages.GenericPortalPage;
25
import eu.etaxonomy.dataportal.pages.TaxonSynonymyPage;
26

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

    
33
@DataPortalContexts( { DataPortalContext.cichorieae })
34
public class Cichorieae_NamePageTest extends CdmDataPortalTestBase{
35

    
36

    
37
    static UUID intybellia_rosea_cass_Uuid = UUID.fromString("b8f725f0-320a-49e5-aa9a-82cef1c47c17");
38

    
39
    static UUID lapsana_zacintha_Uuid = UUID.fromString("fee25b71-537b-48b5-a18d-7c863000c7af");
40

    
41
//	static UUID lactuca_favratii_Uuid = UUID.fromString("6027e1fa-9fe5-4ddc-a2de-f72bfa7378c0");
42
//
43
//	static UUID crepis_oenipontana_Uuid = UUID.fromString("31b8757f-6acb-4826-ba7f-b2d116dc713c");
44
//
45
//	static UUID crepis_artificialis_Uuid = UUID.fromString("3eabdf89-ddeb-461c-b6f8-341bb8deb7bf");
46

    
47

    
48
    @Test
49
    public void intybellia_rosea_cass() throws Exception {
50
        GenericPortalPage p = new GenericPortalPage(driver, getContext(), "name/" + intybellia_rosea_cass_Uuid);
51
        assertEquals(getContext().prepareTitle("Crepis purpurea"), p.getTitle());
52
        TaxonSynonymyPage synonymyPage = new TaxonSynonymyPage(driver, getContext());
53
        WebElement intybellia_rosea_cass_synonym = synonymyPage.getHeterotypicalGroupSynonym(1, 1);
54
        assertNotNull("Synonym 'Intybellia rosea Cass.' should be highlighted", intybellia_rosea_cass_synonym.findElement(By.className("highlite")));
55

    
56
    }
57

    
58
    @Test
59
    public void lapsana_zacintha_L() throws Exception {
60
        GenericPortalPage p = new GenericPortalPage(driver, getContext(), "name/" + lapsana_zacintha_Uuid);
61
        assertEquals(getContext().prepareTitle("Crepis zacintha"), p.getTitle());
62
        TaxonSynonymyPage synonymyPage = new TaxonSynonymyPage(driver, getContext());
63

    
64
        assertEquals("≡ Lapsana zacintha L., Sp. Pl.: 811. 1753", synonymyPage.getHomotypicalGroupSynonymName(1));
65
        WebElement lapsana_zacintha_synonym = synonymyPage.getHomotypicalGroupSynonym(1);
66
        assertNotNull("Synonym 'Lapsana zacintha L.' should be highlighted", lapsana_zacintha_synonym.findElement(By.className("highlite")));
67

    
68
        assertEquals("≡ Rhagadiolus zacintha (L.) All., Fl. Pedem. 1: 227. 1785", synonymyPage.getHomotypicalGroupSynonymName(2));
69
        assertEquals("≡ Zacintha verrucosa Gaertn., Fruct. Sem. Pl. 2: 358. 1791, nom. nov.", synonymyPage.getHomotypicalGroupSynonymName(3));
70

    
71

    
72
    }
73

    
74

    
75
}
(5-5/13)