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.assertTrue;
|
14
|
|
15
|
import java.net.MalformedURLException;
|
16
|
import java.util.List;
|
17
|
import java.util.UUID;
|
18
|
|
19
|
import org.junit.Test;
|
20
|
|
21
|
import eu.etaxonomy.dataportal.DataPortalContext;
|
22
|
import eu.etaxonomy.dataportal.elements.TypeDesignationElement;
|
23
|
import eu.etaxonomy.dataportal.elements.TypeDesignationType;
|
24
|
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
|
25
|
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
|
26
|
import eu.etaxonomy.dataportal.pages.TaxonSynonymyPage;
|
27
|
|
28
|
/**
|
29
|
* tests to avoid regression of #2306 (holotype is only displayed as type) and related bugs
|
30
|
*
|
31
|
* @author a.kohlbecker
|
32
|
*
|
33
|
*/
|
34
|
|
35
|
@DataPortalContexts( { DataPortalContext.cichorieae })
|
36
|
public class Cichorieae_TypeTest extends CdmDataPortalTestBase{
|
37
|
|
38
|
|
39
|
static UUID cichorium_uuid = UUID.fromString("21d7161a-455e-4f4d-9d61-7f0100c38ff3");
|
40
|
|
41
|
static UUID scorzonera_tuzgoluensis_Uuid = UUID.fromString("296b4758-048a-47bb-a394-affca64dfc40");
|
42
|
|
43
|
|
44
|
@Test
|
45
|
public void cichorium() throws MalformedURLException {
|
46
|
TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), cichorium_uuid);
|
47
|
assertEquals(getContext().prepareTitle("Cichorium"), p.getTitle());
|
48
|
assertEquals("Cichorium L., Sp. Pl.: 813. 1753", p.getAcceptedNameText());
|
49
|
List<TypeDesignationElement> typeDesignations = p.getAcceptedNameTypeDesignations();
|
50
|
assertEquals("Expecting one Typedesignation", 1, typeDesignations.size());
|
51
|
assertEquals(TypeDesignationType.nameTypeDesignation, typeDesignations.get(0).getTypeDesignationType());
|
52
|
assertEquals("Lectotype (designated by Green 1929: 1781): Cichorium intybus L.", typeDesignations.get(0).getText());
|
53
|
}
|
54
|
|
55
|
@Test
|
56
|
public void scorzonera_tuzgoluensis() throws MalformedURLException {
|
57
|
TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), scorzonera_tuzgoluensis_Uuid);
|
58
|
assertEquals(getContext().prepareTitle("Scorzonera tuzgoluensis"), p.getTitle());
|
59
|
List<TypeDesignationElement> typeDesignations = p.getAcceptedNameTypeDesignations();
|
60
|
assertEquals("Expecting one Typedesignation", 1, typeDesignations.size());
|
61
|
assertEquals(TypeDesignationType.specimenTypeDesignation, typeDesignations.get(0).getTypeDesignationType());
|
62
|
assertEquals("Holotype: Turkey, B4 Konya, Cihanbeyli, between Gölyazı-Tuzgölü, alt. 908 m, 38°32'33.12\"N, 33°21'11.28\"E, A. Duran, B. Doğan & S. Makbul (KNYA).", typeDesignations.get(0).getText());
|
63
|
}
|
64
|
|
65
|
}
|