Project

General

Profile

« Previous | Next » 

Revision 8faa6ef3

Added by Andreas Kohlbecker almost 7 years ago

increasing reliability of feature block testing

  • testing title and content separately
  • applying the new test features to palmweb tests

View differences:

src/test/java/eu/etaxonomy/dataportal/selenium/tests/palmae/Iriartea_deltoidea_UsesTest.java
85 85
        /* distribution */
86 86
        String featureClass = "distribution";
87 87
        String featureLabel = "Distribution";
88
        String blockTextFull = featureLabel + "\n\n\n\n\nMap uses TDWG level 3 distributions (http://www.nhm.ac.uk/hosted_sites/tdwg/geogrphy.html)\n"
88
        String blockTextFull = "Map uses TDWG level 3 distributions (http://www.nhm.ac.uk/hosted_sites/tdwg/geogrphy.html)\n"
89 89
                + "Bolivia (World Checklist of Arecaceae), Brazil North (World Checklist of Arecaceae), Colombia (World Checklist of Arecaceae), Costa Rica (World Checklist of Arecaceae), Ecuador (World Checklist of Arecaceae), Nicaragua (World Checklist of Arecaceae), Panamá (World Checklist of Arecaceae), Peru (World Checklist of Arecaceae), Venezuela (World Checklist of Arecaceae)\n"
90 90
                + "Central America to Ecuador W of the Andes, and in the W part of the Amazon region from Venezuela to Bolivia. Perhaps the most common native tree species in Ecuador, occurring in all provinces that include moist lowland areas. (Borchsenius F., Borgtoft-Pedersen H. and Baslev H. 1998. Manual to the Palms of Ecuador. AAU Reports 37. Department of Systematic Botany, University of Aarhus, Denmark in collaboration with Pontificia Universidad Catalica del Ecuador)";
91 91

  
92 92
        p.testTableOfContentEntry(featureId, featureLabel, featureClass);
93 93
        FeatureBlock featureBlockDistribution = p.getFeatureBlockAt(featureId, featureClass, "div", "span");
94 94

  
95
        assertEquals(blockTextFull, featureBlockDistribution.getText());
95
        assertEquals(featureLabel, featureBlockDistribution.getTitle().getText());
96
        assertEquals(blockTextFull, featureBlockDistribution.getContent().getText().trim());
97

  
96 98
        featureBlockDistribution.testDescriptionElementLayout(0, indent, descriptionElementFontSize, expectedCssDisplay, expectedListStyleType, expectedListStylePosition, expectedListStyleImage);
97 99

  
98 100
        assertNotNull("Expecting an OpenLayers map", featureBlockDistribution.getElement().findElement(By.id("openlayers-map-distribution")));

Also available in: Unified diff