Project

General

Profile

Revision bafcf277

IDbafcf2771ab3aa75a81e5e640da4ddba4562a00b
Parent a0557101
Child e56e5d1c

Added by Andreas Kohlbecker 10 months ago

adapting xpaths in test framework to modified rendering of footnotes, related to ref #7658

View differences:

src/main/java/eu/etaxonomy/dataportal/pages/TaxonSynonymyPage.java
103 103
     */
104 104
    public List<LinkElement> getAcceptedNameFootNoteKeys() {
105 105
        List<WebElement> fnkListElements = synonymy.findElements(
106
                By.xpath("./div[contains(@class,'accepted-name')]/span/span[contains(@class, 'footnote-key')]/a")
106
                By.xpath("./div[contains(@class,'accepted-name')]/span[contains(@class, 'footnote-key')]/a")
107 107
        );
108 108
        return ElementUtils.linkElementsFromFootNoteKeyListElements(fnkListElements);
109 109
    }
......
221 221
     * 				the 1-based index of the heterotypical group
222 222
     */
223 223
    public List<LinkElement> getHeterotypicalGroupFootNoteKeys(Integer heterotypicalGroupIndex) {
224
        // 1. try find the misapplied name footnote keys
224 225
        List<WebElement> fnkListElements = synonymy.findElements(
225 226
                By.xpath("./div[contains(@class,'heterotypic-synonymy-group')][" + heterotypicalGroupIndex + "]/ul[@class = 'heterotypicSynonymyGroup']/li/span/span/span/span[contains(@class, 'footnote-key')]/a")
226 227
         );
228
        // 2. try find the others
229
        if(fnkListElements.size() == 0){
230
            fnkListElements = synonymy.findElements(
231
                    By.xpath("./div[contains(@class,'heterotypic-synonymy-group')][" + heterotypicalGroupIndex + "]/ul[@class = 'heterotypicSynonymyGroup']/li/span/span[contains(@class, 'footnote-key')]/a")
232
             );
233
        }
227 234
        return ElementUtils.linkElementsFromFootNoteKeyListElements(fnkListElements);
228 235
    }
229 236

  
src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Cichorieae_FootnoteTest.java
45 45

  
46 46
        assertEquals("expecting one footnoteKey", 1, p.getHeterotypicalGroupFootNoteKeys(2).size());
47 47
        List<BaseElement> footNotes = p.getHeterotypicalGroupFootNotes(2);
48
        assertEquals("expecting one footnotw", 1, footNotes.size());
48
        assertEquals("expecting one footnote", 1, footNotes.size());
49 49
        String first100Chars = footNotes.get(0).getText().substring(0, 100);
50 50
        assertEquals("1. As has been noted first by Sennikov (in Bot Zhurn. 82(5): 114. 1997), the names Lactuca saxatilis", first100Chars);
51 51
    }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)