Project

General

Profile

« Previous | Next » 

Revision 709175a2

Added by Andreas Kohlbecker over 6 years ago

Tests for hierarchic descriptions at the example of FloraMalesiana

View differences:

modules/cdm_dataportal/includes/descriptions.inc
666 666
              }
667 667
            }
668 668
            $block_content_is_empty = $block_content_is_empty && empty($text);
669
            $block->content[] = markup_to_render_array($text);
669
            $block->content[] = markup_to_render_array('<div id="Description" class="feature-block-elements"><div>' . $text . '</div></div>');
670 670
            $block_content_is_empty = $block_content_is_empty && empty($media_list);
671 671
          }
672 672

  
src/main/java/eu/etaxonomy/dataportal/elements/FeatureBlock.java
15 15
import java.util.HashMap;
16 16
import java.util.List;
17 17

  
18
import org.apache.log4j.Level;
19 18
import org.openqa.selenium.By;
20 19
import org.openqa.selenium.JavascriptExecutor;
21 20
import org.openqa.selenium.NoSuchElementException;
......
129 128
    public FeatureBlock(WebDriver driver, WebElement element, String enclosingTag, String ... elementTags) {
130 129

  
131 130
        super(element);
132
        logger.setLevel(Level.TRACE);
131
//        logger.setLevel(Level.TRACE);
133 132
        logger.trace("FeatureBlock() - constructor after super()");
134 133

  
135 134
        this.driver = driver;
src/main/java/eu/etaxonomy/dataportal/pages/TaxonProfilePage.java
164 164
        List<WebElement> featureBlocks = portalContent.findElements(By.className("block-cdm-dataportal-feature"));
165 165
        Assert.assertTrue("Too few feature block elements", featureBlocks.size() >= position);
166 166
        for(WebElement b : featureBlocks){
167
            if(logger.isTraceEnabled()) {
168
                logger.trace("getFeatureBlockAt() - checking block '" + b.getAttribute("id") + "");
169
            }
167 170
            if (b.getAttribute("id").equals("block-cdm-dataportal-feature-" + normalizeClassAttribute(featureName))){
168
                logger.trace("getFeatureBlockAt() - block found, will be instantiated ...");
171
                logger.debug("getFeatureBlockAt() - block found, will be instantiated ...");
169 172
                return new FeatureBlock( driver, b, enclosingTag, elementTag);
170 173
            }
171 174
        }

Also available in: Unified diff