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.assertEquals;
|
12
|
import static org.junit.Assert.assertNotNull;
|
13
|
|
14
|
import java.util.UUID;
|
15
|
|
16
|
import org.junit.Test;
|
17
|
import org.openqa.selenium.By;
|
18
|
import org.openqa.selenium.WebElement;
|
19
|
|
20
|
import eu.etaxonomy.dataportal.DataPortalSite;
|
21
|
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
|
22
|
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
|
23
|
import eu.etaxonomy.dataportal.pages.GenericPortalPage;
|
24
|
import eu.etaxonomy.dataportal.pages.TaxonSynonymyPage;
|
25
|
|
26
|
/**
|
27
|
*
|
28
|
* @author a.kohlbecker
|
29
|
*
|
30
|
*/
|
31
|
|
32
|
@DataPortalContexts( { DataPortalSite.cichorieae })
|
33
|
public class Cichorieae_NamePageTest extends CdmDataPortalTestBase{
|
34
|
|
35
|
|
36
|
static UUID intybellia_rosea_cass_Uuid = UUID.fromString("b8f725f0-320a-49e5-aa9a-82cef1c47c17");
|
37
|
|
38
|
static UUID lapsana_zacintha_Uuid = UUID.fromString("fee25b71-537b-48b5-a18d-7c863000c7af");
|
39
|
|
40
|
// static UUID lactuca_favratii_Uuid = UUID.fromString("6027e1fa-9fe5-4ddc-a2de-f72bfa7378c0");
|
41
|
//
|
42
|
// static UUID crepis_oenipontana_Uuid = UUID.fromString("31b8757f-6acb-4826-ba7f-b2d116dc713c");
|
43
|
//
|
44
|
// static UUID crepis_artificialis_Uuid = UUID.fromString("3eabdf89-ddeb-461c-b6f8-341bb8deb7bf");
|
45
|
|
46
|
|
47
|
@Test
|
48
|
public void intybellia_rosea_cass() throws Exception {
|
49
|
GenericPortalPage p = new GenericPortalPage(driver, getContext(), "name/" + intybellia_rosea_cass_Uuid);
|
50
|
assertEquals(getContext().prepareTitle("Crepis purpurea"), p.getTitle());
|
51
|
TaxonSynonymyPage synonymyPage = new TaxonSynonymyPage(driver, getContext());
|
52
|
WebElement intybellia_rosea_cass_synonym = synonymyPage.getHeterotypicalGroupSynonym(1, 1);
|
53
|
assertNotNull("Synonym 'Intybellia rosea Cass.' should be highlighted", intybellia_rosea_cass_synonym.findElement(By.className("highlite")));
|
54
|
|
55
|
}
|
56
|
|
57
|
@Test
|
58
|
public void lapsana_zacintha_L() throws Exception {
|
59
|
GenericPortalPage p = new GenericPortalPage(driver, getContext(), "name/" + lapsana_zacintha_Uuid);
|
60
|
assertEquals(getContext().prepareTitle("Crepis zacintha"), p.getTitle());
|
61
|
TaxonSynonymyPage synonymyPage = new TaxonSynonymyPage(driver, getContext());
|
62
|
|
63
|
assertEquals("≡ Lapsana zacintha L., Sp. Pl.: 811. 1753", synonymyPage.getHomotypicalGroupSynonymName(1));
|
64
|
WebElement lapsana_zacintha_synonym = synonymyPage.getHomotypicalGroupSynonym(1);
|
65
|
assertNotNull("Synonym 'Lapsana zacintha L.' should be highlighted", lapsana_zacintha_synonym.findElement(By.className("highlite")));
|
66
|
|
67
|
assertEquals("≡ Rhagadiolus zacintha (L.) All., Fl. Pedem. 1: 227. 1785", synonymyPage.getHomotypicalGroupSynonymName(2));
|
68
|
assertEquals("≡ Zacintha verrucosa Gaertn., Fruct. Sem. Pl. 2: 358. 1791, nom. nov.", synonymyPage.getHomotypicalGroupSynonymName(3));
|
69
|
|
70
|
|
71
|
}
|
72
|
|
73
|
|
74
|
}
|