Revision 921a67e4
Added by Andreas Kohlbecker about 11 years ago
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/pages/TaxonSearchResultPage.java | ||
---|---|---|
11 | 11 |
|
12 | 12 |
import java.util.ArrayList; |
13 | 13 |
import java.util.List; |
14 |
import java.util.UUID; |
|
14 | 15 |
import java.util.concurrent.TimeUnit; |
15 | 16 |
|
16 | 17 |
import org.apache.log4j.Logger; |
... | ... | |
105 | 106 |
* |
106 | 107 |
*/ |
107 | 108 |
@SuppressWarnings("unchecked") |
108 |
public <T extends PortalPage> T clickTaxonName(TaxonListElement taxonListElement, Class<T> pageClass) throws Exception { |
|
109 |
public <T extends PortalPage> T clickTaxonName(TaxonListElement taxonListElement, Class<T> pageClass, UUID taxonUuid) throws Exception {
|
|
109 | 110 |
|
110 | 111 |
LinkElement taxonlink = new LinkElement(taxonListElement.getElement().findElement(By.tagName("a"))); |
111 | 112 |
logger.debug("taxonlink to click: " + taxonlink.toString() + " [" + taxonlink.getElement().toString() + "]"); |
112 |
return (T) clickLink(taxonlink, new VisibilityOfElementLocated(By.id("featureTOC")), pageClass, 2l, TimeUnit.MINUTES); |
|
113 |
logger.debug(" waiting for visibility of css selector: .page-cdm-dataportal-taxon-" + taxonUuid.toString() + " ..."); |
|
114 |
return (T) clickLink(taxonlink, new VisibilityOfElementLocated(By.cssSelector(".page-cdm-dataportal-taxon-" + taxonUuid.toString())), |
|
115 |
pageClass, 2l, TimeUnit.MINUTES); |
|
113 | 116 |
|
114 | 117 |
} |
115 | 118 |
|
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/CichorieaeSearchTest.java | ||
---|---|---|
13 | 13 |
import static org.junit.Assert.assertEquals; |
14 | 14 |
|
15 | 15 |
import java.util.List; |
16 |
import java.util.UUID; |
|
16 | 17 |
|
17 | 18 |
import junit.framework.Assert; |
18 | 19 |
|
... | ... | |
35 | 36 |
@DataPortalContexts( { DataPortalContext.cichorieae }) |
36 | 37 |
public class CichorieaeSearchTest extends CdmDataPortalTestBase { |
37 | 38 |
|
39 |
private static final UUID UUID_L_COMMUNIS = UUID.fromString("5d65f017-0c23-43e4-888d-9649de50dd45"); |
|
38 | 40 |
private static GenericPortalPage homePage = null; |
39 | 41 |
|
40 | 42 |
@Before |
... | ... | |
73 | 75 |
WebElement referenceElement = lapsanaCommunnis.getElement().findElement(By.className("reference")); |
74 | 76 |
Assert.assertEquals("Sp. Pl.: 811. 1753", referenceElement.findElement((By.className("reference"))).getText()); |
75 | 77 |
|
76 |
PortalPage taxonProfilLapsanaCommunnis = searchResultPage.clickTaxonName(lapsanaCommunnis, GenericPortalPage.class); |
|
78 |
PortalPage taxonProfilLapsanaCommunnis = searchResultPage.clickTaxonName(lapsanaCommunnis, GenericPortalPage.class, UUID_L_COMMUNIS);
|
|
77 | 79 |
assertEquals(getContext().prepareTitle("Lapsana communis"), taxonProfilLapsanaCommunnis.getTitle()); |
78 | 80 |
} |
79 | 81 |
|
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/flMalesiana/FloraMalesiana_OriginalSourceTest.java | ||
---|---|---|
44 | 44 |
@DataPortalContexts( { DataPortalContext.floramalesiana}) |
45 | 45 |
public class FloraMalesiana_OriginalSourceTest extends CdmDataPortalTestBase{ |
46 | 46 |
|
47 |
private static final UUID UUID_ILLICIUM = UUID.fromString("502e28ca-23d0-44a8-9c13-85fb3d076bff"); |
|
48 |
|
|
47 | 49 |
private GenericPortalPage homePage; |
48 | 50 |
|
49 | 51 |
@Before |
... | ... | |
73 | 75 |
assertEquals("Illicium L. in Syst. Nat. ed. 10: 1050. 1759", entryIillicium.getFullTaxonName()); |
74 | 76 |
|
75 | 77 |
logger.debug("clicking TaxonName" + entryIillicium.getElement().toString()); |
76 |
TaxonProfilePage taxonProfileIillicium = searchResultPage.clickTaxonName(entryIillicium, TaxonProfilePage.class); |
|
78 |
TaxonProfilePage taxonProfileIillicium = searchResultPage.clickTaxonName(entryIillicium, TaxonProfilePage.class, UUID_ILLICIUM);
|
|
77 | 79 |
|
78 | 80 |
// assertNull("Authorship information should be hidden", taxonProfileIillicium.getAuthorInformationText()); // FF WebDriver hangs here |
79 | 81 |
|
Also available in: Unified diff
another attempt to solve #2987 (selenium test Illicium@floramalesiana(eu.etaxonomy.dataportal.selenium.tests.flMalesiana.FloraMalesiana_OriginalSourceTest) fails due to timeouts)