Project

General

Profile

« Previous | Next » 

Revision 0439c8dd

Added by Andreas Kohlbecker over 9 years ago

more information in case of assertion errors

View differences:

7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/FeatureBlock.java
87 87
        WebElement descriptionElementsRepresentation =  element.findElement(By.className("feature-block-elements"));
88 88
        featureType = descriptionElementsRepresentation.getAttribute("id");
89 89

  
90
        //TODO throw exception instead of making an assetion! selenium should have appropriate exeptions
90
        //TODO throw exception instead of making an assertion! selenium should have appropriate exceptions
91 91
        assertEquals("Unexpected tag enclosing description element representations", enclosingTag, descriptionElementsRepresentation.getTagName());
92 92

  
93 93
        if(elementTags.length > 1){
......
144 144
        double elementPadLeft = pxSizeToDouble(firstDescriptionElement.getElement().getCssValue("padding-left"));
145 145

  
146 146
        assertEquals(indent, elementX - parentX + elementPadLeft, PIXEL_TOLERANCE);
147
        assertEquals(computedFontSize, firstDescriptionElement.getComputedFontSize(), 0.5);
148
        assertEquals(expectedCssDisplay, firstDescriptionElement.getElement().getCssValue("display"));
147
        assertEquals("css font-size:", computedFontSize, firstDescriptionElement.getComputedFontSize(), 0.5);
148
        assertEquals("css display:", expectedCssDisplay, firstDescriptionElement.getElement().getCssValue("display"));
149 149

  
150 150
        if(expectedCssDisplay.equals("list-item")){
151
            assertEquals(expectedListStylePosition, firstDescriptionElement.getElement().getCssValue("list-style-position"));
152
            assertEquals(expectedListStyleImage, firstDescriptionElement.getElement().getCssValue("list-style-image"));
153
            assertEquals(expectedListStyleType, firstDescriptionElement.getElement().getCssValue("list-style-type"));
151
            assertEquals("css list-style-position: ", expectedListStylePosition, firstDescriptionElement.getElement().getCssValue("list-style-position"));
152
            assertEquals("css list-style-image: ",  expectedListStyleImage, firstDescriptionElement.getElement().getCssValue("list-style-image"));
153
            assertEquals("css list-style-type: ", expectedListStyleType, firstDescriptionElement.getElement().getCssValue("list-style-type"));
154 154
        }
155 155
    }
156 156

  
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/SearchBlock.java
22 22
public class SearchBlock extends DrupalBlock {
23 23

  
24 24

  
25
	/**
26
	 * @param element
27
	 */
28
	public SearchBlock(WebElement element) {
29
		super(element);
30
	}
25
    /**
26
     * @param element
27
     */
28
    public SearchBlock(WebElement element) {
29
        super(element);
30
    }
31 31

  
32 32

  
33 33
}

Also available in: Unified diff