Project

General

Profile

« Previous | Next » 

Revision afb1f504

Added by Andreas Kohlbecker over 3 years ago

ref #9222 adapting tests to more data being visible in the specimen views

View differences:

src/test/java/eu/etaxonomy/dataportal/selenium/tests/reference/SpecimensTreeViewTest.java
79 79
        assertEquals("Germany", dl1.joinedDescriptionElementText("Country:"));
80 80
        assertEquals("Berlin", dl1.joinedDescriptionElementText("Locality:"));
81 81
        BaseElement descriptionListContainer = new BaseElement(derivateTreeContainer);
82
        assertEquals(3, descriptionListContainer.getLinksInElement().size()); // other links in the derivate tree are also found
82
        assertEquals(4, descriptionListContainer.getLinksInElement().size()); // other links in the derivate tree are also found
83
        // TODO one of the links is a footnote key for which the footnote is missing
83 84
        LinkElement link1 = descriptionListContainer.getLinksInElement().get(0);
84 85
        assertEquals("Detail page", link1.getText());
85 86
        assertTrue(link1.getUrl().endsWith("/cdm_dataportal/occurrence/89d36e79-3e80-4468-986e-411ca391452e"));
......
90 91
        assertEquals("2017E68", dl2.joinedDescriptionElementText("Accession number:"));
91 92
        assertEquals("\nCode:\nCEDiT", dl2.joinedDescriptionElementText("Collection"));
92 93
        assertEquals("Specimen", dl2.joinedDescriptionElementText("Kind of unit:"));
93
        assertEquals("Epitype: Germany, Berlin, 52°31'1.2\"N, 13°21'E, 28 Mar 2016, D047 (CEDiT 2017E68).",
94
        assertEquals("Epitype (designated by Kretschmann, J., Žerdoner ?alasan, A. & Kusber, W.-H. 20171): Germany, Berlin, 52°31'1.2\"N, 13°21'E, 28 Mar 2016, D047 (CEDiT 2017E68).",
94 95
                dl2.joinedDescriptionElementText("Specimen type designations:"));
95 96
        DescriptionElement specimenTypeDesignation_dd = dl2.getDescriptionGroups().get("Specimen type designations:").get(0);
96 97
        List<LinkElement> specimenTypeDesignationLinks = specimenTypeDesignation_dd.getDescriptionElementContent().getLinksInElement();
97
        assertEquals(1, specimenTypeDesignationLinks.size());
98
        assertEquals("CEDiT 2017E68", specimenTypeDesignationLinks.get(0).getText());
99
        assertTrue(specimenTypeDesignationLinks.get(0).getUrl().endsWith("cdm_dataportal/occurrence/8585081c-b73b-440b-b349-582845cf3fb4"));
98
        assertEquals(2, specimenTypeDesignationLinks.size());
99
        // TODO one of the links is a footnote key for which the footnote is missing
100
        assertEquals("CEDiT 2017E68", specimenTypeDesignationLinks.get(1).getText());
101
        assertTrue(specimenTypeDesignationLinks.get(1).getUrl().endsWith("cdm_dataportal/occurrence/8585081c-b73b-440b-b349-582845cf3fb4"));
100 102

  
101 103
        // Germany, Berlin, 52°31'1.2"N, 13°21'E, 28.3.2016, D047.
102 104
        summaryRows.get(1).click(); // make the row visible
......
110 112
        assertEquals("Germany", dl1.joinedDescriptionElementText("Country:"));
111 113
        assertEquals("Berlin", dl1.joinedDescriptionElementText("Locality:"));
112 114
        descriptionListContainer = new BaseElement(derivateTreeContainer);
113
        assertEquals(5, descriptionListContainer.getLinksInElement().size()); // other links in the derivate tree are also found
115
        assertEquals(6, descriptionListContainer.getLinksInElement().size()); // other links in the derivate tree are also found
114 116
        link1 = descriptionListContainer.getLinksInElement().get(0);
115 117
        assertEquals("Detail page", link1.getText());
116 118
        assertTrue(link1.getUrl().endsWith("/cdm_dataportal/occurrence/89d36e79-3e80-4468-986e-411ca391452e"));
......
121 123
        assertEquals("M-0289351", dl2.joinedDescriptionElementText("Accession number:"));
122 124
        assertEquals("\nCode:\nM", dl2.joinedDescriptionElementText("Collection"));
123 125
        assertEquals("Specimen", dl2.joinedDescriptionElementText("Kind of unit:"));
124
        assertEquals("Isolectotype: Germany, Berlin, 52°31'1.2\"N, 13°21'E, 28 Mar 2016, D047 (M M-0289351). http://herbarium.bgbm.org/object/B400042045",
126
        assertEquals("Isolectotype (designated by Kretschmann, J., Žerdoner ?alasan, A. & Kusber, W.-H. 20172): Germany, Berlin, 52°31'1.2\"N, 13°21'E, 28 Mar 2016, D047 (M M-0289351). http://herbarium.bgbm.org/object/B400042045",
125 127
                dl2.joinedDescriptionElementText("Specimen type designations:"));
126 128
        specimenTypeDesignationLinks = dl2.getDescriptionGroups().get("Specimen type designations:").get(0).getDescriptionElementContent().getLinksInElement();
127
        assertEquals(2, specimenTypeDesignationLinks.size());
128
        assertEquals("M M-0289351", specimenTypeDesignationLinks.get(0).getText());
129
        assertTrue(specimenTypeDesignationLinks.get(0).getUrl().endsWith("cdm_dataportal/occurrence/e86c5acd-de55-44af-99f7-484207657264"));
130
        assertEquals("http://herbarium.bgbm.org/object/B400042045", specimenTypeDesignationLinks.get(1).getText());
131
        assertEquals("http://herbarium.bgbm.org/object/B400042045", specimenTypeDesignationLinks.get(1).getUrl().toString());
129
        assertEquals(3, specimenTypeDesignationLinks.size());
130
        assertEquals("M M-0289351", specimenTypeDesignationLinks.get(1).getText());
131
        assertTrue(specimenTypeDesignationLinks.get(1).getUrl().endsWith("cdm_dataportal/occurrence/e86c5acd-de55-44af-99f7-484207657264"));
132
        assertEquals("http://herbarium.bgbm.org/object/B400042045", specimenTypeDesignationLinks.get(2).getText());
133
        assertEquals("http://herbarium.bgbm.org/object/B400042045", specimenTypeDesignationLinks.get(2).getUrl().toString());
132 134

  
133 135
    }
134 136

  

Also available in: Unified diff