commit ff4f2e074f6f3ffbfc889bb78f562137e646fa4b
Author: Andreas Kohlbecker <a.kohlbecker@bgbm.org>
Date:   Thu Mar 7 13:50:42 2013 +0000

    more test for typedesignations

diff --git a/.gitattributes b/.gitattributes
index c2d12b47..81813438 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1090,15 +1090,16 @@
 7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/resources/org/mozilla/addons/disable_add_on_compatibility_checks-1.3.xpi -text
 7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/resources/org/mozilla/addons/firebug-1.10.5-fx.xpi -text
 7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/resources/org/mozilla/addons/firepath-0.9.7-fx.xpi -text
-7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/CichorieaeSearchTest.java -text
 7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Cichorieae_CommonNamesTest.java -text
 7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Cichorieae_FootnoteTest.java -text
 7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Cichorieae_HybridTest.java -text
 7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Cichorieae_NamePageTest.java -text
+7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Cichorieae_SearchTest.java -text
 7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Cichorieae_TechnicalAnnnotationsTest.java -text
 7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Cichorieae_TypeTest.java -text
-7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Crepis_tectorum_Synonymy.java -text
+7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Crepis_tectorum_SynonymyTest.java -text
 7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Lactuca_triquetra_TaxonProfileTest.java -text
+7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Scorzonera_SynonymyTest.java -text
 7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cyprus/Allium_guttatum_subsp_guttatum_TaxonProfileTest.java -text
 7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cyprus/CyprusSearchTest.java -text
 7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cyprus/Cyprus_HybridTest.java -text
diff --git a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/TypeDesignationElement.java b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/TypeDesignationElement.java
index 927f73dc..2b25cba2 100644
--- a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/TypeDesignationElement.java
+++ b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/TypeDesignationElement.java
@@ -10,6 +10,7 @@
 package eu.etaxonomy.dataportal.elements;
 
 import org.openqa.selenium.By;
+import org.openqa.selenium.NoSuchElementException;
 import org.openqa.selenium.WebElement;
 
 /**
@@ -19,13 +20,20 @@ import org.openqa.selenium.WebElement;
  */
 public class TypeDesignationElement extends BaseElement {
 
-    private WebElement status;
+    private final WebElement status;
 
-    private TypeDesignationType typeDesignationType;
+    private WebElement nameDescription = null;
+
+    private final TypeDesignationType typeDesignationType;
 
     public TypeDesignationElement(WebElement element) {
         super(element);
         status = element.findElement(By.cssSelector(".status"));
+        try {
+            nameDescription = element.findElement(By.cssSelector(".description"));
+        } catch (NoSuchElementException e) {
+            // IGNORE
+        }
         typeDesignationType = TypeDesignationType.valueOf(element.getAttribute("class"));
     }
 
@@ -37,4 +45,13 @@ public class TypeDesignationElement extends BaseElement {
         return typeDesignationType;
     }
 
+    /**
+     * contains nomenclatorical status, protologues, etc.
+     *
+     * @return the nameDescription
+     */
+    public WebElement getNameDescription() {
+        return nameDescription;
+    }
+
 }
diff --git a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/pages/TaxonSynonymyPage.java b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/pages/TaxonSynonymyPage.java
index a3477af6..9927bf62 100644
--- a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/pages/TaxonSynonymyPage.java
+++ b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/pages/TaxonSynonymyPage.java
@@ -10,28 +10,21 @@
  */
 package eu.etaxonomy.dataportal.pages;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
 import java.net.MalformedURLException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.UUID;
 
 import org.apache.log4j.Logger;
-import org.junit.Assert;
 import org.openqa.selenium.By;
-import org.openqa.selenium.NoSuchElementException;
-import org.openqa.selenium.WebElement;
 import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
 import org.openqa.selenium.support.CacheLookup;
 import org.openqa.selenium.support.FindBy;
 
 import eu.etaxonomy.dataportal.DataPortalContext;
 import eu.etaxonomy.dataportal.ElementUtils;
 import eu.etaxonomy.dataportal.elements.BaseElement;
-import eu.etaxonomy.dataportal.elements.FeatureBlock;
-import eu.etaxonomy.dataportal.elements.ImgElement;
 import eu.etaxonomy.dataportal.elements.LinkElement;
 import eu.etaxonomy.dataportal.elements.TypeDesignationElement;
 
@@ -130,6 +123,16 @@ public class TaxonSynonymyPage extends PortalPage {
         return ElementUtils.linkElementsFromFootNoteKeyListElements(fnkListElements);
     }
 
+    /**
+     * @return
+     */
+    public List<BaseElement> getAcceptedNameFootNotes() {
+        List<WebElement> fnListElements = synonymy.findElements(
+                By.xpath("./span[contains(@class,'accepted-name')]/following-sibling::ul[contains(@class, 'footnotes')]/li[contains(@class, 'footnotes')]/span[contains(@class, 'footnote')]")
+        );
+        return ElementUtils.baseElementsFromFootNoteListElements(fnListElements);
+    }
+
     /**
      * @param synonymIndex
      *            the 1-based position of the synonym in the list of homotypical
@@ -197,10 +200,26 @@ public class TaxonSynonymyPage extends PortalPage {
      * @return
      */
     public WebElement getHeterotypicalGroupSynonym(Integer heterotypicalGroupIndex, Integer synonymIndex) {
-        WebElement synonym = synonymy.findElement(By.xpath("./div[contains(@class,'heterotypic-synonymy-group')][" + heterotypicalGroupIndex + "]/ul/li[" + synonymIndex + "]"));
+        WebElement synonym = synonymy.findElement(By.xpath("./div[contains(@class,'heterotypic-synonymy-group')][" + heterotypicalGroupIndex + "]/ul[contains(@class,'heterotypicSynonymyGroup')]/li[" + synonymIndex + "]"));
         return synonym;
     }
 
+    /**
+     * @param heterotypicalGroupIndex
+     *            the 1-based index of the heterotypical group
+     * @return
+     */
+    public List<TypeDesignationElement> getHeterotypicalGroupTypeDesignations(Integer heterotypicalGroupIndex) {
+        List<WebElement> typeDesignationElements = synonymy.findElements(By
+                .xpath("./div[contains(@class,'heterotypic-synonymy-group')][" + heterotypicalGroupIndex
+                        + "]/ul[contains(@class,'heterotypicSynonymyGroup')]/ul[contains(@class,'typeDesignations')]/li"));
+        List<TypeDesignationElement> typeDesignations = new ArrayList<TypeDesignationElement>();
+        for (WebElement el : typeDesignationElements) {
+            typeDesignations.add(new TypeDesignationElement(el));
+        }
+        return typeDesignations;
+    }
+
     /**
      * @param heterotypicalGroupIndex
      * 				the 1-based index of the heterotypical group
diff --git a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/CichorieaeSearchTest.java b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/CichorieaeSearchTest.java
deleted file mode 100644
index 176ccd2a..00000000
--- a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/CichorieaeSearchTest.java
+++ /dev/null
@@ -1,101 +0,0 @@
-// $Id$
-/**
- * Copyright (C) 2009 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-package eu.etaxonomy.dataportal.selenium.tests.cichorieae;
-
-import static org.junit.Assert.*;
-import static org.junit.Assert.assertEquals;
-
-import java.util.List;
-import java.util.UUID;
-
-import junit.framework.Assert;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.openqa.selenium.By;
-import org.openqa.selenium.WebElement;
-
-import eu.etaxonomy.dataportal.DataPortalContext;
-import eu.etaxonomy.dataportal.elements.GalleryImage;
-import eu.etaxonomy.dataportal.elements.LinkElement;
-import eu.etaxonomy.dataportal.elements.TaxonListElement;
-import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
-import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
-import eu.etaxonomy.dataportal.pages.GenericPortalPage;
-import eu.etaxonomy.dataportal.pages.PortalPage;
-import eu.etaxonomy.dataportal.pages.TaxonSearchResultPage;
-import eu.etaxonomy.dataportal.selenium.VisibilityOfElementLocated;
-
-@DataPortalContexts( { DataPortalContext.cichorieae })
-public class CichorieaeSearchTest extends CdmDataPortalTestBase {
-
-    private static final UUID UUID_L_COMMUNIS = UUID.fromString("5d65f017-0c23-43e4-888d-9649de50dd45");
-    private static GenericPortalPage homePage = null;
-
-    @Before
-    public void setUp() throws Exception {
-
-        driver.get(getContext().getBaseUri().toString());
-        homePage = new GenericPortalPage(driver, getContext());
-
-    }
-
-    @Test
-    public void testSearchLCommunis() throws Exception {
-
-        TaxonSearchResultPage searchResultPage = homePage.submitQuery("Lapsana com*");
-
-        assertEquals(getContext().prepareTitle("Search results"), searchResultPage.getTitle());
-
-        TaxonListElement lapsanaCommunnis = searchResultPage.getResultItem(1);
-
-        assertEquals("Lapsana communis L., Sp. Pl.: 811. 1753", lapsanaCommunnis.getFullTaxonName());
-
-        WebElement nameElement = lapsanaCommunnis.getElement().findElement(By.className("BotanicalName"));
-
-        WebElement namePart1 = nameElement.findElement(By.xpath("span[1]"));
-        Assert.assertEquals("Lapsana", namePart1.getText());
-        Assert.assertEquals("italic", namePart1.getCssValue("font-style"));
-
-        WebElement namePart2 = nameElement.findElement(By.xpath("span[2]"));
-        Assert.assertEquals("communis", namePart2.getText());
-        Assert.assertEquals("italic", namePart2.getCssValue("font-style"));
-
-        WebElement authorPart = nameElement.findElement(By.xpath("span[3]"));
-        Assert.assertEquals("L.", authorPart.getText());
-        Assert.assertEquals("normal", authorPart.getCssValue("font-style"));
-
-        WebElement referenceElement = lapsanaCommunnis.getElement().findElement(By.className("reference"));
-        Assert.assertEquals("Sp. Pl.: 811. 1753", referenceElement.findElement((By.className("reference"))).getText());
-
-        PortalPage taxonProfilLapsanaCommunnis = searchResultPage.clickTaxonName(lapsanaCommunnis, GenericPortalPage.class, UUID_L_COMMUNIS);
-        assertEquals(getContext().prepareTitle("Lapsana communis"), taxonProfilLapsanaCommunnis.getTitle());
-    }
-
-    @Test
-    public void testSearchLCommunis_ImageLinks() throws Exception {
-
-        TaxonSearchResultPage searchResultPage = homePage.submitQuery("Lapsana com*");
-
-        assertEquals(getContext().prepareTitle("Search results"), searchResultPage.getTitle());
-
-        TaxonListElement lapsanaCommunnis = searchResultPage.getResultItem(1);
-
-        List<List<GalleryImage>> galleryImageRows = searchResultPage.getGalleryImagesOf(lapsanaCommunnis);
-
-        assertEquals("Expecting one row of images", 1, galleryImageRows.size());
-        assertEquals("Expecting 4 images in row", 4, galleryImageRows.get(0).size());
-
-        GalleryImage firstImage = galleryImageRows.get(0).get(0);
-        assertNull("caption should be off", firstImage.getCaptionText());
-        searchResultPage.clickLink(firstImage.getImageLink(), new VisibilityOfElementLocated(By.id("images")), GenericPortalPage.class);
-    }
-
-}
diff --git a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Cichorieae_SearchTest.java b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Cichorieae_SearchTest.java
new file mode 100644
index 00000000..ff635086
--- /dev/null
+++ b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Cichorieae_SearchTest.java
@@ -0,0 +1,101 @@
+// $Id$
+/**
+ * Copyright (C) 2009 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
+package eu.etaxonomy.dataportal.selenium.tests.cichorieae;
+
+import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+
+import java.util.List;
+import java.util.UUID;
+
+import junit.framework.Assert;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
+
+import eu.etaxonomy.dataportal.DataPortalContext;
+import eu.etaxonomy.dataportal.elements.GalleryImage;
+import eu.etaxonomy.dataportal.elements.LinkElement;
+import eu.etaxonomy.dataportal.elements.TaxonListElement;
+import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
+import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
+import eu.etaxonomy.dataportal.pages.GenericPortalPage;
+import eu.etaxonomy.dataportal.pages.PortalPage;
+import eu.etaxonomy.dataportal.pages.TaxonSearchResultPage;
+import eu.etaxonomy.dataportal.selenium.VisibilityOfElementLocated;
+
+@DataPortalContexts( { DataPortalContext.cichorieae })
+public class Cichorieae_SearchTest extends CdmDataPortalTestBase {
+
+    private static final UUID UUID_L_COMMUNIS = UUID.fromString("5d65f017-0c23-43e4-888d-9649de50dd45");
+    private static GenericPortalPage homePage = null;
+
+    @Before
+    public void setUp() throws Exception {
+
+        driver.get(getContext().getBaseUri().toString());
+        homePage = new GenericPortalPage(driver, getContext());
+
+    }
+
+    @Test
+    public void testSearchLCommunis() throws Exception {
+
+        TaxonSearchResultPage searchResultPage = homePage.submitQuery("Lapsana com*");
+
+        assertEquals(getContext().prepareTitle("Search results"), searchResultPage.getTitle());
+
+        TaxonListElement lapsanaCommunnis = searchResultPage.getResultItem(1);
+
+        assertEquals("Lapsana communis L., Sp. Pl.: 811. 1753", lapsanaCommunnis.getFullTaxonName());
+
+        WebElement nameElement = lapsanaCommunnis.getElement().findElement(By.className("BotanicalName"));
+
+        WebElement namePart1 = nameElement.findElement(By.xpath("span[1]"));
+        Assert.assertEquals("Lapsana", namePart1.getText());
+        Assert.assertEquals("italic", namePart1.getCssValue("font-style"));
+
+        WebElement namePart2 = nameElement.findElement(By.xpath("span[2]"));
+        Assert.assertEquals("communis", namePart2.getText());
+        Assert.assertEquals("italic", namePart2.getCssValue("font-style"));
+
+        WebElement authorPart = nameElement.findElement(By.xpath("span[3]"));
+        Assert.assertEquals("L.", authorPart.getText());
+        Assert.assertEquals("normal", authorPart.getCssValue("font-style"));
+
+        WebElement referenceElement = lapsanaCommunnis.getElement().findElement(By.className("reference"));
+        Assert.assertEquals("Sp. Pl.: 811. 1753", referenceElement.findElement((By.className("reference"))).getText());
+
+        PortalPage taxonProfilLapsanaCommunnis = searchResultPage.clickTaxonName(lapsanaCommunnis, GenericPortalPage.class, UUID_L_COMMUNIS);
+        assertEquals(getContext().prepareTitle("Lapsana communis"), taxonProfilLapsanaCommunnis.getTitle());
+    }
+
+    @Test
+    public void testSearchLCommunis_ImageLinks() throws Exception {
+
+        TaxonSearchResultPage searchResultPage = homePage.submitQuery("Lapsana com*");
+
+        assertEquals(getContext().prepareTitle("Search results"), searchResultPage.getTitle());
+
+        TaxonListElement lapsanaCommunnis = searchResultPage.getResultItem(1);
+
+        List<List<GalleryImage>> galleryImageRows = searchResultPage.getGalleryImagesOf(lapsanaCommunnis);
+
+        assertEquals("Expecting one row of images", 1, galleryImageRows.size());
+        assertEquals("Expecting 4 images in row", 4, galleryImageRows.get(0).size());
+
+        GalleryImage firstImage = galleryImageRows.get(0).get(0);
+        assertNull("caption should be off", firstImage.getCaptionText());
+        searchResultPage.clickLink(firstImage.getImageLink(), new VisibilityOfElementLocated(By.id("images")), GenericPortalPage.class);
+    }
+
+}
diff --git a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Crepis_tectorum_Synonymy.java b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Crepis_tectorum_Synonymy.java
deleted file mode 100644
index e47214f4..00000000
--- a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Crepis_tectorum_Synonymy.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// $Id$
-/**
- * Copyright (C) 2009 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-package eu.etaxonomy.dataportal.selenium.tests.cichorieae;
-
-import static org.junit.Assert.assertEquals;
-
-import java.net.MalformedURLException;
-import java.util.UUID;
-
-import org.junit.Test;
-
-import eu.etaxonomy.dataportal.DataPortalContext;
-import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
-import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
-import eu.etaxonomy.dataportal.pages.TaxonSynonymyPage;
-
-/**
- *
- * @author a.kohlbecker
- *
- */
-
-@DataPortalContexts( { DataPortalContext.cichorieae })
-public class Crepis_tectorum_Synonymy extends CdmDataPortalTestBase{
-
-    static UUID crepis_tectorum_Uuid = UUID.fromString("c62dff09-3f04-4f05-9aac-904d51ac1b77");
-
-    @Test
-    public void crepis_oenipontana() throws MalformedURLException {
-        TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), crepis_tectorum_Uuid);
-        assertEquals(getContext().prepareTitle("Crepis tectorum"), p.getTitle());
-        assertEquals("Crepis tectorum L., Sp. Pl.: 807. 1753", p.getAcceptedNameText());
-        assertEquals("≡ Crepis varia Moench, Methodus: 534. 1794, nom. illeg.", p.getHomotypicalGroupSynonymName(2));
-        assertEquals("≡ Crepis stricta Schultz, Prodr. Fl. Starg. Suppl.: 41. 1819 [non Crepis stricta Scop. 1772]", p.getHeterotypicalGroupSynonymName(1, 2));
-        assertEquals("= Crepis lanceolata Kit. [non Crepis lanceolata Sch. Bip. 1854]", p.getHeterotypicalGroupSynonymName(9, 1));
-    }
-
-
-
-}
diff --git a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Crepis_tectorum_SynonymyTest.java b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Crepis_tectorum_SynonymyTest.java
new file mode 100644
index 00000000..bb444644
--- /dev/null
+++ b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Crepis_tectorum_SynonymyTest.java
@@ -0,0 +1,47 @@
+// $Id$
+/**
+ * Copyright (C) 2009 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
+package eu.etaxonomy.dataportal.selenium.tests.cichorieae;
+
+import static org.junit.Assert.assertEquals;
+
+import java.net.MalformedURLException;
+import java.util.UUID;
+
+import org.junit.Test;
+
+import eu.etaxonomy.dataportal.DataPortalContext;
+import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
+import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
+import eu.etaxonomy.dataportal.pages.TaxonSynonymyPage;
+
+/**
+ *
+ * @author a.kohlbecker
+ *
+ */
+
+@DataPortalContexts( { DataPortalContext.cichorieae })
+public class Crepis_tectorum_SynonymyTest extends CdmDataPortalTestBase{
+
+    static UUID crepis_tectorum_Uuid = UUID.fromString("c62dff09-3f04-4f05-9aac-904d51ac1b77");
+
+    @Test
+    public void crepis_oenipontana() throws MalformedURLException {
+        TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), crepis_tectorum_Uuid);
+        assertEquals(getContext().prepareTitle("Crepis tectorum"), p.getTitle());
+        assertEquals("Crepis tectorum L., Sp. Pl.: 807. 1753", p.getAcceptedNameText());
+        assertEquals("≡ Crepis varia Moench, Methodus: 534. 1794, nom. illeg.", p.getHomotypicalGroupSynonymName(2));
+        assertEquals("≡ Crepis stricta Schultz, Prodr. Fl. Starg. Suppl.: 41. 1819 [non Crepis stricta Scop. 1772]", p.getHeterotypicalGroupSynonymName(1, 2));
+        assertEquals("= Crepis lanceolata Kit. [non Crepis lanceolata Sch. Bip. 1854]", p.getHeterotypicalGroupSynonymName(9, 1));
+    }
+
+
+
+}
diff --git a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Scorzonera_SynonymyTest.java b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Scorzonera_SynonymyTest.java
new file mode 100644
index 00000000..f4604bdc
--- /dev/null
+++ b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Scorzonera_SynonymyTest.java
@@ -0,0 +1,70 @@
+// $Id$
+/**
+ * Copyright (C) 2009 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
+package eu.etaxonomy.dataportal.selenium.tests.cichorieae;
+
+import static org.junit.Assert.assertEquals;
+
+import java.net.MalformedURLException;
+import java.util.List;
+import java.util.UUID;
+
+import org.junit.Test;
+
+import eu.etaxonomy.dataportal.DataPortalContext;
+import eu.etaxonomy.dataportal.elements.TypeDesignationElement;
+import eu.etaxonomy.dataportal.elements.TypeDesignationType;
+import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
+import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
+import eu.etaxonomy.dataportal.pages.TaxonSynonymyPage;
+
+/**
+ *
+ * @author a.kohlbecker
+ *
+ */
+
+@DataPortalContexts( { DataPortalContext.cichorieae })
+public class Scorzonera_SynonymyTest extends CdmDataPortalTestBase{
+
+    static UUID scorzonera_Uuid = UUID.fromString("c1e8a3f2-2b65-4aad-ad25-1cf9df92e290");
+
+    @Test
+    public void scorzonera_typeDesignations() throws MalformedURLException {
+        TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), scorzonera_Uuid);
+        assertEquals(getContext().prepareTitle("Scorzonera"), p.getTitle());
+        assertEquals("Scorzonera L., Sp. Pl.: 790. 1753", p.getAcceptedNameText());
+
+
+        // check type designation for accepted taxon
+        List<TypeDesignationElement> typeDesignations = p.getAcceptedNameTypeDesignations();
+        assertEquals("Expecting one Typedesignation", 1, typeDesignations.size());
+        assertEquals(TypeDesignationType.nameTypeDesignation, typeDesignations.get(0).getTypeDesignationType());
+        assertEquals("Lectotype (designated by Green 1929: 1771): Scorzonera humilis L.", typeDesignations.get(0).getText()); // last digit of 1771 is footnote key !!!
+        assertEquals("1. Green, Proposals by British Botanists. 1929", p.getAcceptedNameFootNotes().get(0).getText());
+//        assertNull("The typified name should not have a name description (protologue)", typeDesignations.get(0).getNameDescription()); // FIXME
+
+        assertEquals("= Gelasia Cass. in Bull. Sci. Soc. Philom. Paris 1818: 33. 1818", p.getHeterotypicalGroupSynonymName(1, 1));
+        List<TypeDesignationElement> heterotypicalGroupTypeDesignations = p.getHeterotypicalGroupTypeDesignations(1);
+        assertEquals("Type: Gelasia villosa (Scop.) Cass.", heterotypicalGroupTypeDesignations.get(0).getText());
+        assertEquals(TypeDesignationType.nameTypeDesignation, heterotypicalGroupTypeDesignations.get(0).getTypeDesignationType());
+
+//        test case only available in produciton portal
+//        assertEquals("≡ Scorzonera subg. Lasiospora (Cass.) Peterm., Deutschl. Fl.: 334. 1846-1849", p.getHeterotypicalGroupSynonymName(2, 3));
+//        heterotypicalGroupTypeDesignations = p.getHeterotypicalGroupTypeDesignations(2);
+//        assertEquals("Lectotype (designated by Tzvelev 1989: 452): Lasiospora hirsuta (Gouan) Cass.", heterotypicalGroupTypeDesignations.get(0).getText());
+//        assertEquals(TypeDesignationType.nameTypeDesignation, heterotypicalGroupTypeDesignations.get(0).getTypeDesignationType());
+//        assertEquals("Should have one foot note", 1, p.getHeterotypicalGroupFootNotes(2).size()); // FIXME
+
+
+        // also to some synonymy checks
+        assertEquals("– Scorzonera sect. Euscorzonera DC., Prodr. 7: 117. 1838, nom. inval.", p.getHeterotypicalGroupSynonymName(58, 1));
+        assertEquals("– Scorzonera subsect. Euvierhapperia Lipsch., Fragm. Monogr. Scorzonera 2: 89. 1939, nom. inval.", p.getHeterotypicalGroupSynonymName(59, 1));
+    }
+}
diff --git a/7.x/modules/cdm_dataportal/theme/cdm_dataportal.name.theme b/7.x/modules/cdm_dataportal/theme/cdm_dataportal.name.theme
index b89aa23f..c6385562 100644
--- a/7.x/modules/cdm_dataportal/theme/cdm_dataportal.name.theme
+++ b/7.x/modules/cdm_dataportal/theme/cdm_dataportal.name.theme
@@ -101,6 +101,9 @@ function cdm_add_type_designations($source, $extra) {
 function theme_cdm_typedesignations($variables) {
   $typeDesignations = $variables['typeDesignations'];
 
+  // need to add element to render path since type designations
+  // need other name render template
+  RenderHints::pushToRenderStack('typedesignations');
   $out = '<ul class="typeDesignations">';
   $typeDesignation_footnotes = FALSE;
   $is_lectotype = FALSE;
@@ -206,6 +209,8 @@ function theme_cdm_typedesignations($variables) {
 
   $out .= '</ul>';
 
+  RenderHints::popFromRenderStack();
+
   return $out;
 }
 
