Project

General

Profile

Revision d4a3527b

IDd4a3527b1c0bf36de1d7bf23ea3e8e51d863835e
Parent f0d48bd8
Child 1ce9afb7

Added by Andreas Kohlbecker about 7 years ago

test for #4423 (DescriptionElement media no longer visible)

View differences:

.gitattributes
1534 1534
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Cichorieae_TechnicalAnnnotationsTest.java -text
1535 1535
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Cichorieae_TypeTest.java -text
1536 1536
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Crepis_tectorum_SynonymyTest.java -text
1537
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/FeatureBlock_Media_Test.java -text
1537 1538
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/HomonymTest.java -text
1538 1539
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Lactuca_triquetra_TaxonProfileTest.java -text
1539 1540
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Scorzonera_SynonymyTest.java -text
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/FeatureBlock_Media_Test.java
1
/**
2
 * Copyright (C) 2014 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.selenium.tests.cichorieae;
10

  
11
import static org.junit.Assert.assertEquals;
12
import static org.junit.Assert.assertNotNull;
13
import static org.junit.Assert.assertNull;
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.ElementUtils;
23
import eu.etaxonomy.dataportal.elements.FeatureBlock;
24
import eu.etaxonomy.dataportal.elements.GalleryImage;
25
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
26
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
27
import eu.etaxonomy.dataportal.pages.TaxonProfilePage;
28

  
29
/**
30
 * @author a.kohlbecker
31
 *
32
 */
33
@DataPortalContexts( { DataPortalContext.cichorieae })
34
public class FeatureBlock_Media_Test extends CdmDataPortalTestBase {
35

  
36
    static UUID erythroseris_amabilis_Uuid = UUID.fromString("b335ceee-d6c1-4c93-841d-3b4bd279d855");
37

  
38
    @Test
39
    public void erythroseris_amabilis() throws MalformedURLException {
40
        TaxonProfilePage p = new TaxonProfilePage(driver, getContext(), erythroseris_amabilis_Uuid);
41
        String expectedName = "Erythroseris amabilis";
42
        assertEquals(getContext().prepareTitle(expectedName), driver.getTitle());
43

  
44
        FeatureBlock palynologyBlock = p.getFeatureBlockAt(1, "palynology", "div", "span");
45

  
46
        List<List<GalleryImage>> galleryImageRows = ElementUtils.getGalleryImages(palynologyBlock.getElement(), p.getWait());
47

  
48
        assertEquals("Expecting one row of images", 1, galleryImageRows.size());
49
        assertEquals("Expecting 3 images in row", 3, galleryImageRows.get(0).size());
50

  
51
        GalleryImage firstImage = galleryImageRows.get(0).get(0);
52
        assertNotNull("caption should be on", firstImage.getCaptionText());
53

  
54
    }
55

  
56

  
57
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)