Project

General

Profile

Download (3 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.util.UUID;
12

    
13
import org.junit.Test;
14
import org.openqa.selenium.By;
15
import org.openqa.selenium.WebElement;
16

    
17
import eu.etaxonomy.dataportal.DataPortalSite;
18
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
19
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
20
import eu.etaxonomy.dataportal.pages.GenericPortalPage;
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_NamePageTest extends CdmDataPortalTestBase{
31

    
32

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

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

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

    
43

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

    
52
    }
53

    
54
    @Test
55
    public void lapsana_zacintha_L() throws Exception {
56
        GenericPortalPage p = new GenericPortalPage(driver, getContext(), "name/" + lapsana_zacintha_Uuid + "/null/null/redirect_to_taxon");
57
        assertEquals(getContext().prepareTitle("Crepis zacintha"), driver.getTitle());
58
        TaxonSynonymyPage synonymyPage = new TaxonSynonymyPage(driver, getContext());
59

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

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

    
67

    
68
    }
69

    
70

    
71
}
(5-5/13)