Project

General

Profile

« Previous | Next » 

Revision 5a0b5871

Added by Andreas Kohlbecker over 11 years ago

removing selenium tests for diptera portal

View differences:

.gitattributes
1092 1092
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cyprus/CyprusSearchTest.java -text
1093 1093
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cyprus/Cyprus_HybridTest.java -text
1094 1094
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cyprus/Cyprus_OriginalSourceTest.java -text
1095
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/diptera/Diptera_OriginalSourceTest.java -text
1096 1095
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/flMalesiana/FloraMalesianaPolytomousKeyTest.java -text
1097 1096
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/flMalesiana/FloraMalesiana_OriginalSourceTest.java -text
1098 1097
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/palmae/Calamus_acanthospathus_TaxonProfileTest.java -text
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/resources/eu/etaxonomy/dataportal/DataPortalTest.xml
32 32
  <entry key="dataPortalContext.floramalesiana.classificationUUID">ca4e4bcb-a1d1-4124-a358-a3d3c41dd450</entry>
33 33
  <entry key="dataPortalContext.floramalesiana.themeName"></entry>
34 34
  <entry key="dataPortalContext.floramalesiana.siteName">Flora Malesiana</entry>
35

  
36
  <entry key="dataPortalContext.diptera.baseUri">http://160.45.63.201/dataportal/integration/diptera/</entry>
37
  <entry key="dataPortalContext.diptera.cdmServerUri">http://127.0.0.1:8080/diptera/</entry>
38
  <entry key="dataPortalContext.diptera.classificationUUID">1e3093f6-c761-4e96-8065-2c1334ddd0c1</entry>
39
  <entry key="dataPortalContext.diptera.themeName"></entry>
40
  <entry key="dataPortalContext.diptera.siteName">Diptera Portal: Milichiidae</entry>
41 35
  <!--
42 36

  
43 37
    Selenium WebDriver settings
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/diptera/Diptera_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.diptera;
11

  
12
import static org.junit.Assert.assertEquals;
13
import static org.junit.Assert.assertNotNull;
14

  
15
import java.net.MalformedURLException;
16
import java.util.List;
17
import java.util.UUID;
18

  
19
import org.junit.After;
20
import org.junit.Before;
21
import org.junit.Test;
22

  
23
import eu.etaxonomy.dataportal.DataPortalContext;
24
import eu.etaxonomy.dataportal.elements.LinkElement;
25
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
26
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
27
import eu.etaxonomy.dataportal.pages.TaxonProfilePage;
28

  
29
/**
30
 *
31
 * @author a.kohlbecker
32
 *
33
 */
34

  
35
@DataPortalContexts( { DataPortalContext.diptera})
36
public class Diptera_OriginalSourceTest extends CdmDataPortalTestBase{
37

  
38
    // Milichia speciosa
39
    static UUID taxonUuid = UUID.fromString("1f1f8356-a172-4f7d-ad98-e8a37489ce9f");
40

  
41
    TaxonProfilePage p = null;
42

  
43
    @Before
44
    public void setUp() throws MalformedURLException {
45

  
46
        p = new TaxonProfilePage(driver, getContext(), taxonUuid);
47

  
48
    }
49

  
50
    @After
51
    public void tearDown(){
52
        logger.debug("@After");
53
    }
54

  
55

  
56
    @Test
57
    public void testPage() {
58

  
59
        assertEquals(getContext().prepareTitle("Milichia speciosa"), p.getTitle());
60
//		assertNull("Authorship information should be hidden", p.getAuthorInformationText());
61

  
62
        List<LinkElement> primaryTabs = p.getPrimaryTabs();
63
        assertEquals("Expecting 3 tabs", 3, primaryTabs.size());
64
        assertEquals("General", primaryTabs.get(0).getText());
65
        assertEquals("Nomenclature", primaryTabs.get(1).getText());
66
        assertEquals("Specimens", primaryTabs.get(2).getText());
67

  
68
        assertEquals("Content", p.getTableOfContentHeader());
69
        List<LinkElement> tocLinks = p.getTableOfContentLinks();
70
        assertNotNull("Expecting a list of TOC links in the profile page.", tocLinks);
71

  
72
        p.testTableOfContentEntry(0, "Citations", "citation");
73
        p.testTableOfContentEntry(1, "Distribution", "distribution");
74
        p.testTableOfContentEntry(2, "Occurrence", "occurrence");
75

  
76
        /*  no longer compatible with test framework in Drupal 7 branch ignoring
77
         * reason_ change of block id naming convention
78
         *
79
        FeatureBlock featureBlock = p.getFeatureBlockAt(0, "citation", "ul", "li");
80
        assertEquals("expecting no footnote keys", 0, featureBlock.getFootNoteKeys().size());
81

  
82
        List<WebElement> listElements = featureBlock.getElement().findElements(By.tagName("li"));
83
        assertEquals("Expecting 48 listElements tags in \"Citations\"", 48, listElements.size());
84

  
85
        // ---
86
        assertEquals("Argyrites speciosa (Meigen, 1830): Croatia", listElements.get(0).getText());
87
        List<WebElement> anchorTags = listElements.get(0).findElements(By.tagName("a"));
88
        assertEquals("Expecting one link", 1, anchorTags.size());
89
        assertTrue(anchorTags.get(0).getAttribute("href").contains("?q=cdm_dataportal/name/"));
90

  
91
        // ---
92
        assertEquals("Milichia speciosa Meigen, 1830: type information (Becker 1902: 314)", listElements.get(2).getText());
93
        anchorTags = listElements.get(2).findElements(By.tagName("a"));
94
        assertEquals("Expecting two links", 2, anchorTags.size());
95
        assertEquals("Milichia speciosa Meigen, 1830", anchorTags.get(0).getText());
96
        assertTrue(anchorTags.get(0).getAttribute("href").contains("?q=cdm_dataportal/name/"));
97
        assertEquals("Becker 1902", anchorTags.get(1).getText());
98
        assertTrue(anchorTags.get(1).getAttribute("href").contains("?q=cdm_dataportal/reference/"));
99

  
100
        // ---
101
        assertEquals("Milichia speciosa Meigen, 1830: checklist, Italy (Canzoneri, Gorodkov, Krivosheina, Munari, Nartshuk, Papp & Süss 1995: 25)", listElements.get(9).getText());
102
        anchorTags = listElements.get(9).findElements(By.tagName("a"));
103
        assertEquals("Expecting two links", 2, anchorTags.size());
104
        assertEquals("Milichia speciosa Meigen, 1830", anchorTags.get(0).getText());
105
        assertTrue(anchorTags.get(0).getAttribute("href").contains("?q=cdm_dataportal/name/"));
106
        assertEquals("Canzoneri, Gorodkov, Krivosheina, Munari, Nartshuk, Papp & Süss 1995", anchorTags.get(1).getText());
107
        assertTrue(anchorTags.get(1).getAttribute("href").contains("?q=cdm_dataportal/reference/"));
108
         */
109
    }
110

  
111
}

Also available in: Unified diff