Revision d2a09415
Added by Andreas Kohlbecker over 8 years ago
modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/flMalesiana/FloraMalesiana_OriginalSourceTest.java | ||
---|---|---|
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.flMalesiana; |
|
11 |
|
|
12 |
import static org.junit.Assert.assertEquals; |
|
13 |
|
|
14 |
import java.util.List; |
|
15 |
import java.util.UUID; |
|
16 |
|
|
17 |
import org.junit.After; |
|
18 |
import org.junit.Before; |
|
19 |
import org.junit.Ignore; |
|
20 |
import org.junit.Test; |
|
21 |
|
|
22 |
import eu.etaxonomy.dataportal.DataPortalContext; |
|
23 |
import eu.etaxonomy.dataportal.elements.LinkElement; |
|
24 |
import eu.etaxonomy.dataportal.elements.TaxonListElement; |
|
25 |
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase; |
|
26 |
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts; |
|
27 |
import eu.etaxonomy.dataportal.pages.GenericPortalPage; |
|
28 |
import eu.etaxonomy.dataportal.pages.TaxonProfilePage; |
|
29 |
import eu.etaxonomy.dataportal.pages.TaxonSearchResultPage; |
|
30 |
|
|
31 |
/** |
|
32 |
* |
|
33 |
* @author a.kohlbecker |
|
34 |
* |
|
35 |
*/ |
|
36 |
|
|
37 |
@DataPortalContexts( { DataPortalContext.floramalesiana}) |
|
38 |
public class FloraMalesiana_OriginalSourceTest extends CdmDataPortalTestBase{ |
|
39 |
|
|
40 |
private static final UUID UUID_ILLICIUM = UUID.fromString("502e28ca-23d0-44a8-9c13-85fb3d076bff"); |
|
41 |
|
|
42 |
private GenericPortalPage homePage; |
|
43 |
|
|
44 |
@Before |
|
45 |
public void setUp() throws Exception { |
|
46 |
|
|
47 |
driver.get(getContext().getBaseUri().toString()); |
|
48 |
homePage = new GenericPortalPage(driver, getContext()); |
|
49 |
} |
|
50 |
|
|
51 |
@After |
|
52 |
public void tearDown(){ |
|
53 |
logger.debug("@After"); |
|
54 |
} |
|
55 |
|
|
56 |
|
|
57 |
@Test |
|
58 |
@Ignore // see #3788 (sort order of search results broken in free-text taxon search) |
|
59 |
public void Illicium() throws Exception { |
|
60 |
|
|
61 |
TaxonSearchResultPage searchResultPage = homePage.submitQuery("Illicium"); |
|
62 |
|
|
63 |
assertEquals(getContext().prepareTitle("Search results"), searchResultPage.getTitle()); |
|
64 |
|
|
65 |
logger.debug("getting first result entry"); |
|
66 |
TaxonListElement entryIillicium = searchResultPage.getResultItem(1); |
|
67 |
|
|
68 |
logger.debug("checking FullTaxonName of first entry: " + entryIillicium.getElement().toString()); |
|
69 |
assertEquals("Illicium L. in Syst. Nat. ed. 10: 1050. 1759", entryIillicium.getFullTaxonName()); |
|
70 |
|
|
71 |
logger.debug("clicking TaxonName" + entryIillicium.getElement().toString()); |
|
72 |
TaxonProfilePage taxonProfileIillicium = searchResultPage.clickTaxonName(entryIillicium, TaxonProfilePage.class, UUID_ILLICIUM); |
|
73 |
|
|
74 |
// assertNull("Authorship information should be hidden", taxonProfileIillicium.getAuthorInformationText()); // FF WebDriver hangs here |
|
75 |
|
|
76 |
List<LinkElement> primaryTabs = taxonProfileIillicium.getPrimaryTabs(); |
|
77 |
|
|
78 |
assertEquals("Expecting 4 tabs", 4, primaryTabs.size()); |
|
79 |
assertEquals("General\n(active tab)", primaryTabs.get(0).getText()); |
|
80 |
assertEquals("Synonymy", primaryTabs.get(1).getText()); |
|
81 |
assertEquals("Images", primaryTabs.get(2).getText()); |
|
82 |
assertEquals("Keys", primaryTabs.get(3).getText()); |
|
83 |
|
|
84 |
} |
|
85 |
|
|
86 |
} |
|
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.flMalesiana; |
|
11 |
|
|
12 |
import static org.junit.Assert.assertEquals; |
|
13 |
|
|
14 |
import java.util.List; |
|
15 |
import java.util.UUID; |
|
16 |
|
|
17 |
import org.junit.After; |
|
18 |
import org.junit.Before; |
|
19 |
import org.junit.Ignore; |
|
20 |
import org.junit.Test; |
|
21 |
|
|
22 |
import eu.etaxonomy.dataportal.DataPortalContext; |
|
23 |
import eu.etaxonomy.dataportal.elements.LinkElement; |
|
24 |
import eu.etaxonomy.dataportal.elements.TaxonListElement; |
|
25 |
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase; |
|
26 |
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts; |
|
27 |
import eu.etaxonomy.dataportal.pages.GenericPortalPage; |
|
28 |
import eu.etaxonomy.dataportal.pages.TaxonProfilePage; |
|
29 |
import eu.etaxonomy.dataportal.pages.TaxonSearchResultPage; |
|
30 |
|
|
31 |
/** |
|
32 |
* |
|
33 |
* @author a.kohlbecker |
|
34 |
* |
|
35 |
*/ |
|
36 |
|
|
37 |
@DataPortalContexts( { DataPortalContext.floramalesiana}) |
|
38 |
public class FloraMalesiana_OriginalSourceTest extends CdmDataPortalTestBase{ |
|
39 |
|
|
40 |
private static final UUID UUID_ILLICIUM = UUID.fromString("502e28ca-23d0-44a8-9c13-85fb3d076bff"); |
|
41 |
|
|
42 |
private GenericPortalPage homePage; |
|
43 |
|
|
44 |
@Before |
|
45 |
public void setUp() throws Exception { |
|
46 |
|
|
47 |
driver.get(getContext().getBaseUri().toString()); |
|
48 |
homePage = new GenericPortalPage(driver, getContext()); |
|
49 |
} |
|
50 |
|
|
51 |
@After |
|
52 |
public void tearDown(){ |
|
53 |
logger.debug("@After"); |
|
54 |
} |
|
55 |
|
|
56 |
|
|
57 |
@Test |
|
58 |
@Ignore // see #3788 (sort order of search results broken in free-text taxon search) |
|
59 |
public void Illicium() throws Exception { |
|
60 |
|
|
61 |
TaxonSearchResultPage searchResultPage = homePage.submitQuery("Illicium"); |
|
62 |
|
|
63 |
assertEquals(getContext().prepareTitle("Search results"), searchResultPage.getTitle()); |
|
64 |
|
|
65 |
logger.debug("getting first result entry"); |
|
66 |
TaxonListElement entryIillicium = searchResultPage.getResultItem(1); |
|
67 |
|
|
68 |
logger.debug("checking FullTaxonName of first entry: " + entryIillicium.getElement().toString()); |
|
69 |
assertEquals("Illicium L. in Syst. Nat. ed. 10: 1050. 1759", entryIillicium.getFullTaxonName()); |
|
70 |
|
|
71 |
logger.debug("clicking TaxonName" + entryIillicium.getElement().toString()); |
|
72 |
TaxonProfilePage taxonProfileIillicium = searchResultPage.clickTaxonName(entryIillicium, TaxonProfilePage.class, UUID_ILLICIUM); |
|
73 |
|
|
74 |
// assertNull("Authorship information should be hidden", taxonProfileIillicium.getAuthorInformationText()); // FF WebDriver hangs here |
|
75 |
|
|
76 |
List<LinkElement> primaryTabs = taxonProfileIillicium.getPrimaryTabs(); |
|
77 |
|
|
78 |
assertEquals("Expecting 4 tabs", 4, primaryTabs.size()); |
|
79 |
assertEquals("General\n(active tab)", primaryTabs.get(0).getText()); |
|
80 |
assertEquals("Synonymy", primaryTabs.get(1).getText()); |
|
81 |
assertEquals("Images", primaryTabs.get(2).getText()); |
|
82 |
assertEquals("Keys", primaryTabs.get(3).getText()); |
|
83 |
|
|
84 |
} |
|
85 |
|
|
86 |
} |
Also available in: Unified diff
CRLF will be replaced by LF issues