Project

General

Profile

« Previous | Next » 

Revision 2c457ade

Added by Andreas Kohlbecker over 12 years ago

dapted to latest data

View differences:

modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cyprus/Cyprus_OriginalSourceTest.java
22 22
import org.openqa.selenium.WebElement;
23 23

  
24 24
import eu.etaxonomy.dataportal.DataPortalContext;
25
import eu.etaxonomy.dataportal.elements.BaseElement;
26 25
import eu.etaxonomy.dataportal.elements.FeatureBlock;
27
import eu.etaxonomy.dataportal.elements.ImgElement;
28 26
import eu.etaxonomy.dataportal.elements.LinkElement;
29 27
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase;
30 28
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts;
......
64 62
		assertNull("Authorship information should be hidden", p.getAuthorInformationText());
65 63

  
66 64
		List<LinkElement> primaryTabs = p.getPrimaryTabs();
67
		assertEquals("Expecting 2 tabs", 2, primaryTabs.size());
68
		assertEquals("General", primaryTabs.get(0).getText());
69
		assertEquals("Synonymy", primaryTabs.get(1).getText());
65
		int tabIndex = 0;
66
		assertEquals("General", primaryTabs.get(tabIndex++).getText());
67
		assertEquals("Synonymy", primaryTabs.get(tabIndex++).getText());
68
		assertEquals("Images", primaryTabs.get(tabIndex++).getText());
69
		assertEquals("Expecting " + tabIndex + " tabs", tabIndex++, primaryTabs.size());
70 70

  
71 71
		assertEquals("Content", p.getTableOfContentHeader());
72 72
		List<LinkElement> tocLinks = p.getTableOfContentLinks();
73 73
		assertNotNull("Expecting a list of TOC links in the profile page.", tocLinks);
74
		p.testTableOfContentEntry(0, "Status", "status");
75
		p.testTableOfContentEntry(1, "Endemism", "endemism");
76
//		p.testTableOfContentEntry(2, "Red Data Book category", "red_data_book_category");
77
//		p.testTableOfContentEntry(3, "Systematics", "systematics");
78
		p.testTableOfContentEntry(2, "Chromosome Numbers", "chromosome_numbers");
79
		p.testTableOfContentEntry(3, "Distribution", "distribution");
74
		int tocIndex = 0;
75
		p.testTableOfContentEntry(tocIndex++, "Status", "status");
76
		p.testTableOfContentEntry(tocIndex++, "Endemism", "endemism");
77
		p.testTableOfContentEntry(tocIndex++, "Systematics", "systematics");
78
		p.testTableOfContentEntry(tocIndex++, "Chromosome numbers", "chromosome_numbers");
79
		p.testTableOfContentEntry(tocIndex++, "Distribution", "distribution");
80 80

  
81 81
		FeatureBlock featureBlock = p.getFeatureBlockAt(2, "chromosome_numbers", "div", "li"); //FIXME <div><li> bug in portal
82
		assertEquals("Chromosome Numbers\nCistus creticus L.: 2n = 18 (B. Slavík & V. Jarolímová & J. Chrtek, Chromosome counts of some plants from Cyprus in Candollea 48. 1993) (B. Slavík & V. Jarolímová & J. Chrtek, Chromosome counts of some plants from Cyprus. 2 in Acta Univ. Carol., Biol. 46. 2002)", featureBlock.getText());
83
		assertEquals("Chromosome Numbers", featureBlock.getHeader());
82
		assertEquals("Chromosome numbers\nCistus creticus L.: 2n = 18 (B. Slavík & V. Jarolímová & J. Chrtek, Chromosome counts of some plants from Cyprus in Candollea 48. 1993) (B. Slavík & V. Jarolímová & J. Chrtek, Chromosome counts of some plants from Cyprus. 2 in Acta Univ. Carol., Biol. 46. 2002)", featureBlock.getText());
83
		assertEquals("Chromosome numbers", featureBlock.getHeader());
84 84
		assertEquals("expecting no footnote keys", 0, featureBlock.getFootNoteKeys().size());
85 85
		List<WebElement> linksInFeatureBlock = featureBlock.getElement().findElements(By.tagName("a"));
86 86
		assertEquals("Expecting 4 anchor tags in \"Chromosome Numbers\"", 4, linksInFeatureBlock.size());

Also available in: Unified diff