Project

General

Profile

« Previous | Next » 

Revision 3e75dc06

Added by Andreas Kohlbecker over 3 years ago

ref #9224 error messages control with defined dom element id

View differences:

modules/cdm_dataportal/js/map/openlayers_map.js
1355 1355
            OpenLayers.Util.extend(control, {
1356 1356

  
1357 1357
                messageText: "The map is currently broken due to problems with the map server.",
1358

  
1358
                id: 'OpenLayers_Control_ErrorMessages',
1359 1359
                type: 'ErrorMessages',
1360 1360
                title: 'Error messages',
1361 1361

  
src/test/java/eu/etaxonomy/dataportal/selenium/tests/palmae/Iriartea_deltoidea_UsesTest.java
15 15
import org.junit.Before;
16 16
import org.junit.Test;
17 17
import org.openqa.selenium.By;
18
import org.openqa.selenium.NoSuchElementException;
18 19
import org.openqa.selenium.WebElement;
19 20

  
20 21
import eu.etaxonomy.dataportal.DataPortalSite;
......
93 94
        FeatureBlock featureBlockDistribution = p.getFeatureBlockAt(featureId, featureClass, "div", "span");
94 95

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

  
98

  
96 99
        String distributionContentText = featureBlockDistribution.getContentText().trim();
100
        WebElement openLayersErrorMessages = null;
101
        try {
102
            openLayersErrorMessages = featureBlockDistribution.getElement().findElement(By.id("OpenLayers_Control_ErrorMessages"));
103
            distributionContentText = distributionContentText.replace(openLayersErrorMessages.getText(), "").trim();  // remove error text
104
        } catch(NoSuchElementException e) {
105
            // IGNORE
106
        }
97 107
        assertEquals(blockTextFull, distributionContentText);
98 108

  
99 109
        featureBlockDistribution.testDescriptionElementLayout(0, indent, descriptionElementFontSize, expectedCssDisplay, expectedListStyleType, expectedListStylePosition, expectedListStyleImage);

Also available in: Unified diff