Project

General

Profile

Revision 2ae1c797

ID2ae1c7978e94be06d0d60b42131f73e97b9bb5a3
Parent f37da5d1
Child 78a42a9b

Added by Andreas Kohlbecker 6 months ago

ref #7514 adapting tests to conform to new misapplied name symbols

View differences:

src/test/java/eu/etaxonomy/dataportal/selenium/tests/reference/MisappliedNamesTest.java
17 17
import org.junit.Test;
18 18
import org.openqa.selenium.WebElement;
19 19

  
20
import eu.etaxonomy.cdm.common.UTF8;
20 21
import eu.etaxonomy.dataportal.DataPortalSite;
21 22
import eu.etaxonomy.dataportal.ElementUtils;
22 23
import eu.etaxonomy.dataportal.StringConstants;
......
47 48

  
48 49
    static final UUID nepenthes_abalata_Uuid = UUID.fromString("9b588d8a-c4fa-430a-b9c7-026bf715ecf6");
49 50

  
50

  
51

  
52 51
    @Before
53 52
    public void setUp() throws Exception {
54 53
        driver.get(getContext().getBaseUri().toString());
......
68 67
        TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), miconia_cubacinerea_Uuid);
69 68

  
70 69
        // no sensu but with Combination Authors:
71
        assertEquals("–\n\"Ossaea angustifolia\" auct., non Cheek", p.getMisappliedName(1).getText());
70
        assertEquals(UTF8.EN_DASH + "\n\"Ossaea angustifolia\" auct., non Cheek", p.getMisappliedName(1).getText());
72 71
        //
73
        assertEquals("–\n\"Ossaea glomerata\" sensu A&S1; sensu A&S: 221; sensu A&S: 331; sensu Lem2; sensu Species solaris; auct.; auct. sensu A&S1; auctrs. afr.", p.getMisappliedName(2).getText());
72
        assertEquals(UTF8.EN_DASH + "\n\"Ossaea glomerata\" sensu A&S1; sensu A&S: 221; sensu A&S: 331; sensu Lem2; sensu Species solaris; auct.; auct. sensu A&S1; auctrs. afr.", p.getMisappliedName(2).getText());
74 73
        // with doubtful flag
75
        assertEquals("–\n" + StringConstants.DOUBTFULMARKER_SPACE +"\"Ossaea glomerata\" sensu A&S1", p.getMisappliedName(3).getText());
74
        assertEquals(UTF8.EN_DASH + "\n" + StringConstants.DOUBTFULMARKER_SPACE +"\"Ossaea glomerata\" sensu A&S1", p.getMisappliedName(3).getText());
76 75

  
77
        assertEquals("p.p.MAN\nOssaea glomerata sec. A&S1; sec. Species solaris", p.getMisappliedName(4).getText());
76
        assertEquals(UTF8.EM_DASH_DOUBLE + "(p.p.)\nOssaea glomerata sec. A&S1; sec. Species solaris", p.getMisappliedName(4).getText());
78 77

  
79
        assertEquals("partial MAN\nOssaea glomerata sec. A&S: 331; auct. sec. A&S1", p.getMisappliedName(5).getText());
78
        assertEquals(UTF8.EM_DASH_DOUBLE + "(part.)\nOssaea glomerata sec. A&S: 331; auct. sec. A&S1", p.getMisappliedName(5).getText());
80 79
        // Test also invalid designation which is rendered with the misapplied names
81
        assertEquals("–\nOssaea maculata sec. Lem2, rel. sec. A&S1", p.getMisappliedName(6).getText());
80
        assertEquals(UTF8.EN_DASH + "\nOssaea maculata sec. Lem2, rel. sec. A&S1", p.getMisappliedName(6).getText());
82 81

  
83 82
        List<BaseElement> footnotes = ElementUtils.findFootNotes(p.getTaxonRelationships());
84 83
        assertEquals(2, footnotes.size());
......
143 142

  
144 143
        WebElement misappliedName1 = p.getMisappliedName(1);
145 144
        assertNotNull(misappliedName1);
146
        assertEquals("–\n" + StringConstants.DOUBTFULMARKER_SPACE +"\"Oncidium carthaginense\" auct. sensu Greuter, W. & Rankin Rodríguez, R1", misappliedName1.getText());
145
        assertEquals(UTF8.EN_DASH + "\n" + StringConstants.DOUBTFULMARKER_SPACE +"\"Oncidium carthaginense\" auct. sensu Greuter, W. & Rankin Rodríguez, R1", misappliedName1.getText());
147 146

  
148 147
        WebElement misappliedName2 = p.getMisappliedName(2);
149 148
        assertNotNull(misappliedName2);
150
        assertEquals("–\n\"Oncidium guttatum\" auct. sensu Greuter, W. & Rankin Rodríguez, R1", misappliedName2.getText());
149
        assertEquals(UTF8.EN_DASH + "\n\"Oncidium guttatum\" auct. sensu Greuter, W. & Rankin Rodríguez, R1", misappliedName2.getText());
151 150

  
152 151
        List<BaseElement> footnotes = ElementUtils.findFootNotes(p.getTaxonRelationships());
153 152
        assertEquals(1, footnotes.size());
......
170 169

  
171 170
        WebElement misappliedName1 = p.getMisappliedName(1);
172 171
        assertNotNull(misappliedName1);
173
        assertEquals("–\n\"Nepenthes alata\" pro parte, sensu Cheek, M.R. & Jebb, M.H.P. 20011, non Blanco, err. sec. Cheek, M.R. & Jebb, M.H.P. 20132", misappliedName1.getText());
172
        assertEquals(UTF8.EN_DASH + "\n\"Nepenthes alata\" pro parte, sensu Cheek, M.R. & Jebb, M.H.P. 20011, non Blanco, err. sec. Cheek, M.R. & Jebb, M.H.P. 20132", misappliedName1.getText());
174 173

  
175 174
        WebElement misappliedName2 = p.getMisappliedName(2);
176 175
        assertNotNull(misappliedName2);
177
        assertEquals("–\n\"Nepenthes blancoi\" pro parte, sensu Macfarlane 19083, non Blume, err. sec. Cheek, M.R. & Jebb, M.H.P. 20132", misappliedName2.getText());
176
        assertEquals(UTF8.EN_DASH + "\n\"Nepenthes blancoi\" pro parte, sensu Macfarlane 19083, non Blume, err. sec. Cheek, M.R. & Jebb, M.H.P. 20132", misappliedName2.getText());
178 177

  
179 178
        List<BaseElement> footnotes = ElementUtils.findFootNotes(p.getTaxonRelationships());
180 179
        assertEquals(3, footnotes.size());

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)