Updates to the Selenium WebDriver tests.
This commit is contained in:
parent
d19d0f27c8
commit
6217134901
3 changed files with 329 additions and 1 deletions
|
@ -6,6 +6,8 @@ import org.junit.runner.RunWith;
|
||||||
import org.junit.runners.Suite.SuiteClasses;
|
import org.junit.runners.Suite.SuiteClasses;
|
||||||
import org.vivoweb.vivo.selenium.DriverFactory;
|
import org.vivoweb.vivo.selenium.DriverFactory;
|
||||||
import org.vivoweb.vivo.selenium.VIVOSuite;
|
import org.vivoweb.vivo.selenium.VIVOSuite;
|
||||||
|
import org.vivoweb.vivo.selenium.tests.CheckBrowseOptions;
|
||||||
|
import org.vivoweb.vivo.selenium.tests.CheckIndexView;
|
||||||
import org.vivoweb.vivo.selenium.tests.CheckPublicView;
|
import org.vivoweb.vivo.selenium.tests.CheckPublicView;
|
||||||
import org.vivoweb.vivo.selenium.tests.CreateActivity;
|
import org.vivoweb.vivo.selenium.tests.CreateActivity;
|
||||||
import org.vivoweb.vivo.selenium.tests.CreateCourses;
|
import org.vivoweb.vivo.selenium.tests.CreateCourses;
|
||||||
|
@ -38,7 +40,8 @@ import org.vivoweb.vivo.selenium.tests.VerifyAllThingsSearchable;
|
||||||
RebuildSearchIndex.class,
|
RebuildSearchIndex.class,
|
||||||
VerifyAllThingsSearchable.class,
|
VerifyAllThingsSearchable.class,
|
||||||
CheckPublicView.class,
|
CheckPublicView.class,
|
||||||
// CheckIndexView.class,
|
CheckIndexView.class,
|
||||||
|
CheckBrowseOptions.class,
|
||||||
// TestMenuManagement.class,
|
// TestMenuManagement.class,
|
||||||
DeleteActivities.class,
|
DeleteActivities.class,
|
||||||
DeleteCourses.class,
|
DeleteCourses.class,
|
||||||
|
|
|
@ -0,0 +1,223 @@
|
||||||
|
package org.vivoweb.vivo.selenium.tests;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.openqa.selenium.By;
|
||||||
|
|
||||||
|
public class CheckBrowseOptions extends AbstractVIVOSeleniumTest {
|
||||||
|
@Test
|
||||||
|
public void checkBrowseOptions() {
|
||||||
|
deleteAllVisibleCookies();
|
||||||
|
|
||||||
|
open("/");
|
||||||
|
assertTitle("VIVO");
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Books"));
|
||||||
|
verifyElementPresent(By.linkText("Grants"));
|
||||||
|
|
||||||
|
verifyTextPresent(
|
||||||
|
"1 Books ",
|
||||||
|
"3 Grants "
|
||||||
|
);
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("View all ..."));
|
||||||
|
assertTitle("Research");
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Article (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Award or Honor (2)"));
|
||||||
|
verifyElementPresent(By.linkText("Blog Posting (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Book (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Concept (7)"));
|
||||||
|
verifyElementPresent(By.linkText("Database (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Grant (3)"));
|
||||||
|
verifyElementPresent(By.linkText("Human Study (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Patent (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Proceedings (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Webpage (1)"));
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("Home"));
|
||||||
|
assertTitle("VIVO");
|
||||||
|
|
||||||
|
verifyTextPresent(
|
||||||
|
"No faculty members found.",
|
||||||
|
"No academic departments found."
|
||||||
|
);
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("People"));
|
||||||
|
assertTitle("People");
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Person (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Person, Polly"));
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("Organizations"));
|
||||||
|
assertTitle("Organizations");
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("College (2)"));
|
||||||
|
verifyElementPresent(By.linkText("Company (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Consortium (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Laboratory (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Library (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Organization (7)"));
|
||||||
|
verifyElementPresent(By.linkText("University (1)"));
|
||||||
|
|
||||||
|
clickAndWait(By.xpath("//li[@id='college']/a"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Primate College of New York"));
|
||||||
|
verifyElementPresent(By.linkText("Primate College of America"));
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("Company (1)"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Primates-r-us"));
|
||||||
|
|
||||||
|
clickAndWait(By.xpath("//li[@id='consortium']/a"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Primate Colleges of the World"));
|
||||||
|
|
||||||
|
clickAndWait(By.xpath("//li[@id='laboratory']/a"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Primate Research Laboratory"));
|
||||||
|
|
||||||
|
clickAndWait(By.xpath("//li[@id='library']/a"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Primate History Library"));
|
||||||
|
|
||||||
|
clickAndWait(By.xpath("//li[@id='organization']/a"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Primate College of America"));
|
||||||
|
verifyElementPresent(By.linkText("Primate College of New York"));
|
||||||
|
verifyElementPresent(By.linkText("Primate Colleges of the World"));
|
||||||
|
verifyElementPresent(By.linkText("Primate History Library"));
|
||||||
|
verifyElementPresent(By.linkText("Primate Research Laboratory"));
|
||||||
|
verifyElementPresent(By.linkText("Primate University of America"));
|
||||||
|
verifyElementPresent(By.linkText("Primates-r-us"));
|
||||||
|
|
||||||
|
clickAndWait(By.xpath("//li[@id='organization']/a"));
|
||||||
|
clickAndWait(By.linkText("P"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Primate College of America"));
|
||||||
|
verifyElementPresent(By.linkText("Primate College of New York"));
|
||||||
|
verifyElementPresent(By.linkText("Primate Colleges of the World"));
|
||||||
|
verifyElementPresent(By.linkText("Primate History Library"));
|
||||||
|
verifyElementPresent(By.linkText("Primate Research Laboratory"));
|
||||||
|
verifyElementPresent(By.linkText("Primate University of America"));
|
||||||
|
verifyElementPresent(By.linkText("Primates-r-us"));
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("University (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Primate University of America"));
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("Research"));
|
||||||
|
assertTitle("Research");
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Article (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Award or Honor (2)"));
|
||||||
|
verifyElementPresent(By.linkText("Blog Posting (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Book (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Concept (7)"));
|
||||||
|
verifyElementPresent(By.linkText("Database (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Grant (3)"));
|
||||||
|
verifyElementPresent(By.linkText("Human Study (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Patent (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Proceedings (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Webpage (1)"));
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("Article (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Primate Happenings"));
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("Award or Honor (2)"));
|
||||||
|
verifyElementPresent(By.linkText("Best Primate College"));
|
||||||
|
verifyElementPresent(By.linkText("Primate Student of the Year"));
|
||||||
|
|
||||||
|
clickAndWait(By.xpath("//li[@id='book']/a"));
|
||||||
|
verifyElementPresent(By.linkText("PHC Proceedings"));
|
||||||
|
|
||||||
|
clickAndWait(By.xpath("//li[@id='concept']/a"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Animal Health"));
|
||||||
|
verifyElementPresent(By.linkText("Ape Health"));
|
||||||
|
verifyElementPresent(By.linkText("Best Primate College"));
|
||||||
|
verifyElementPresent(By.linkText("Elderly Care"));
|
||||||
|
verifyElementPresent(By.linkText("Primate Diet"));
|
||||||
|
verifyElementPresent(By.linkText("Primate Health"));
|
||||||
|
verifyElementPresent(By.linkText("Primate Student of the Year"));
|
||||||
|
|
||||||
|
clickAndWait(By.xpath("//li[@id='concept']/a"));
|
||||||
|
clickAndWait(By.linkText("P"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Primate Diet"));
|
||||||
|
verifyElementPresent(By.linkText("Primate Health"));
|
||||||
|
verifyElementPresent(By.linkText("Primate Student of the Year"));
|
||||||
|
|
||||||
|
clickAndWait(By.xpath("//li[@id='database']/a"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Primate Info"));
|
||||||
|
|
||||||
|
clickAndWait(By.xpath("//li[@id='grant']/a"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Primate Elderly Care"));
|
||||||
|
verifyElementPresent(By.linkText("Primate Habitat Research Grant"));
|
||||||
|
verifyElementPresent(By.linkText("Primate Survival Planning Grant"));
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("Human Study (1)"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Human and Ape Brain Comparison"));
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("Patent (1)"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("USA222333444555"));
|
||||||
|
|
||||||
|
clickAndWait(By.xpath("//li[@id='proceedings']/a"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("PHC Proceedings"));
|
||||||
|
|
||||||
|
clickAndWait(By.xpath("//li[@id='webpage']/a"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("http://primatehealthintro.cornell.edu"));
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("Events"));
|
||||||
|
assertTitle("Events");
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Conference (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Event (7)"));
|
||||||
|
verifyElementPresent(By.linkText("Invited Talk (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Performance (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Presentation (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Seminar Series (1)"));
|
||||||
|
verifyElementPresent(By.linkText("Workshop (1)"));
|
||||||
|
|
||||||
|
clickAndWait(By.xpath("//li[@id='conference']/a"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Primate Health Conference"));
|
||||||
|
|
||||||
|
clickAndWait(By.xpath("//li[@id='event']/a"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Introduction to Primate Health"));
|
||||||
|
verifyElementPresent(By.linkText("Introduction to Primates"));
|
||||||
|
verifyElementPresent(By.linkText("New Primate Students"));
|
||||||
|
verifyElementPresent(By.linkText("Primate Health and Fitness"));
|
||||||
|
verifyElementPresent(By.linkText("Primate Health Check"));
|
||||||
|
verifyElementPresent(By.linkText("Primate Health Conference"));
|
||||||
|
verifyElementPresent(By.linkText("Primates in the Wild"));
|
||||||
|
|
||||||
|
clickAndWait(By.xpath("//li[@id='invitedTalk']/a"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Primate Health and Fitness"));
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("Performance (1)"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Primates in the Wild"));
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("Presentation (1)"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Primate Health and Fitness"));
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("Seminar Series (1)"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Primate Health Talks"));
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("Workshop (1)"));
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("New Primate Students"));
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("Home"));
|
||||||
|
assertTitle("VIVO");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,102 @@
|
||||||
|
package org.vivoweb.vivo.selenium.tests;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.openqa.selenium.By;
|
||||||
|
|
||||||
|
public class CheckIndexView extends AbstractVIVOSeleniumTest {
|
||||||
|
@Test
|
||||||
|
public void checkIndexView() {
|
||||||
|
deleteAllVisibleCookies();
|
||||||
|
|
||||||
|
open("/");
|
||||||
|
assertTitle("VIVO");
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("Index"));
|
||||||
|
|
||||||
|
verifyTextPresent(
|
||||||
|
"people",
|
||||||
|
"activities",
|
||||||
|
"courses",
|
||||||
|
"events",
|
||||||
|
"organizations",
|
||||||
|
"equipment",
|
||||||
|
"research",
|
||||||
|
"locations",
|
||||||
|
"Person (1)",
|
||||||
|
"Project (1)",
|
||||||
|
"Research Project (1)",
|
||||||
|
"Service (2)",
|
||||||
|
"Transport Service (1)",
|
||||||
|
"Course (2)",
|
||||||
|
"Conference (1)",
|
||||||
|
"Event (7)",
|
||||||
|
"Invited Talk (1)",
|
||||||
|
"Performance (1)",
|
||||||
|
"Presentation (1)",
|
||||||
|
"Seminar Series (1)",
|
||||||
|
"Workshop (1)",
|
||||||
|
"College (2)",
|
||||||
|
"Company (1)",
|
||||||
|
"Consortium (1)",
|
||||||
|
"Laboratory (1)",
|
||||||
|
"Library (1)",
|
||||||
|
"Organization (7)",
|
||||||
|
"University (1)",
|
||||||
|
"Equipment (2)",
|
||||||
|
"Article (1)",
|
||||||
|
"Award or Honor (2)",
|
||||||
|
"Blog Posting (1)",
|
||||||
|
"Book (1)",
|
||||||
|
"Concept (7)",
|
||||||
|
"Database (1)",
|
||||||
|
"Grant (3)",
|
||||||
|
"Human Study (1)",
|
||||||
|
"Patent (1)",
|
||||||
|
"Proceedings (1)",
|
||||||
|
"Webpage (1)",
|
||||||
|
"Building (2)",
|
||||||
|
"Continent (7)",
|
||||||
|
"Facility (5)",
|
||||||
|
"Room (1)"
|
||||||
|
);
|
||||||
|
|
||||||
|
verifyElementPresent(By.linkText("Person"));
|
||||||
|
verifyElementPresent(By.linkText("Project"));
|
||||||
|
verifyElementPresent(By.linkText("Research Project"));
|
||||||
|
verifyElementPresent(By.linkText("Service"));
|
||||||
|
verifyElementPresent(By.linkText("Transport Service"));
|
||||||
|
verifyElementPresent(By.linkText("Course"));
|
||||||
|
verifyElementPresent(By.linkText("Conference"));
|
||||||
|
verifyElementPresent(By.linkText("Event"));
|
||||||
|
verifyElementPresent(By.linkText("Invited Talk"));
|
||||||
|
verifyElementPresent(By.linkText("Performance"));
|
||||||
|
verifyElementPresent(By.linkText("Presentation"));
|
||||||
|
verifyElementPresent(By.linkText("Seminar Series"));
|
||||||
|
verifyElementPresent(By.linkText("Workshop"));
|
||||||
|
verifyElementPresent(By.linkText("College"));
|
||||||
|
verifyElementPresent(By.linkText("Company"));
|
||||||
|
verifyElementPresent(By.linkText("Consortium"));
|
||||||
|
verifyElementPresent(By.linkText("Laboratory"));
|
||||||
|
verifyElementPresent(By.linkText("Library"));
|
||||||
|
verifyElementPresent(By.linkText("Organization"));
|
||||||
|
verifyElementPresent(By.linkText("University"));
|
||||||
|
verifyElementPresent(By.linkText("Equipment"));
|
||||||
|
verifyElementPresent(By.linkText("Article"));
|
||||||
|
verifyElementPresent(By.linkText("Award or Honor"));
|
||||||
|
verifyElementPresent(By.linkText("Blog Posting"));
|
||||||
|
verifyElementPresent(By.linkText("Book"));
|
||||||
|
verifyElementPresent(By.linkText("Concept"));
|
||||||
|
verifyElementPresent(By.linkText("Database"));
|
||||||
|
verifyElementPresent(By.linkText("Grant"));
|
||||||
|
verifyElementPresent(By.linkText("Human Study"));
|
||||||
|
verifyElementPresent(By.linkText("Patent"));
|
||||||
|
verifyElementPresent(By.linkText("Proceedings"));
|
||||||
|
verifyElementPresent(By.linkText("Webpage"));
|
||||||
|
verifyElementPresent(By.linkText("Building"));
|
||||||
|
verifyElementPresent(By.linkText("Facility"));
|
||||||
|
verifyElementPresent(By.linkText("Room"));
|
||||||
|
|
||||||
|
clickAndWait(By.linkText("Home"));
|
||||||
|
assertTitle("VIVO");
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue