1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2009 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
package eu.etaxonomy.dataportal.selenium.tests.cyprus;
|
11
|
|
12
|
import org.junit.Assert;
|
13
|
import org.junit.Ignore;
|
14
|
import org.junit.Test;
|
15
|
import org.openqa.selenium.By;
|
16
|
import org.openqa.selenium.RenderedWebElement;
|
17
|
import org.openqa.selenium.WebElement;
|
18
|
|
19
|
import eu.etaxonomy.dataportal.DataPortalContext;
|
20
|
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
|
21
|
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
|
22
|
|
23
|
/**
|
24
|
* @author a.kohlbecker
|
25
|
*
|
26
|
*/
|
27
|
|
28
|
@DataPortalContexts( { DataPortalContext.cyprus })
|
29
|
public class CyprusSearchTest extends CdmDataPortalTestBase{
|
30
|
|
31
|
/**
|
32
|
* see http://dev.e-taxonomy.eu/trac/ticket/2350
|
33
|
*/
|
34
|
@Test
|
35
|
@Ignore
|
36
|
public void searchResultsWithoutAnnotationFootnotes(){
|
37
|
driver.get(getBaseUrl() + "?query=Genis*&search[tree]=0c2b5d25-7b15-4401-8b51-dd4be0ee5cab&q=cdm_dataportal%2Fsearch%2Ftaxon&search[pageSize]=25&search[pageNumber]=0&search[doTaxa]=1&search[doSynonyms]=1&search[doTaxaByCommonNames]=0");
|
38
|
|
39
|
// --- This variant is slower in FF that using the full xpath
|
40
|
// WebElement container = driver.findElement(By.id("squeeze"));
|
41
|
// RenderedWebElement element = (RenderedWebElement)container.findElement(By.xpath("div/div/ul/li/span[contains(@class, 'footnote-key')]"));
|
42
|
|
43
|
// --- using the full xpath
|
44
|
RenderedWebElement element = (RenderedWebElement)driver.findElement(By.xpath("/html/body/div/div/div[2]/div[2]/div/div/div/ul/li/span[contains(@class, 'footnote-key')]"));
|
45
|
Assert.assertNull("result set entries must not have footnote keys", element);
|
46
|
}
|
47
|
|
48
|
}
|