Project

General

Profile

Revision 41fb1151

ID41fb11515c84cc7f7088365db413106689d867c7
Parent 0207cf2c
Child 10e3087e

Added by Andreas Kohlbecker over 3 years ago

more tests for misapplied names

View differences:

src/main/java/eu/etaxonomy/dataportal/StringConstants.java
1
/**
2
* Copyright (C) 2018 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;
10

  
11
/**
12
 * @author a.kohlbecker
13
 * @since Aug 31, 2018
14
 *
15
 */
16
public class StringConstants {
17

  
18
    /**
19
     * SMALL QUESTION MARK + NARROW NO-BREAK
20
     */
21
    public static final String DOUBTFULMARKER_SPACE = "/uFE56/u8239";
22

  
23
}
src/test/java/eu/etaxonomy/dataportal/selenium/tests/reference/MisappliedNamesTest.java
18 18

  
19 19
import eu.etaxonomy.dataportal.DataPortalSite;
20 20
import eu.etaxonomy.dataportal.ElementUtils;
21
import eu.etaxonomy.dataportal.StringConstants;
21 22
import eu.etaxonomy.dataportal.elements.BaseElement;
22 23
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
23 24
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
24 25
import eu.etaxonomy.dataportal.pages.TaxonSynonymyPage;
25 26

  
26 27
/**
28
 * Issues to be covered by this TestClass:
29
 *
30
 * #5676
31
 * #5647 - OK
32
 * #5492 - OK
33
 *
27 34
 * @author a.kohlbecker
28 35
 *
29 36
 */
......
33 40

  
34 41
    static final UUID miconia_cubacinerea_Uuid = UUID.fromString("c6716cee-2039-4ba8-a239-4b1b353f9c84");
35 42

  
43

  
44
    static final UUID trichocentrum_undulatum_Uuid = UUID.fromString("7e86b2a4-ba71-4494-b544-ae5656e02ed2");
45

  
36 46
    @Before
37 47
    public void setUp() throws Exception {
38 48
        driver.get(getContext().getBaseUri().toString());
39 49
    }
40 50

  
41 51
    /**
42
     * Test for correct sensu representation of misapplied names, see #5676
52
     * Test for correct sensu representation of misapplied names, see #5676 and #5647
53
     *
54
     * https://dev.e-taxonomy.eu/redmine/issues/5647
55
     *
56
     * NOTE: Species solaris has no authorship!!
43 57
     */
44 58
    @Test
45
    public void testTitleAndTabs() throws MalformedURLException {
59
    public void tesIssue5647() throws MalformedURLException {
46 60

  
47 61
        TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), miconia_cubacinerea_Uuid);
48 62

  
......
56 70
    }
57 71

  
58 72

  
73
    /**
74
     * https://dev.e-taxonomy.eu/redmine/issues/5492
75
     */
76
    @Test
77
    public void testIssue5492() throws MalformedURLException {
78

  
79
        TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), trichocentrum_undulatum_Uuid);
80

  
81
        WebElement misappliedName1 = p.getMisappliedName(1);
82
        assertNotNull(misappliedName1);
83
        assertEquals("–\n\"Oncidium guttatum\" auct. sensu Greuter, W. & Rankin Rodríguez, R1", misappliedName1.getText());
84

  
85
        WebElement misappliedName2 = p.getMisappliedName(2);
86
        assertNotNull(misappliedName2);
87
        assertEquals("–\n" + StringConstants.DOUBTFULMARKER_SPACE +"\"Oncidium carthaginense\" auct. sensu Greuter, W. & Rankin Rodríguez, R1", misappliedName2.getText());
88

  
89

  
90
        List<BaseElement> footnotes = ElementUtils.findFootNotes(p.getTaxonRelationships());
91
        assertEquals(1, footnotes.size());
92
        assertEquals("1. Greuter, W. & Rankin Rodríguez, R, Plantas vasculares de Cuba: inventario preliminar. Tercera edición, actualizada. Vascular plants of Cuba: a preliminary checklist. Third updated edition.", footnotes.get(0).getText());
93

  
94
    }
95

  
96

  
59 97

  
60 98
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)