Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Michael Conlon 2016-03-05 17:34:53 -05:00
commit 129f8b3e26
63 changed files with 5392 additions and 11 deletions

View file

@ -361,6 +361,7 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator
+ " ?subject core:relatedBy ?authorshipURI .\n"
+ " ?authorshipURI a core:Authorship .\n"
+ " ?authorshipURI core:relates ?authorURI .\n"
+ " ?authorshipURI core:rank ?rank .\n"
+ " ?authorURI a ?type .\n"
+ " ?authorURI rdfs:label ?authorName .\n"
+ " ?authorURI vcard:hasName ?vName .\n"

View file

@ -1,4 +1,4 @@
<Context crossContext="true" override="true">
<Context> <!-- useHttpOnly="false" -->
<Environment
type="java.lang.String"
name="vitro/home"

View file

@ -719,6 +719,7 @@
<td>id=object</td>
<td>${KEY_DOWN}</td>
</tr>
<!-- Reached here -->
<tr>
<td>click</td>
<td>id=ui-active-menuitem</td>

41
selenium/pom.xml Normal file
View file

@ -0,0 +1,41 @@
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.vivoweb</groupId>
<artifactId>vivo-selenium</artifactId>
<version>1.9.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>VIVO Selenium Tests</name>
<build>
<plugins>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.48.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View file

@ -0,0 +1,66 @@
package org.vivoweb.vivo.selenium;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
public final class DriverFactory {
private static WebDriver driver = null;
private static Object closeToken = null;
static {
Runtime.getRuntime().addShutdownHook(new ShutdownHook());
}
public static WebDriver getDriver() {
if (driver == null) {
driver = new FirefoxDriver();
}
return driver;
}
public static boolean close() {
if (closeToken == null && driver != null) {
driver.quit();
driver = null;
return true;
}
return false;
}
public static boolean close(Object token) {
if (closeToken == token || (closeToken != null && closeToken.equals(token))) {
if (driver != null) {
driver.quit();
driver = null;
closeToken = null;
return true;
}
}
return false;
}
public static boolean setCloseToken(Object token) {
if (closeToken == null) {
closeToken = token;
return true;
}
return false;
}
private static class ShutdownHook extends Thread {
ShutdownHook() { }
@Override
public void run() {
if (driver != null) {
driver.quit();
driver = null;
}
}
}
}

View file

@ -0,0 +1,27 @@
package org.vivoweb.vivo.selenium;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
public final class SeleniumUtils {
private static String baseUrl = "http://localhost:8080/vivo";
public static void setBaseUrl(String baseUrl) {
SeleniumUtils.baseUrl = baseUrl;
}
public static String makeUrl(String urlPart) {
if (urlPart.startsWith("/")) {
return baseUrl + urlPart;
} else {
return baseUrl + "/" + urlPart;
}
}
public static void navigate(WebDriver driver, String urlPart) {
driver.navigate().to(makeUrl(urlPart));
}
}

View file

@ -0,0 +1,170 @@
package org.vivoweb.vivo.selenium;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
public final class VIVOAppTester extends WebAppTester {
private static String loggedInAs = null;
private VIVOAppTester() { }
public static void vivoAutoCompleteSelect(By by, String text, Keys... keys) {
WebElement element = driver().findElement(by);
int count = 0;
WebElement autoComplete = null;
while (autoComplete == null) {
element.sendKeys(text);
int findElementCount = 0;
while (autoComplete == null && findElementCount < 5) {
findElementCount++;
try {
Thread.sleep(250);
autoComplete = driver().findElement(By.className("ui-autocomplete"));
} catch (InterruptedException e) {
throw new RuntimeException(e);
} catch (NoSuchElementException nse) {
System.out.println("Failure number: " + count);
}
if (autoComplete != null && !autoComplete.isDisplayed()) {
autoComplete = null;
}
}
if (autoComplete == null) {
element.clear();
if (count > 3) {
throw new NoSuchElementException("Auto complete is not visible");
}
try {
Thread.sleep(500);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
count++;
}
}
if (keys != null && keys.length > 0) {
for (Keys key : keys) {
element.sendKeys(key);
}
} else {
// If no key presses specified, use default action to select the first entry in the autocomplete
element.sendKeys(Keys.ARROW_DOWN);
}
try {
Thread.sleep(250);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
WebElement selected = driver().findElement(By.id("ui-active-menuitem"));
if (selected != null) {
selected.click();
}
}
public static void vivoDeleteIndividual(String category, String individual) {
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText(category));
assertTitle(category);
WebElement individualLink = null;
int pageCount = 1;
do {
try {
individualLink = driver().findElement(By.linkText(individual));
} catch (NoSuchElementException nse) {
}
if (individualLink == null) {
pageCount++;
try {
clickAndWait(By.linkText(Integer.toString(pageCount, 10)));
} catch (NoSuchElementException nse) {
break;
}
}
} while (individualLink == null);
clickAndWait(By.linkText(individual));
assertTitle(individual);
vivoDeleteIndividual();
}
public static void vivoDeleteIndividual() {
clickAndWait(By.linkText("Edit this individual"));
assertTitle("Individual Control Panel");
clickAndWait(By.xpath("//input[@value='Edit This Individual']"));
assertTitle("Individual Editing Form");
clickAndWait(By.name("_delete"));
assertConfirmation("Are you SURE you want to delete this individual? If in doubt, CANCEL.");
assertTitle("VIVO Site Administration");
}
public static void vivoLogIn(String email, String password) {
if (loggedInAs != null) {
vivoLogOut();
}
clickAndWait(By.linkText("Log in")); // clickAndWait,link=Log in
assertTitle("Log in to VIVO"); // aseertTitle,Log in to VIVO
type(By.id("loginName"), email); // type,id=loginName,testAdmin@cornell.edu
type(By.id("loginPassword"), password); // type,id=loginPassword,Password
clickAndWait(By.name("loginForm")); // clickAndWait,name=loginForm
assertTitle("VIVO"); // assertTitle,VIVO
loggedInAs = email;
}
public static void vivoLogOut() {
if (loggedInAs != null) {
Actions actions = new Actions(driver());
actions.moveToElement(driver().findElement(By.id("user-menu"))).perform();
driver().findElement(By.linkText("Log out")).click();
loggedInAs = null;
}
}
public static void startTests() {
Class token = getCallingClass(VIVOAppTester.class);
if (token != null) {
if (DriverFactory.setCloseToken(token)) {
deleteAllVisibleCookies();
}
}
open("/");
assertTitle("VIVO");
}
public static void endTests() {
Class token = getCallingClass(VIVOAppTester.class);
if (token != null) {
DriverFactory.close(token);
} else {
DriverFactory.close();
}
}
}

View file

@ -0,0 +1,40 @@
package org.vivoweb.vivo.selenium;
import org.junit.runner.Runner;
import org.junit.runner.notification.RunNotifier;
import org.junit.runners.Suite;
import org.junit.runners.model.InitializationError;
import org.junit.runners.model.RunnerBuilder;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import java.util.List;
public class VIVOSuite extends Suite {
public VIVOSuite(Class<?> klass, RunnerBuilder builder) throws InitializationError {
super(klass, builder);
}
public VIVOSuite(RunnerBuilder builder, Class<?>[] classes) throws InitializationError {
super(builder, classes);
}
protected VIVOSuite(Class<?> klass, Class<?>[] suiteClasses) throws InitializationError {
super(klass, suiteClasses);
}
protected VIVOSuite(RunnerBuilder builder, Class<?> klass, Class<?>[] suiteClasses) throws InitializationError {
super(builder, klass, suiteClasses);
}
protected VIVOSuite(Class<?> klass, List<Runner> runners) throws InitializationError {
super(klass, runners);
}
@Override
protected void runChild(Runner runner, RunNotifier notifier) {
// Set Driver factory, can run multiple times
super.runChild(runner, notifier);
}
}

View file

@ -0,0 +1,152 @@
package org.vivoweb.vivo.selenium;
import com.sun.tools.internal.xjc.Driver;
import org.apache.commons.lang3.StringUtils;
import org.junit.Assert;
import org.openqa.selenium.Alert;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.Select;
import org.openqa.selenium.support.ui.WebDriverWait;
public class WebAppTester {
private static WebAppTester webAppTester = new WebAppTester();
public static void assertConfirmation(String text) {
WebDriverWait wait = new WebDriverWait(driver(), 2);
wait.until(ExpectedConditions.alertIsPresent());
Alert alert = driver().switchTo().alert();
if (!StringUtils.isEmpty(text)) {
Assert.assertTrue(text.equalsIgnoreCase(alert.getText()));
}
alert.accept();
driver().switchTo().defaultContent();
}
public static void assertTitle(String title) {
Assert.assertEquals(title, driver().getTitle());
}
public static void clickAndWait(By by) {
driver().findElement(by).click();
}
public static void deleteAllVisibleCookies() {
driver().manage().deleteAllCookies();
}
public static void open(String urlPart) {
SeleniumUtils.navigate(driver(), urlPart);
}
public static void pause(long timeout) {
try {
Thread.sleep(timeout);
} catch (InterruptedException e) {
}
}
public static void selectByLabel(By by, String label) {
Select select = new Select(driver().findElement(by));
select.selectByVisibleText(label);
}
public static void type(By by, String text) {
WebElement element = driver().findElement(by);
element.sendKeys(text);
}
public static void typeTinyMCE(String text) {
// <td> tinyMCE.activeEditor.setContent('The Primate College of America is a privately-funded college for the study of primates.')</td>
driver().switchTo().frame("literal_ifr");
WebElement element = driver().findElement(By.cssSelector("body"));
element.click();
element.sendKeys(text);
driver().switchTo().defaultContent();
}
public static void verifyElementPresent(By by) {
Assert.assertNotNull(driver().findElement(by));
}
public static void verifyTextPresent(String... text) {
if (text != null) {
String bodyText = driver().findElement(By.xpath("//body")).getText();
for (String str : text) {
Assert.assertTrue(bodyText.contains(str));
}
}
// Assert.assertNotNull(driver().findElement(xpathForTextPresent(text)));
}
public static boolean waitForElementPresent(By by) {
return waitForElementPresent(by, 30);
}
public static boolean waitForElementPresent(By by, int timeout) {
WebDriverWait wait = new WebDriverWait(driver(), timeout);
return wait.until(ExpectedConditions.presenceOfElementLocated(by)) != null;
}
public static boolean waitForTextPresent(String text) {
return waitForTextPresent(text, 30);
}
public static boolean waitForTextPresent(String text, int timeout) {
WebDriverWait wait = new WebDriverWait(driver(), timeout);
return wait.until(ExpectedConditions.presenceOfElementLocated(xpathForTextPresent(text))) != null;
}
protected static By xpathForTextPresent(String text) {
return By.xpath("//*[text()[contains(.,'" + text + "')]]");
}
protected static WebDriver driver() {
return DriverFactory.getDriver();
}
public static void startTests() {
Class token = getCallingClass(WebAppTester.class);
if (token != null) {
DriverFactory.setCloseToken(token);
}
}
public static void endTests() {
Class token = getCallingClass(WebAppTester.class);
if (token != null) {
DriverFactory.setCloseToken(token);
}
}
protected static Class getCallingClass(Class thisClass) {
boolean foundThisClass = false;
StackTraceElement[] elements = Thread.currentThread().getStackTrace();
int idx = 0;
while (idx < elements.length) {
if (foundThisClass) {
if (!thisClass.getCanonicalName().equals(elements[idx].getClassName())) {
try {
return Class.forName(elements[idx].getClassName());
} catch (ClassNotFoundException e) {
}
}
} else {
}
if (thisClass.getCanonicalName().equals(elements[idx].getClassName())) {
foundThisClass = true;
}
idx++;
}
return null;
}
}

View file

@ -0,0 +1,66 @@
package org.vivoweb.vivo.selenium.suites;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
import org.vivoweb.vivo.selenium.VIVOAppTester;
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.CreateActivity;
import org.vivoweb.vivo.selenium.tests.CreateCourses;
import org.vivoweb.vivo.selenium.tests.CreateEquipment;
import org.vivoweb.vivo.selenium.tests.CreateEvent;
import org.vivoweb.vivo.selenium.tests.CreateLocation;
import org.vivoweb.vivo.selenium.tests.CreateOrganization;
import org.vivoweb.vivo.selenium.tests.CreateTopic;
import org.vivoweb.vivo.selenium.tests.DeleteActivities;
import org.vivoweb.vivo.selenium.tests.DeleteCourses;
import org.vivoweb.vivo.selenium.tests.DeleteEquipment;
import org.vivoweb.vivo.selenium.tests.DeleteEvents;
import org.vivoweb.vivo.selenium.tests.DeleteLocations;
import org.vivoweb.vivo.selenium.tests.DeleteOrganization;
import org.vivoweb.vivo.selenium.tests.DeleteResearch;
import org.vivoweb.vivo.selenium.tests.RebuildSearchIndex;
import org.vivoweb.vivo.selenium.tests.TestMenuManagement;
import org.vivoweb.vivo.selenium.tests.VerifyAllThingsSearchable;
@RunWith(VIVOSuite.class)
@SuiteClasses(
{
RebuildSearchIndex.class,
CreateOrganization.class,
CreateCourses.class,
CreateActivity.class,
CreateEvent.class,
CreateTopic.class,
CreateEquipment.class,
CreateLocation.class,
RebuildSearchIndex.class,
VerifyAllThingsSearchable.class,
CheckPublicView.class,
CheckIndexView.class,
CheckBrowseOptions.class,
TestMenuManagement.class,
DeleteActivities.class,
DeleteCourses.class,
DeleteLocations.class,
DeleteEvents.class,
DeleteResearch.class,
DeleteEquipment.class,
DeleteOrganization.class
}
)
public class AddNonPersonThings {
@BeforeClass
public static void setup() {
VIVOAppTester.startTests();
}
@AfterClass
public static void shutdown() {
VIVOAppTester.endTests();
}
}

View file

@ -0,0 +1,263 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.By;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class CheckBrowseOptions {
@BeforeClass
public static void setUp() {
startTests();
vivoLogOut();
}
@AfterClass
public static void tearDown() {
endTests();
}
@Test
public void checkBrowseOptions() {
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"));
pause(500);
verifyElementPresent(By.linkText("Primate College of New York"));
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Company (1)"));
pause(500);
verifyElementPresent(By.linkText("Primates-r-us"));
clickAndWait(By.xpath("//li[@id='consortium']/a"));
pause(500);
verifyElementPresent(By.linkText("Primate Colleges of the World"));
clickAndWait(By.xpath("//li[@id='laboratory']/a"));
pause(500);
verifyElementPresent(By.linkText("Primate Research Laboratory"));
clickAndWait(By.xpath("//li[@id='library']/a"));
pause(500);
verifyElementPresent(By.linkText("Primate History Library"));
clickAndWait(By.xpath("//li[@id='organization']/a"));
pause(500);
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"));
pause(500);
clickAndWait(By.linkText("P"));
pause(500);
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)"));
pause(500);
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)"));
pause(500);
verifyElementPresent(By.linkText("Primate Happenings"));
clickAndWait(By.linkText("Award or Honor (2)"));
pause(500);
verifyElementPresent(By.linkText("Best Primate College"));
verifyElementPresent(By.linkText("Primate Student of the Year"));
clickAndWait(By.xpath("//li[@id='book']/a"));
pause(500);
verifyElementPresent(By.linkText("PHC Proceedings"));
clickAndWait(By.xpath("//li[@id='concept']/a"));
pause(500);
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"));
pause(500);
clickAndWait(By.linkText("P"));
pause(500);
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"));
pause(500);
verifyElementPresent(By.linkText("Primate Info"));
clickAndWait(By.xpath("//li[@id='grant']/a"));
pause(500);
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)"));
pause(500);
verifyElementPresent(By.linkText("Human and Ape Brain Comparison"));
clickAndWait(By.linkText("Patent (1)"));
pause(500);
verifyElementPresent(By.linkText("USA222333444555"));
clickAndWait(By.xpath("//li[@id='proceedings']/a"));
pause(500);
verifyElementPresent(By.linkText("PHC Proceedings"));
clickAndWait(By.xpath("//li[@id='webpage']/a"));
pause(500);
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"));
pause(500);
verifyElementPresent(By.linkText("Primate Health Conference"));
clickAndWait(By.xpath("//li[@id='event']/a"));
pause(500);
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"));
pause(500);
verifyElementPresent(By.linkText("Primate Health and Fitness"));
clickAndWait(By.linkText("Performance (1)"));
pause(500);
verifyElementPresent(By.linkText("Primates in the Wild"));
clickAndWait(By.linkText("Presentation (1)"));
pause(500);
verifyElementPresent(By.linkText("Primate Health and Fitness"));
clickAndWait(By.linkText("Seminar Series (1)"));
pause(500);
verifyElementPresent(By.linkText("Primate Health Talks"));
clickAndWait(By.linkText("Workshop (1)"));
pause(500);
verifyElementPresent(By.linkText("New Primate Students"));
clickAndWait(By.linkText("Home"));
assertTitle("VIVO");
}
}

View file

@ -0,0 +1,114 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.By;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class CheckIndexView {
@BeforeClass
public static void setUp() {
startTests();
vivoLogOut();
}
@AfterClass
public static void tearDown() {
endTests();
}
@Test
public void checkIndexView() {
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");
}
}

View file

@ -0,0 +1,470 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.By;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class CheckPublicView {
@BeforeClass
public static void setUp() {
startTests();
vivoLogOut();
}
@AfterClass
public static void tearDown() {
endTests();
}
@Test
public void checkPublicView() {
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Project"));
assertTitle("Project");
clickAndWait(By.linkText("Human and Ape Brain Comparison"));
assertTitle("Human and Ape Brain Comparison");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Research Project"));
assertTitle("Research Project");
clickAndWait(By.linkText("Human and Ape Brain Comparison"));
assertTitle("Human and Ape Brain Comparison");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Service"));
assertTitle("Service");
clickAndWait(By.linkText("Primate Heart Health"));
assertTitle("Primate Heart Health");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Service"));
assertTitle("Service");
clickAndWait(By.linkText("Gorilla Moving Company"));
assertTitle("Gorilla Moving Company");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Transport Service"));
assertTitle("Transport Service");
clickAndWait(By.linkText("Gorilla Moving Company"));
assertTitle("Gorilla Moving Company");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Course"));
assertTitle("Course");
clickAndWait(By.linkText("Introduction to Primate Health"));
assertTitle("Introduction to Primate Health");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Course"));
assertTitle("Course");
clickAndWait(By.linkText("Introduction to Primates"));
assertTitle("Introduction to Primates");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Conference"));
assertTitle("Conference");
clickAndWait(By.linkText("Primate Health Conference"));
assertTitle("Primate Health Conference");
verifyElementPresent(By.linkText("Primate Health and Fitness"));
verifyElementPresent(By.linkText("Animal Health"));
verifyElementPresent(By.linkText("PHC Proceedings"));
verifyTextPresent(
"has subject area",
"Animal Health",
"description"
);
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Invited Talk"));
assertTitle("Invited Talk");
clickAndWait(By.linkText("Primate Health and Fitness"));
assertTitle("Primate Health and Fitness");
verifyElementPresent(By.linkText("Introduction to Primate Health"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Performance"));
assertTitle("Performance");
clickAndWait(By.linkText("Primates in the Wild"));
assertTitle("Primates in the Wild");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Presentation"));
assertTitle("Presentation");
clickAndWait(By.linkText("Primate Health and Fitness"));
assertTitle("Primate Health and Fitness");
verifyElementPresent(By.linkText("Introduction to Primate Health"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Seminar Series"));
assertTitle("Seminar Series");
clickAndWait(By.linkText("Primate Health Talks"));
assertTitle("Primate Health Talks");
verifyElementPresent(By.linkText("Introduction to Primate Health"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Workshop"));
assertTitle("Workshop");
clickAndWait(By.linkText("New Primate Students"));
assertTitle("New Primate Students");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("College"));
assertTitle("College");
clickAndWait(By.linkText("Primate College of America"));
assertTitle("Primate College of America");
verifyElementPresent(By.linkText("B.S. Bachelor of Science"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("College"));
assertTitle("College");
clickAndWait(By.linkText("Primate College of New York"));
assertTitle("Primate College of New York");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Company"));
assertTitle("Company");
clickAndWait(By.linkText("Primates-r-us"));
assertTitle("Primates-r-us");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Consortium"));
assertTitle("Consortium");
clickAndWait(By.linkText("Primate Colleges of the World"));
assertTitle("Primate Colleges of the World");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Laboratory"));
assertTitle("Laboratory");
clickAndWait(By.linkText("Primate Research Laboratory"));
assertTitle("Primate Research Laboratory");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Library"));
assertTitle("Library");
clickAndWait(By.linkText("Primate History Library"));
assertTitle("Primate History Library");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("University"));
assertTitle("University");
clickAndWait(By.linkText("Primate University of America"));
assertTitle("Primate University of America");
verifyElementPresent(By.linkText("Jane Memorial Building"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Organization"));
assertTitle("Organization");
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("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Equipment"));
assertTitle("Equipment");
clickAndWait(By.linkText("Portable Primate Habitat"));
assertTitle("Portable Primate Habitat");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Equipment"));
assertTitle("Equipment");
clickAndWait(By.linkText("Primate Feeder"));
assertTitle("Primate Feeder");
verifyElementPresent(By.linkText("Primate Research Laboratory"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Article"));
assertTitle("Article");
clickAndWait(By.linkText("Primate Happenings"));
assertTitle("Primate Happenings");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Award or Honor"));
assertTitle("Award or Honor");
clickAndWait(By.linkText("Best Primate College"));
assertTitle("Best Primate College");
verifyElementPresent(By.linkText("Best Primate College (Primate College of America)"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Award or Honor"));
assertTitle("Award or Honor");
clickAndWait(By.linkText("Primate Student of the Year"));
assertTitle("Primate Student of the Year");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Blog Posting"));
assertTitle("Blog Posting");
clickAndWait(By.linkText("Primate Happenings"));
assertTitle("Primate Happenings");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Book"));
assertTitle("Book");
verifyElementPresent(By.linkText("PHC Proceedings"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Concept"));
assertTitle("Concept");
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.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Database"));
assertTitle("Database");
clickAndWait(By.linkText("Primate Info"));
assertTitle("Primate Info");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Grant"));
assertTitle("Grant");
clickAndWait(By.linkText("Primate Elderly Care"));
assertTitle("Primate Elderly Care");
verifyElementPresent(By.linkText("Elderly Care"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Grant"));
assertTitle("Grant");
clickAndWait(By.linkText("Primate Habitat Research Grant"));
assertTitle("Primate Habitat Research Grant");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Grant"));
assertTitle("Grant");
clickAndWait(By.linkText("Primate Survival Planning Grant"));
assertTitle("Primate Survival Planning Grant");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Human Study"));
assertTitle("Human Study");
clickAndWait(By.linkText("Human and Ape Brain Comparison"));
assertTitle("Human and Ape Brain Comparison");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Patent"));
assertTitle("Patent");
clickAndWait(By.linkText("USA222333444555"));
assertTitle("USA222333444555");
verifyElementPresent(By.linkText("Primate College of America"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Proceedings"));
assertTitle("Proceedings");
clickAndWait(By.linkText("PHC Proceedings"));
assertTitle("PHC Proceedings");
verifyElementPresent(By.linkText("Primate Health Conference"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Webpage"));
assertTitle("Webpage");
clickAndWait(By.linkText("http://primatehealthintro.cornell.edu"));
assertTitle("http://primatehealthintro.cornell.edu");
verifyElementPresent(By.linkText("Introduction to Primate Health"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Building"));
assertTitle("Building");
clickAndWait(By.linkText("Jane Memorial Building"));
assertTitle("Jane Memorial Building");
verifyElementPresent(By.linkText("Portable Primate Habitat"));
clickAndWait(By.linkText("Index"));
assertTitle("Index of Contents");
clickAndWait(By.linkText("Room"));
assertTitle("Room");
clickAndWait(By.linkText("Lab Admin Office"));
assertTitle("Lab Admin Office");
verifyElementPresent(By.linkText("Jane Memorial Building"));
clickAndWait(By.linkText("Home"));
assertTitle("VIVO");
}
}

View file

@ -0,0 +1,220 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class CreateActivity {
@BeforeClass
public static void setUp() {
startTests();
vivoLogIn("testAdmin@cornell.edu", "Password");
}
@AfterClass
public static void tearDown() {
vivoLogOut();
endTests();
}
@Test
public void createActivity() {
clickAndWait(By.linkText("Site Admin"));
assertTitle("VIVO Site Administration");
verifyTextPresent("Data Input");
selectByLabel(By.id("VClassURI"), "Grant (vivo)");
clickAndWait(By.xpath("//input[@value='Add individual of this class']"));
assertTitle("Edit");
verifyTextPresent("Create a new Grant");
clickAndWait(By.linkText("Cancel"));
assertTitle("VIVO Site Administration");
selectByLabel(By.id("VClassURI"), "Grant (vivo)");
clickAndWait(By.xpath("//input[@value='Add individual of this class']"));
assertTitle("Edit");
verifyTextPresent("Create a new Grant");
clickAndWait(By.id("submit"));
assertTitle("Edit");
verifyTextPresent("Please enter a value in the Name field.");
type(By.id("label"), "Primate Elderly Care");
clickAndWait(By.id("submit"));
assertTitle("Primate Elderly Care");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[@groupname='viewAll']"));
assertTitle("Primate Elderly Care");
clickAndWait(By.cssSelector("a.add-relates > img.add-individual"));
assertTitle("Edit");
vivoAutoCompleteSelect(By.id("organization"), "primate colleges of the wor", Keys.ARROW_DOWN);
clickAndWait(By.cssSelector("input.submit"));
assertTitle("Primate Elderly Care");
clickAndWait(By.cssSelector("a.add-assignedBy > img.add-individual"));
assertTitle("Edit");
verifyTextPresent("If you don't find the appropriate entry on the selection list above:");
selectByLabel(By.id("objectVar"), "Primate Research Laboratory (Laboratory)");
clickAndWait(By.id("submit"));
assertTitle("Primate Elderly Care");
clickAndWait(By.xpath("//h3[@id='abstract']/a/img"));
assertTitle("Edit");
verifyTextPresent("Add new entry for: abstract");
typeTinyMCE("Purpose of grant is to determine the appropriate environment, physical activity, and diet for primates as they age.");
clickAndWait(By.id("submit"));
assertTitle("Primate Elderly Care");
clickAndWait(By.xpath("//h3[@id='grantSubcontractedThrough']/a"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Primate Colleges of the World (Consortium)");
clickAndWait(By.id("submit"));
assertTitle("Primate Elderly Care");
clickAndWait(By.xpath("//h3[@id='totalAwardAmount']/a/img"));
assertTitle("Edit");
verifyTextPresent("Add new entry for: total award amount");
typeTinyMCE("$1,234,567");
clickAndWait(By.id("submit"));
assertTitle("Primate Elderly Care");
clickAndWait(By.xpath("//h3[@id='grantDirectCosts']/a/img"));
assertTitle("Edit");
typeTinyMCE("$999,999");
clickAndWait(By.id("submit"));
assertTitle("Primate Elderly Care");
clickAndWait(By.xpath("//h3[@id='sponsorAwardId']/a/img"));
assertTitle("Edit");
typeTinyMCE("1234-5678");
clickAndWait(By.id("submit"));
assertTitle("Primate Elderly Care");
clickAndWait(By.xpath("//h3[@id='geographicFocus']/a/img"));
assertTitle("Edit");
vivoAutoCompleteSelect(By.id("object"), "Afri", Keys.ARROW_DOWN);
clickAndWait(By.id("submit"));
assertTitle("Primate Elderly Care");
clickAndWait(By.xpath("//h3[@id='dateTimeInterval']/a/img"));
assertTitle("Edit");
type(By.id("startField-year"), "2010");
type(By.id("startField-month"), "9");
type(By.id("startField-day"), "1");
type(By.id("endField-year"), "2012");
type(By.id("endField-month"), "8");
type(By.id("endField-day"), "31");
clickAndWait(By.id("submit"));
assertTitle("Primate Elderly Care");
clickAndWait(By.xpath("//h3[@id='localAwardId']/a/img"));
assertTitle("Edit");
verifyTextPresent("Add new entry for: local award ID");
typeTinyMCE("P999-1234");
clickAndWait(By.id("submit"));
assertTitle("Primate Elderly Care");
clickAndWait(By.cssSelector("a.add-fundingVehicleFor > img.add-individual"));
assertTitle("Edit");
vivoAutoCompleteSelect(By.id("object"), "primate health chec", Keys.ARROW_DOWN);
clickAndWait(By.id("submit"));
assertTitle("Primate Elderly Care");
clickAndWait(By.xpath("//h3[@id='hasSubjectArea']/a/img"));
assertTitle("Edit");
verifyTextPresent("Manage Concepts");
clickAndWait(By.id("showAddFormButton"));
clickAndWait(By.linkText("Select or create a VIVO-defined concept. "));
assertTitle("Edit");
type(By.id("relatedIndLabel"), "Elderly Care");
clickAndWait(By.id("submit"));
assertTitle("Edit");
clickAndWait(By.linkText("Return to Profile Page"));
assertTitle("Primate Elderly Care");
clickAndWait(By.cssSelector("a.add-BFO_0000051 > img.add-individual"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Primate Habitat Research Grant");
clickAndWait(By.id("submit"));
assertTitle("Primate Elderly Care");
clickAndWait(By.cssSelector("a.add-BFO_0000050 > img.add-individual"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Primate Survival Planning Grant");
clickAndWait(By.id("submit"));
assertTitle("Primate Elderly Care");
clickAndWait(By.cssSelector("a.add-supportedInformationResource"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Primate Info (Database)");
clickAndWait(By.id("submit"));
assertTitle("Primate Elderly Care");
verifyTextPresent(
"Primate Elderly Care",
"Grant",
"Purpose of grant is to determine the appropriate environment, physical activity, and diet for primates as they age.",
"September 1, 2010 - August 31, 2012",
"$1,234,567",
"$999,999",
"1234-5678",
"P999-1234"
);
verifyElementPresent(By.linkText("Elderly Care"));
verifyElementPresent(By.linkText("Primate Research Laboratory"));
verifyElementPresent(By.linkText("Primate Colleges of the World"));
verifyElementPresent(By.linkText("Africa"));
verifyElementPresent(By.linkText("Primate Habitat Research Grant"));
verifyElementPresent(By.linkText("Primate Survival Planning Grant"));
verifyElementPresent(By.linkText("Primate Info"));
}
}

View file

@ -0,0 +1,246 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class CreateCourses {
@BeforeClass
public static void setUp() {
startTests();
vivoLogIn("testAdmin@cornell.edu", "Password");
}
@AfterClass
public static void tearDown() {
vivoLogOut();
endTests();
}
@Test
public void createCourses() {
clickAndWait(By.linkText("Site Admin"));
assertTitle("VIVO Site Administration");
verifyTextPresent("Data Input");
selectByLabel(By.id("VClassURI"), "Course (vivo)");
clickAndWait(By.id("submit"));
assertTitle("Edit");
verifyTextPresent("Create a new Course");
clickAndWait(By.linkText("Cancel"));
assertTitle("VIVO Site Administration");
selectByLabel(By.id("VClassURI"), "Course (vivo)");
clickAndWait(By.id("submit"));
assertTitle("Edit");
verifyTextPresent("Create a new Course");
clickAndWait(By.id("submit"));
assertTitle("Edit");
verifyTextPresent("Please enter a value in the Name field.");
type(By.id("label"), "Introduction to Primate Health");
clickAndWait(By.id("submit"));
assertTitle("Introduction to Primate Health");
clickAndWait(By.xpath("//h3[@id='description']/a/img"));
assertTitle("Edit");
verifyTextPresent("Add new entry for: description");
typeTinyMCE("Learn the basics about the general health of primates.");
clickAndWait(By.id("submit"));
assertTitle("Introduction to Primate Health");
clickAndWait(By.cssSelector("a.add-offeredBy > img.add-individual"));
assertTitle("Edit");
verifyTextPresent("If you don't find the appropriate entry on the selection list above:");
clickAndWait(By.id("submit"));
assertTitle("Introduction to Primate Health");
clickAndWait(By.xpath("//h3[@id='prerequisiteFor']/a/img"));
assertTitle("Edit");
verifyTextPresent("If you don't find the appropriate entry on the selection list above:");
clickAndWait(By.id("submit"));
assertTitle("Introduction to Primate Health");
clickAndWait(By.xpath("//h3[@id='geographicFocus']/a/img"));
assertTitle("Edit");
vivoAutoCompleteSelect(By.id("object"), "Afri", Keys.ARROW_DOWN);
clickAndWait(By.id("submit"));
assertTitle("Introduction to Primate Health");
clickAndWait(By.xpath("//h3[@id='dateTimeInterval']/a"));
assertTitle("Edit");
verifyTextPresent("Create date time value for Introduction to Primate Health");
type(By.id("startField-year"), "2007");
type(By.id("startField-month"), "9");
type(By.id("startField-day"), "1");
type(By.id("endField-year"), "2007");
type(By.id("endField-month"), "12");
type(By.id("endField-day"), "15");
clickAndWait(By.id("submit"));
assertTitle("Introduction to Primate Health");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[@groupname='viewAll']"));
clickAndWait(By.cssSelector("a.add-BFO_0000051 > img.add-individual"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Primate Health Check (Event)");
clickAndWait(By.id("submit"));
assertTitle("Introduction to Primate Health");
clickAndWait(By.xpath("//h3[@id='hasSubjectArea']/a/img"));
assertTitle("Edit");
clickAndWait(By.id("showAddFormButton"));
clickAndWait(By.linkText("Select or create a VIVO-defined concept. "));
assertTitle("Edit");
type(By.id("relatedIndLabel"), "Animal Health");
clickAndWait(By.id("submit"));
assertTitle("Edit");
clickAndWait(By.linkText("Return to Profile Page"));
assertTitle("Introduction to Primate Health");
clickAndWait(By.cssSelector("a.add-BFO_0000050 > img.add-individual"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Primate Health and Fitness (Invited Talk)");
clickAndWait(By.id("submit"));
assertTitle("Introduction to Primate Health");
clickAndWait(By.xpath("(//img[@alt='add'])[7]"));
assertTitle("Edit");
selectByLabel(By.id("typeOfNew"), "Seminar Series (vivo)");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "Primate Health Talks");
clickAndWait(By.id("submit"));
assertTitle("Introduction to Primate Health");
// Test publication tab entry
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[@groupname='publications']"));
clickAndWait(By.xpath("//h3[@id='presents']/a/img"));
assertTitle("Edit");
selectByLabel(By.id("typeOfNew"), "Webpage (bibo)");
verifyTextPresent("If you don't find the appropriate entry on the selection list above:");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
verifyTextPresent("Create \"related documents\" entry for Introduction to Primate Health");
type(By.id("label"), "http://primatehealthintro.cornell.edu");
clickAndWait(By.id("submit"));
assertTitle("Introduction to Primate Health");
clickAndWait(By.cssSelector("a.add-RO_0002234 > img.add-individual"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Primate Happenings (Blog Posting)");
clickAndWait(By.id("submit"));
assertTitle("Introduction to Primate Health");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[@groupname='contact']"));
clickAndWait(By.xpath("//h3[@id='contactInformation']/a/img"));
assertTitle("Edit");
verifyTextPresent("Add new entry for: contact information");
typeTinyMCE("ME Tarzan at metarzan@primates.edu or 555-555-5553");
clickAndWait(By.id("submit"));
assertTitle("Introduction to Primate Health");
clickAndWait(By.xpath("(//h3[@id='RO_0001025']/a)[2]"));
assertTitle("Edit");
vivoAutoCompleteSelect(By.id("object"), "lib", Keys.ARROW_DOWN);
clickAndWait(By.id("submit"));
assertTitle("Introduction to Primate Health");
clickAndWait(By.cssSelector("a.add-RO_0001025 > img.add-individual"));
assertTitle("Edit");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "Primate Memorial Building");
clickAndWait(By.id("submit"));
assertTitle("Introduction to Primate Health");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[@groupname='viewAll']"));
clickAndWait(By.xpath("//h3[@id='courseCredits']/a/img"));
assertTitle("Edit");
typeTinyMCE("9");
clickAndWait(By.id("submit"));
assertTitle("Introduction to Primate Health");
clickAndWait(By.cssSelector("a.add-hasPrerequisite > img.add-individual"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Introduction to Primates");
clickAndWait(By.id("submit"));
assertTitle("Introduction to Primate Health");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[@groupname='viewAll']"));
verifyTextPresent(
"Introduction to Primate Health",
"Course",
"Learn the basics about the general health of primates.",
"Primate College of America",
"September 1, 2007 - December 15, 2007",
"ME Tarzan at metarzan@primates.edu or 555-555-5553",
"9");
verifyElementPresent(By.linkText("Primate Health and Fitness"));
verifyElementPresent(By.linkText("Primate Health Check"));
verifyElementPresent(By.linkText("Primate Health Talks"));
verifyElementPresent(By.linkText("Animal Health"));
verifyElementPresent(By.linkText("Introduction to Primate Health"));
verifyElementPresent(By.linkText("Africa"));
verifyElementPresent(By.linkText("Primate Happenings"));
verifyElementPresent(By.linkText("http://primatehealthintro.cornell.edu"));
verifyElementPresent(By.linkText("Primate Memorial Building"));
verifyElementPresent(By.linkText("Liberia"));
verifyElementPresent(By.linkText("Introduction to Primates"));
}
}

View file

@ -0,0 +1,140 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class CreateEquipment {
@BeforeClass
public static void setUp() {
startTests();
vivoLogIn("testAdmin@cornell.edu", "Password");
}
@AfterClass
public static void tearDown() {
vivoLogOut();
endTests();
}
@Test
public void createEquipment() {
clickAndWait(By.linkText("Site Admin"));
assertTitle("VIVO Site Administration");
verifyTextPresent("Data Input");
selectByLabel(By.id("VClassURI"), "Equipment (vivo)");
clickAndWait(By.xpath("//input[@value='Add individual of this class']"));
assertTitle("Edit");
verifyTextPresent("Create a new Equipment");
clickAndWait(By.linkText("Cancel"));
assertTitle("VIVO Site Administration");
verifyTextPresent("Data Input");
selectByLabel(By.id("VClassURI"), "Equipment (vivo)");
clickAndWait(By.xpath("//input[@value='Add individual of this class']"));
assertTitle("Edit");
verifyTextPresent("Create a new Equipment");
clickAndWait(By.id("submit"));
assertTitle("Edit");
verifyTextPresent("Please enter a value in the Name field.");
type(By.id("label"), "Primate Feeder");
clickAndWait(By.id("submit"));
assertTitle("Primate Feeder");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[8]"));
clickAndWait(By.xpath("//h3[@id='equipmentFor']/a/img"));
assertTitle("Edit");
verifyTextPresent("If you don't find the appropriate entry on the selection list above:");
selectByLabel(By.id("objectVar"), "Primate Research Laboratory (Laboratory)");
clickAndWait(By.id("submit"));
assertTitle("Primate Feeder");
clickAndWait(By.cssSelector("a.add-RO_0001025 > img.add-individual"));
assertTitle("Edit");
verifyTextPresent("If you don't find the appropriate entry on the selection list above:");
selectByLabel(By.id("typeOfNew"), "Facility (vivo)");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
verifyTextPresent("Create \"housed in facility\" entry for Primate Feeder");
type(By.id("label"), "Primate Research Lab Room 123");
clickAndWait(By.id("submit"));
assertTitle("Primate Feeder");
clickAndWait(By.xpath("//h3[@id='freetextKeyword']/a/img"));
assertTitle("Edit");
verifyTextPresent("Add new entry for: keywords");
typeTinyMCE("Animal Diet");
clickAndWait(By.id("submit"));
clickAndWait(By.linkText("Primate Research Lab Room 123"));
assertTitle("Primate Research Lab Room 123");
clickAndWait(By.xpath("(//img[@alt='add'])[3]"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Primate Heart Health (Service)");
clickAndWait(By.id("submit"));
assertTitle("Primate Research Lab Room 123");
clickAndWait(By.xpath("(//img[@alt='add'])[4]"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Primate University of America (University)");
clickAndWait(By.id("submit"));
assertTitle("Primate Research Lab Room 123");
clickAndWait(By.xpath("(//img[@alt='add'])[5]"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Primate Health Check (Event)");
clickAndWait(By.id("submit"));
assertTitle("Primate Research Lab Room 123");
clickAndWait(By.cssSelector("a.add-BFO_0000050 > img.add-individual"));
assertTitle("Edit");
vivoAutoCompleteSelect(By.id("object"), "United State", Keys.ARROW_DOWN);
clickAndWait(By.id("submit"));
assertTitle("Primate Research Lab Room 123");
verifyElementPresent(By.linkText("Primate Feeder"));
verifyElementPresent(By.linkText("Primate Heart Health"));
verifyElementPresent(By.linkText("Primate University of America"));
verifyElementPresent(By.linkText("Primate Health Check"));
verifyElementPresent(By.linkText("United States of America"));
}
}

View file

@ -0,0 +1,219 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class CreateEvent {
@BeforeClass
public static void setUp() {
startTests();
vivoLogIn("testAdmin@cornell.edu", "Password");
}
@AfterClass
public static void tearDown() {
vivoLogOut();
endTests();
}
@Test
public void createEvent() {
clickAndWait(By.linkText("Site Admin"));
assertTitle("VIVO Site Administration");
verifyTextPresent("Data Input");
selectByLabel(By.id("VClassURI"), "Conference (bibo)");
clickAndWait(By.xpath("//input[@value='Add individual of this class']"));
assertTitle("Edit");
verifyTextPresent("Create a new Conference");
clickAndWait(By.linkText("Cancel"));
assertTitle("VIVO Site Administration");
selectByLabel(By.id("VClassURI"), "Conference (bibo)");
clickAndWait(By.xpath("//input[@value='Add individual of this class']"));
assertTitle("Edit");
verifyTextPresent("Create a new Conference");
clickAndWait(By.id("submit"));
assertTitle("Edit");
verifyTextPresent("Please enter a value in the Name field.");
type(By.id("label"), "Primate Health Conference");
clickAndWait(By.id("submit"));
assertTitle("Primate Health Conference");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[8]"));
clickAndWait(By.xpath("//h3[@id='description']/a/img"));
assertTitle("Edit");
verifyTextPresent("Add new entry for: description");
typeTinyMCE("First annual conference for those interested in the general health of primates.");
clickAndWait(By.id("submit"));
assertTitle("Primate Health Conference");
clickAndWait(By.xpath("//h3[@id='hasProceedings']/a/img"));
assertTitle("Edit");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "PHC Proceedings");
clickAndWait(By.id("submit"));
assertTitle("Primate Health Conference");
clickAndWait(By.xpath("//h3[@id='contactInformation']/a/img"));
assertTitle("Edit");
verifyTextPresent("Add new entry for: contact information");
typeTinyMCE("info@primateconf.org");
clickAndWait(By.id("submit"));
assertTitle("Primate Health Conference");
clickAndWait(By.xpath("//h3[@id='geographicFocus']/a/img"));
assertTitle("Edit");
verifyTextPresent("If you don't find the appropriate entry on the selection list above:");
vivoAutoCompleteSelect(By.id("object"), "Kenya", Keys.ARROW_DOWN);
clickAndWait(By.id("submit"));
assertTitle("Primate Health Conference");
clickAndWait(By.xpath("(//h3[@id='RO_0001025']/a)[2]"));
assertTitle("Edit");
verifyTextPresent("If you don't find the appropriate entry on the selection list above:");
verifyTextPresent("Geographic Location Name");
vivoAutoCompleteSelect(By.id("object"), "Cong", Keys.ARROW_DOWN);
clickAndWait(By.id("submit"));
assertTitle("Primate Health Conference");
clickAndWait(By.cssSelector("a.add-RO_0001025 > img.add-individual"));
assertTitle("Edit");
verifyTextPresent("If you don't find the appropriate entry on the selection list above:");
selectByLabel(By.id("typeOfNew"), "Facility (vivo)");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "State Fair Park");
clickAndWait(By.id("submit"));
assertTitle("Primate Health Conference");
clickAndWait(By.xpath("//h3[@id='dateTimeInterval']/a/img"));
assertTitle("Edit");
type(By.id("startField-year"), "2011");
type(By.id("startField-month"), "1");
type(By.id("startField-day"), "5");
type(By.id("endField-year"), "2011");
type(By.id("endField-month"), "1");
type(By.id("endField-day"), "9");
clickAndWait(By.id("submit"));
assertTitle("Primate Health Conference");
clickAndWait(By.xpath("//h3[@id='presents']/a/img"));
assertTitle("Edit");
clickAndWait(By.id("submit"));
assertTitle("Primate Health Conference");
clickAndWait(By.cssSelector("a.add-BFO_0000051 > img.add-individual"));
assertTitle("Edit");
verifyTextPresent("If you don't find the appropriate entry on the selection list above:");
selectByLabel(By.id("objectVar"), "Primate Health Check (Event)");
clickAndWait(By.id("submit"));
assertTitle("Primate Health Conference");
clickAndWait(By.cssSelector("a.add-hasSubjectArea > img.add-individual"));
assertTitle("Edit");
clickAndWait(By.id("showAddFormButton"));
clickAndWait(By.linkText("Select or create a VIVO-defined concept. "));
assertTitle("Edit");
vivoAutoCompleteSelect(By.id("relatedIndLabel"), "Anim", Keys.ARROW_DOWN);
clickAndWait(By.id("submit"));
assertTitle("Edit");
clickAndWait(By.linkText("Return to Profile Page"));
assertTitle("Primate Health Conference");
clickAndWait(By.xpath("//h3[@id='abbreviation']/a/img"));
assertTitle("Edit");
typeTinyMCE("PrimHConf");
clickAndWait(By.id("submit"));
assertTitle("Primate Health Conference");
clickAndWait(By.cssSelector("a.add-BFO_0000050 > img.add-individual"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Primate Health and Fitness (Invited Talk)");
clickAndWait(By.id("submit"));
assertTitle("Primate Health Conference");
clickAndWait(By.xpath("(//img[@alt='add'])[6]"));
assertTitle("Edit");
clickAndWait(By.id("submit"));
assertTitle("Primate Health Conference");
clickAndWait(By.cssSelector("a.add-RO_0002234 > img.add-individual"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Primate Happenings (Blog Posting)");
clickAndWait(By.id("submit"));
assertTitle("Primate Health Conference");
verifyTextPresent(
"Primate Health Conference",
"Conference",
"First annual conference for those interested in the general health of primates.",
"PrimHConf",
"January 5, 2011 - January 9, 2011",
"info@primateconf.org"
);
verifyElementPresent(By.linkText("Primate Health and Fitness"));
verifyElementPresent(By.linkText("Primate Health Check"));
verifyElementPresent(By.linkText("Primate Health Talks"));
verifyElementPresent(By.linkText("Animal Health"));
verifyElementPresent(By.linkText("PHC Proceedings"));
verifyElementPresent(By.linkText("Kenya"));
verifyElementPresent(By.linkText("Primate Happenings"));
verifyElementPresent(By.linkText("http://primatehealthintro.cornell.edu"));
verifyElementPresent(By.linkText("State Fair Park"));
verifyElementPresent(By.linkText("Congo"));
}
}

View file

@ -0,0 +1,127 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class CreateLocation {
@BeforeClass
public static void setUp() {
startTests();
vivoLogIn("testAdmin@cornell.edu", "Password");
}
@AfterClass
public static void tearDown() {
vivoLogOut();
endTests();
}
@Test
public void createLocation() {
clickAndWait(By.linkText("Site Admin"));
assertTitle("VIVO Site Administration");
verifyTextPresent("Data Input");
selectByLabel(By.id("VClassURI"), "Building (vivo)");
clickAndWait(By.xpath("//input[@value='Add individual of this class']"));
assertTitle("Edit");
verifyTextPresent("Create a new Building");
clickAndWait(By.linkText("Cancel"));
assertTitle("VIVO Site Administration");
selectByLabel(By.id("VClassURI"), "Building (vivo)");
clickAndWait(By.xpath("//input[@value='Add individual of this class']"));
assertTitle("Edit");
verifyTextPresent("Create a new Building");
clickAndWait(By.id("submit"));
assertTitle("Edit");
verifyTextPresent("Please enter a value in the Name field.");
type(By.id("label"), "Jane Memorial Building");
clickAndWait(By.id("submit"));
assertTitle("Jane Memorial Building");
clickAndWait(By.cssSelector("a.add-BFO_0000051 > img.add-individual"));
assertTitle("Edit");
verifyTextPresent("There are no entries in the system from which to select.");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
verifyTextPresent("Create \"rooms\" entry for Jane Memorial Building");
type(By.id("label"), "Lab Admin Office");
clickAndWait(By.id("submit"));
assertTitle("Jane Memorial Building");
clickAndWait(By.cssSelector("a.add-BFO_0000050 > img.add-individual"));
assertTitle("Edit");
verifyTextPresent("If you don't find the appropriate entry on the selection list above:");
selectByLabel(By.id("typeOfNew"), "Geographic Location (vivo)");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "Primate Quad");
clickAndWait(By.id("submit"));
assertTitle("Jane Memorial Building");
clickAndWait(By.cssSelector("a.add-RO_0001015 > img.add-individual"));
assertTitle("Edit");
verifyTextPresent("If you don't find the appropriate entry on the selection list above:");
clickAndWait(By.id("submit"));
assertTitle("Jane Memorial Building");
clickAndWait(By.xpath("(//img[@alt='add'])[3]"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Primate Heart Health (Service)");
clickAndWait(By.id("submit"));
assertTitle("Jane Memorial Building");
clickAndWait(By.xpath("(//h3[@id='RO_0001015']/a)[3]"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Primate University of America (University)");
clickAndWait(By.id("submit"));
assertTitle("Jane Memorial Building");
clickAndWait(By.xpath("(//img[@alt='add'])[5]"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Primate Health Check (Event)");
clickAndWait(By.id("submit"));
assertTitle("Jane Memorial Building");
verifyElementPresent(By.linkText("Portable Primate Habitat"));
verifyElementPresent(By.linkText("Primate Heart Health"));
verifyElementPresent(By.linkText("Primate University of America"));
verifyElementPresent(By.linkText("Primate Health Check"));
verifyElementPresent(By.linkText("Lab Admin Office"));
verifyElementPresent(By.linkText("Primate Quad"));
}
}

View file

@ -0,0 +1,579 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class CreateOrganization {
@BeforeClass
public static void setUp() {
startTests();
vivoLogIn("testAdmin@cornell.edu", "Password");
}
@AfterClass
public static void tearDown() {
vivoLogOut();
endTests();
}
@Test
public void createOrganization() {
clickAndWait(By.linkText("Site Admin"));
assertTitle("VIVO Site Administration");
verifyTextPresent("Data Input");
selectByLabel(By.id("VClassURI"), "College (vivo)");
clickAndWait(By.xpath("//input[@value='Add individual of this class']"));
assertTitle("Edit");
verifyTextPresent("Create a new College");
verifyTextPresent("Name");
clickAndWait(By.linkText("Cancel"));
assertTitle("VIVO Site Administration");
selectByLabel(By.id("VClassURI"), "College (vivo)");
clickAndWait(By.xpath("//input[@value='Add individual of this class']"));
assertTitle("Edit");
verifyTextPresent("Create a new College");
verifyTextPresent("Name");
clickAndWait(By.id("submit"));
assertTitle("Edit");
verifyTextPresent("Please enter a value in the Name field.");
type(By.id("label"), "Primate College of America");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("//h2[@id='overview']/a/img"));
assertTitle("Edit");
typeTinyMCE("The Primate College of America is a privately-funded college for the study of primates.");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.cssSelector("a.add-offers > img.add-individual"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "B.S. Bachelor of Science (Academic Degree)");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[12]"));
clickAndWait(By.cssSelector("a.add-hasPredecessorOrganization > img.add-individual"));
assertTitle("Edit");
selectByLabel(By.id("typeOfNew"), "College (vivo)");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "Primate College of New York");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[8]"));
clickAndWait(By.cssSelector("a.add-assigns > img.add-individual"));
assertTitle("Edit");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "Primate Habitat Research Grant");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.cssSelector("li.nonSelectedGroupTab.clickable"));
clickAndWait(By.cssSelector("a.add-sponsors > img.add-individual"));
assertTitle("Edit");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "Primate Student of the Year");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.cssSelector("a.add-relatedBy > img.add-individual"));
assertTitle("Edit");
type(By.id("award"), "Best Primate College");
clickAndWait(By.xpath("//input[@value='Create Entry']"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[14]"));
clickAndWait(By.cssSelector("a.add-hasEquipment > img.add-individual"));
assertTitle("Edit");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "Portable Primate Habitat");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[8]"));
clickAndWait(By.cssSelector("a.add-subcontractsGrant > img.add-individual"));
assertTitle("Edit");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "Primate Survival Planning Grant");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[4]"));
clickAndWait(By.cssSelector("a.add-BFO_0000051 > img.add-individual"));
assertTitle("Edit");
selectByLabel(By.id("typeOfNew"), "Laboratory (vivo)");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "Primate Research Laboratory");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.cssSelector("a.add-BFO_0000051 > img.add-individual"));
assertTitle("Edit");
selectByLabel(By.id("typeOfNew"), "Library (vivo)");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "Primate History Library");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.cssSelector("#relatedBy-Position > a.add-relatedBy > img.add-individual"));
assertTitle("Edit");
type(By.id("positionTitle"), "Dr.");
selectByLabel(By.id("positionType"), "Faculty Administrative Position");
type(By.id("person"), "Person");
type(By.id("firstName"), "Polly");
type(By.id("startField-year"), "1999");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.cssSelector("a.add-RO_0000053 > img.add-individual"));
assertTitle("Edit");
type(By.id("typeSelector"), "Company");
type(By.id("activity"), "Primates-r-us");
type(By.id("roleLabel"), "Founder");
type(By.id("startField-year"), "2010");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.cssSelector("a.add-affiliatedOrganization > img.add-individual"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Primates-r-us (Company)");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("(//img[@alt='add'])[13]"));
assertTitle("Edit");
selectByLabel(By.id("typeSelector"), "Consortium");
type(By.id("activity"), "Primate Colleges of the World");
type(By.id("roleLabel"), "Member");
type(By.id("startField-year"), "2009");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.cssSelector("a.add-hasCollaborator > img.add-individual"));
assertTitle("Edit");
vivoAutoCompleteSelect(By.id("object"), "Primate His", Keys.ARROW_DOWN);
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("(//img[@alt='add'])[14]"));
assertTitle("Edit");
type(By.id("typeSelector"), "Service");
type(By.id("activity"), "Primate Heart Health");
type(By.id("roleLabel"), "Founder");
type(By.id("startField-year"), "2010");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[6]"));
clickAndWait(By.cssSelector("a.add-publisherOf > img.add-individual"));
assertTitle("Edit");
// type(By.id("typeOfNew"), "Database (vivo)");
selectByLabel(By.id("typeOfNew"), "Database (vivo)");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "Primate Info");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.cssSelector("#publicationsGroup > article.property > #RO_0000053 > a.add-RO_0000053 > img.add-individual"));
assertTitle("Edit");
type(By.id("typeSelector"), "Invited Talk");
type(By.id("presentation"), "Primate Health and Fitness");
type(By.id("roleLabel"), "Organizer");
type(By.id("startField-year"), "2008");
clickAndWait(By.cssSelector("input.submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[10]"));
clickAndWait(By.cssSelector("#serviceGroup > article.property > #RO_0000053 > a.add-RO_0000053 > img.add-individual"));
assertTitle("Edit");
type(By.id("typeSelector"), "Event");
type(By.id("activity"), "Primate Health Check");
type(By.id("roleLabel"), "Sponsor");
type(By.id("startField-year"), "2008");
type(By.id("endField-year"), "2010");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[12]"));
clickAndWait(By.cssSelector("a.add-RO_0001025 > img.add-individual"));
assertTitle("Edit");
vivoAutoCompleteSelect(By.id("object"), "northern Afr", Keys.ARROW_DOWN);
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("(//img[@alt='add'])[34]"));
assertTitle("Edit");
type(By.id("emailAddress"), "info@primates.edu");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.cssSelector("article.property > #ARG_2000028 > a.add-ARG_2000028 > img.add-individual"));
assertTitle("Edit");
type(By.id("telephoneNumber"), "555-555-5555");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("(//h3[@id='ARG_2000028']/a)[2]"));
assertTitle("Edit");
type(By.id("telephoneNumber"), "555-555-5554");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("(//img[@alt='add'])[35]"));
assertTitle("Edit");
type(By.id("streetAddressOne"), "1234 Northern African Nation");
type(By.id("city"), "Morocco City");
type(By.id("postalCode"), "1234567890");
type(By.id("countryEditMode"), "Morocco");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.cssSelector("li.nonSelectedGroupTab.clickable"));
clickAndWait(By.cssSelector("a.add-dateTimeInterval > img.add-individual"));
assertTitle("Edit");
type(By.id("startField-year"), "1959");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("//h3[@id='abbreviation']/a/img"));
assertTitle("Edit");
typeTinyMCE("PCoA");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[8]"));
clickAndWait(By.xpath("//h3[@id='freetextKeyword']/a/img"));
assertTitle("Edit");
typeTinyMCE("Gorillas");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[14]"));
clickAndWait(By.xpath("(//img[@alt='add'])[14]"));
assertTitle("Edit");
type(By.id("typeSelector"), "Workshop");
type(By.id("activity"), "New Primate Students ");
type(By.id("startField-year"), "2003");
type(By.id("endField-year"), "2006");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("(//img[@alt='add'])[15]"));
assertTitle("Edit");
type(By.id("typeSelector"), "Performance");
type(By.id("activity"), "Primates in the Wild");
type(By.id("startField-year"), "1997");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[6]"));
clickAndWait(By.cssSelector("a.add-featuredIn > img.add-individual"));
assertTitle("Edit");
selectByLabel(By.id("typeOfNew"), "Blog Posting (vivo)");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "Primate Happenings");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.cssSelector("a.add-assigneeFor > img.add-individual"));
assertTitle("Edit");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "USA222333444555");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.cssSelector("a.add-translatorOf > img.add-individual"));
assertTitle("Edit");
selectByLabel(By.id("objectVar"), "Primate Happenings (Blog Posting)");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[8]"));
clickAndWait(By.cssSelector("#researchGroup > article.property > #RO_0000053 > a.add-RO_0000053 > img.add-individual"));
assertTitle("Edit");
vivoAutoCompleteSelect(By.id("grant"), "primate hab", Keys.ARROW_DOWN);
clickAndWait(By.cssSelector("input.submit"));
assertTitle("Primate College of America");
clickAndWait(By.cssSelector("a.add-ERO_0001520 > img.add-individual"));
assertTitle("Edit");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "Human and Ape Brain Comparison");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[10]"));
clickAndWait(By.cssSelector("a.add-ERO_0000037 > img.add-individual"));
assertTitle("Edit");
selectByLabel(By.id("typeOfNew"), "Transport Service (obo)");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "Gorilla Moving Company");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.cssSelector("#serviceGroup > article.property > #offers > a.add-offers > img.add-individual"));
assertTitle("Edit");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "Introduction to Primates");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[12]"));
clickAndWait(By.cssSelector("a.add-hasSuccessorOrganization > img.add-individual"));
assertTitle("Edit");
selectByLabel(By.id("typeOfNew"), "University (vivo)");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
type(By.id("label"), "Primate University of America");
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
clickAndWait(By.cssSelector("a.add-governingAuthorityFor > img.add-individual"));
assertTitle("Edit");
vivoAutoCompleteSelect(By.id("object"), "primate colleges of the wor", Keys.ARROW_DOWN);
clickAndWait(By.id("submit"));
assertTitle("Primate College of America");
// Verify everything entered is displaying properly
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[2]"));
verifyTextPresent(
"PCoA",
"1959 -"
);
verifyElementPresent(By.linkText("B.S. Bachelor of Science"));
verifyElementPresent(By.linkText("Primate Student of the Year"));
verifyElementPresent(By.linkText("Best Primate College"));
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[4]"));
verifyTextPresent(
"faculty administrative position",
"Person, Polly, Dr. 1999 -",
"Primates-r-us Founder 2010 -",
"Primate Colleges of the World Member 2009 -",
"Primate Heart Health Founder 2010 -",
"New Primate Students 2003 - 2006",
"Primates in the Wild 1997 -"
);
verifyElementPresent(By.linkText("Person, Polly"));
verifyElementPresent(By.linkText("Primate History Library"));
verifyElementPresent(By.linkText("Primate Research Laboratory"));
verifyElementPresent(By.linkText("Primates-r-us"));
verifyElementPresent(By.linkText("Primate Colleges of the World"));
verifyElementPresent(By.linkText("Primate Heart Health"));
verifyElementPresent(By.linkText("New Primate Students"));
verifyElementPresent(By.linkText("Primates in the Wild"));
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[6]"));
verifyTextPresent("invited talk", "Primate Health and Fitness, Organizer 2008");
verifyElementPresent(By.linkText("Primate Info"));
verifyElementPresent(By.linkText("Primate Health and Fitness"));
verifyElementPresent(By.linkText("Primate Happenings"));
verifyElementPresent(By.linkText("USA222333444555"));
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[8]"));
verifyElementPresent(By.linkText("Primate Habitat Research Grant"));
verifyElementPresent(By.linkText("Primate Survival Planning Grant"));
verifyElementPresent(By.linkText("Human and Ape Brain Comparison"));
verifyTextPresent("Gorillas");
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[10]"));
verifyTextPresent("Primate Health Check Sponsor 2008 - 2010");
verifyElementPresent(By.linkText("Gorilla Moving Company"));
verifyElementPresent(By.linkText("Primate Health Check"));
verifyElementPresent(By.linkText("Portable Primate Habitat"));
verifyElementPresent(By.linkText("Introduction to Primates"));
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[12]"));
verifyTextPresent(
"555-555-5555",
"555-555-5554",
"info@primates.edu",
"1234 Northern African Nation",
"Morocco City",
"1234567890",
"Morocco");
verifyElementPresent(By.linkText("northern Africa"));
verifyElementPresent(By.linkText("Primate College of New York"));
verifyElementPresent(By.linkText("Primate University of America"));
verifyElementPresent(By.linkText("Primate Colleges of the World"));
clickAndWait(By.xpath("//div[@id='wrapper-content']/ul/li[14]"));
verifyTextPresent(
"PCoA",
"1959 -",
"faculty administrative position",
"Person, Polly, Dr. 1999 -",
"Primates-r-us Founder 2010 -",
"Primate Colleges of the World Member 2009 -",
"Primate Heart Health Founder 2010 -",
"New Primate Students 2003 - 2006",
"Primates in the Wild 1997 -",
"invited talk",
"Primate Health and Fitness, Organizer 2008",
"Gorillas",
"Primate Health Check Sponsor 2008 - 2010",
"555-555-5555",
"555-555-5554",
"info@primates.edu",
"1234 Northern African Nation",
"Morocco City",
"1234567890",
"Morocco"
);
verifyElementPresent(By.linkText("B.S. Bachelor of Science"));
verifyElementPresent(By.linkText("Primate Student of the Year"));
verifyElementPresent(By.linkText("Best Primate College"));
verifyElementPresent(By.linkText("Person, Polly"));
verifyElementPresent(By.linkText("Primate History Library"));
verifyElementPresent(By.linkText("Primate Research Laboratory"));
verifyElementPresent(By.linkText("Primates-r-us"));
verifyElementPresent(By.linkText("Primate Colleges of the World"));
verifyElementPresent(By.linkText("Primate Heart Health"));
verifyElementPresent(By.linkText("New Primate Students"));
verifyElementPresent(By.linkText("Primates in the Wild"));
verifyElementPresent(By.linkText("Primate Info"));
verifyElementPresent(By.linkText("Primate Health and Fitness"));
verifyElementPresent(By.linkText("Primate Happenings"));
verifyElementPresent(By.linkText("USA222333444555"));
verifyElementPresent(By.linkText("Primate Habitat Research Grant"));
verifyElementPresent(By.linkText("Primate Survival Planning Grant"));
verifyElementPresent(By.linkText("Human and Ape Brain Comparison"));
verifyElementPresent(By.linkText("Gorilla Moving Company"));
verifyElementPresent(By.linkText("Primate Health Check"));
verifyElementPresent(By.linkText("Portable Primate Habitat"));
verifyElementPresent(By.linkText("Introduction to Primates"));
verifyElementPresent(By.linkText("northern Africa"));
verifyElementPresent(By.linkText("Primate College of New York"));
verifyElementPresent(By.linkText("Primate University of America"));
verifyElementPresent(By.linkText("Primate Colleges of the World"));
}
}

View file

@ -0,0 +1,103 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class CreateTopic {
@BeforeClass
public static void setUp() {
startTests();
vivoLogIn("testAdmin@cornell.edu", "Password");
}
@AfterClass
public static void tearDown() {
vivoLogOut();
endTests();
}
@Test
public void createTopic() {
clickAndWait(By.linkText("Site Admin"));
assertTitle("VIVO Site Administration");
verifyTextPresent("Data Input");
selectByLabel(By.id("VClassURI"), "Concept (skos)");
clickAndWait(By.xpath("//input[@value='Add individual of this class']"));
assertTitle("Edit");
verifyTextPresent("Create a new Concept");
clickAndWait(By.linkText("Cancel"));
assertTitle("VIVO Site Administration");
selectByLabel(By.id("VClassURI"), "Concept (skos)");
clickAndWait(By.xpath("//input[@value='Add individual of this class']"));
assertTitle("Edit");
verifyTextPresent("Create a new Concept");
clickAndWait(By.id("submit"));
assertTitle("Edit");
verifyTextPresent("Please enter a value in the Name field.");
type(By.id("label"), "Primate Health");
clickAndWait(By.id("submit"));
assertTitle("Primate Health");
clickAndWait(By.cssSelector("li.nonSelectedGroupTab.clickable"));
clickAndWait(By.xpath("//h3[@id='broader']/a/img"));
assertTitle("Edit");
verifyTextPresent("If you don't find the appropriate entry on the selection list above:");
selectByLabel(By.id("objectVar"), "Animal Health");
clickAndWait(By.id("submit"));
assertTitle("Primate Health");
clickAndWait(By.xpath("//h3[@id='narrower']/a/img"));
assertTitle("Edit");
verifyTextPresent("If you don't find the appropriate entry on the selection list above:");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
verifyTextPresent("Create \"narrower concept\" entry for Primate Health");
type(By.id("label"), "Primate Diet");
clickAndWait(By.id("submit"));
assertTitle("Primate Health");
clickAndWait(By.xpath("//h3[@id='related']/a/img"));
assertTitle("Edit");
verifyTextPresent("If you don't find the appropriate entry on the selection list above:");
clickAndWait(By.id("offerCreate"));
assertTitle("Edit");
verifyTextPresent("Create \"related concept\" entry for Primate Health");
type(By.id("label"), "Ape Health");
clickAndWait(By.id("submit"));
assertTitle("Primate Health");
verifyElementPresent(By.linkText("Animal Health"));
verifyElementPresent(By.linkText("Primate Diet"));
verifyElementPresent(By.linkText("Ape Health"));
}
}

View file

@ -0,0 +1,39 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.By;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class DeleteActivities {
@BeforeClass
public static void setUp() {
startTests();
vivoLogIn("testAdmin@cornell.edu", "Password");
}
@AfterClass
public static void tearDown() {
vivoLogOut();
endTests();
}
@Test
public void deleteProjectHumanApeBrainComparison() {
vivoDeleteIndividual("Project", "Human and Ape Brain Comparison");
}
@Test
public void deleteServiceGorillaMovingCompany() {
vivoDeleteIndividual("Service", "Gorilla Moving Company");
}
@Test
public void deleteServicePrimateHeartHealth() {
vivoDeleteIndividual("Service", "Primate Heart Health");
}
}

View file

@ -0,0 +1,35 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.By;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class DeleteCourses {
@BeforeClass
public static void setUp() {
startTests();
vivoLogIn("testAdmin@cornell.edu", "Password");
}
@AfterClass
public static void tearDown() {
vivoLogOut();
endTests();
}
@Test
public void deleteCourseIntroductionPrimateHealth() {
// From CreateCourses
vivoDeleteIndividual("Course", "Introduction to Primate Health");
}
@Test
public void deleteCourseIntroductionPrimates() {
vivoDeleteIndividual("Course", "Introduction to Primates");
}
}

View file

@ -0,0 +1,35 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.By;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class DeleteEquipment {
@BeforeClass
public static void setUp() {
startTests();
vivoLogIn("testAdmin@cornell.edu", "Password");
}
@AfterClass
public static void tearDown() {
vivoLogOut();
endTests();
}
@Test
public void deleteEquipmentPortablePrimateHabitat() {
vivoDeleteIndividual("Equipment", "Portable Primate Habitat");
}
@Test
public void deleteEquipmentPrimateFeeder() {
// From CreateEquipment
vivoDeleteIndividual("Equipment", "Primate Feeder");
}
}

View file

@ -0,0 +1,58 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.By;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class DeleteEvents {
@BeforeClass
public static void setUp() {
startTests();
vivoLogIn("testAdmin@cornell.edu", "Password");
}
@AfterClass
public static void tearDown() {
vivoLogOut();
endTests();
}
@Test
public void deleteEventNewPrimateStudents() {
vivoDeleteIndividual("Event", "New Primate Students");
}
@Test
public void deleteEventPrimateHealthAndFitness() {
vivoDeleteIndividual("Event", "Primate Health and Fitness");
}
@Test
public void deleteEventPrimateHealthCheck() {
vivoDeleteIndividual("Event", "Primate Health Check");
}
@Test
public void deleteEventPrimateHealthConference() {
// From CreateEvent
vivoDeleteIndividual("Event", "Primate Health Conference");
}
@Test
public void deleteEventPrimatesInTheWild() {
vivoDeleteIndividual("Event", "Primates in the Wild");
}
@Test
public void deleteSeminarPrimateHealthTalks() {
// From CreateCourses
vivoDeleteIndividual("Seminar Series", "Primate Health Talks");
}
// Where is Introduction to Primates??
}

View file

@ -0,0 +1,60 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.By;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class DeleteLocations {
@BeforeClass
public static void setUp() {
startTests();
vivoLogIn("testAdmin@cornell.edu", "Password");
}
@AfterClass
public static void tearDown() {
vivoLogOut();
endTests();
}
@Test
public void deleteBuildingPrimateMemorialBuilding() {
// from CreateCourses
vivoDeleteIndividual("Building", "Primate Memorial Building");
}
@Test
public void deleteFacilityPrimateResearchLabRoom123() {
// from CreateEquipment
vivoDeleteIndividual("Facility", "Primate Research Lab Room 123");
}
@Test
public void deleteFacilityStateFairPark() {
// from CreateEvent
vivoDeleteIndividual("Facility", "State Fair Park");
}
@Test
public void deleteBuildingJaneMemorialBuilding() {
// from CreateLocation
vivoDeleteIndividual("Building", "Jane Memorial Building");
}
@Test
public void deleteFacilityLabAdminOffice() {
// from CreateLocation
vivoDeleteIndividual("Facility", "Lab Admin Office");
}
@Test
public void deleteGeograpihcPrimateQuad() {
// from CreateLocation
vivoDeleteIndividual("Geographic Location", "Primate Quad");
}
}

View file

@ -0,0 +1,64 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.By;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class DeleteOrganization {
@BeforeClass
public static void setUp() {
startTests();
vivoLogIn("testAdmin@cornell.edu", "Password");
}
@AfterClass
public static void tearDown() {
vivoLogOut();
endTests();
}
@Test
public void deletePrimateCollegeOfAmerica() {
vivoDeleteIndividual("Organization", "Primate College of America");
}
@Test
public void deletePrimateCollegeOfNewYork() {
vivoDeleteIndividual("Organization", "Primate College of New York");
}
@Test
public void deletePrimateCollegesOfTheWorld() {
vivoDeleteIndividual("Organization", "Primate Colleges of the World");
}
@Test
public void deletePrimateHistoryLibrary() {
vivoDeleteIndividual("Organization", "Primate History Library");
}
@Test
public void deletePrimateResearchLaboratory() {
vivoDeleteIndividual("Organization", "Primate Research Laboratory");
}
@Test
public void deletePrimateUniversityOfAmerica() {
vivoDeleteIndividual("Organization", "Primate University of America");
}
@Test
public void deletePrimatesRUs() {
vivoDeleteIndividual("Organization", "Primates-r-us");
}
@Test
public void deletePollyPerson() {
vivoDeleteIndividual("Person", "Person, Polly");
}
}

View file

@ -0,0 +1,115 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.By;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class DeleteResearch {
@BeforeClass
public static void setUp() {
startTests();
vivoLogIn("testAdmin@cornell.edu", "Password");
}
@AfterClass
public static void tearDown() {
vivoLogOut();
endTests();
}
@Test
public void deleteArticlePrimateHappenings() {
vivoDeleteIndividual("Article", "Primate Happenings");
}
@Test
public void deleteAwardBestPrimateCollege() {
vivoDeleteIndividual("Award or Honor", "Best Primate College");
}
@Test
public void deleteAwardPrimateStudentOfTheYear() {
vivoDeleteIndividual("Award or Honor", "Primate Student of the Year");
}
@Test
public void deleteBookPHCProceedings() {
// From CreateEvent
vivoDeleteIndividual("Book", "PHC Proceedings");
}
@Test
public void deleteConceptApeHealth() {
// From CreateTopic
vivoDeleteIndividual("Concept", "Ape Health");
}
@Test
public void deleteConceptPrimateDiet() {
// From CreateTopic
vivoDeleteIndividual("Concept", "Primate Diet");
}
@Test
public void deleteConceptPrimateHealth() {
// From CreateTopic
vivoDeleteIndividual("Concept", "Primate Health");
}
@Test
public void deleteConceptElderlyCare() {
// From CreateActivity
vivoDeleteIndividual("Concept", "Elderly Care");
}
@Test
public void deleteConceptAnimalHealth() {
// From CreateCourses
vivoDeleteIndividual("Concept", "Animal Health");
}
@Test
public void deleteDatabasePrimateInfo() {
vivoDeleteIndividual("Database", "Primate Info");
}
@Test
public void deleteGrantPrimateElderlyCare() {
// From CreateActivity
vivoDeleteIndividual("Grant", "Primate Elderly Care");
}
@Test
public void deleteGrantPrimateHabitatResearchGrant() {
vivoDeleteIndividual("Grant", "Primate Habitat Research Grant");
}
@Test
public void deleteGrantPrimateSurvivalPlanningGrant() {
vivoDeleteIndividual("Grant", "Primate Survival Planning Grant");
}
@Test
public void deletePatentUSA222333444555() {
vivoDeleteIndividual("Patent", "USA222333444555");
}
@Test
public void deleteWebPagePrimateHealthIntro() {
// From CreateCourses
vivoDeleteIndividual("Webpage", "http://primatehealthintro.cornell.edu");
}
}

View file

@ -0,0 +1,38 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openqa.selenium.By;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
public class RebuildSearchIndex {
@BeforeClass
public static void setUp() {
startTests();
vivoLogIn("testAdmin@cornell.edu", "Password");
}
@AfterClass
public static void tearDown() {
vivoLogOut();
endTests();
}
@Test
public void rebuildSearchIndexTest() {
clickAndWait(By.linkText("Site Admin")); // clickAndWait,link=Site Admin
assertTitle("VIVO Site Administration"); // assertTitle,VIVO Site Administration
clickAndWait(By.linkText("Rebuild search index")); // clickAndWait,link=Rebuild search index
assertTitle("Rebuild Search Index"); // assertTitle,Rebuild Search Index
waitForTextPresent("Reset the search index and re-populate it."); // waitForTextPresent,Reset the search index and re-populate it.
clickAndWait(By.name("rebuild")); // clickAndWait,name=rebuild
assertTitle("Rebuild Search Index"); // assertTitle, Rebuild Search Index
waitForTextPresent("Reset the search index and re-populate it."); // waitForTextPresent,Reset the search index and re-populate it.
}
}

View file

@ -0,0 +1,251 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openqa.selenium.By;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
public class TestMenuManagement {
@BeforeClass
public static void setUp() {
startTests();
vivoLogIn("testAdmin@cornell.edu", "Password");
}
@AfterClass
public static void tearDown() {
vivoLogOut();
endTests();
}
@Test
public void testMenuManagement() {
clickAndWait(By.linkText("Site Admin"));
assertTitle("VIVO Site Administration");
clickAndWait(By.linkText("Page management"));
assertTitle("Pages");
clickAndWait(By.id("submit"));
assertTitle("Edit");
type(By.id("pageName"), "Activities");
type(By.name("prettyUrl"), "/activities");
selectByLabel(By.id("typeSelect"), "Browse Class Group");
selectByLabel(By.id("selectClassGroup"), "activities");
// clickAndWait(By.cssSelector("option[value=\"http://vivoweb.org/ontology#vitroClassGroupactivities\"]"));
clickAndWait(By.id("doneWithContent"));
clickAndWait(By.id("menuCheckbox"));
clickAndWait(By.id("pageSave"));
assertTitle("Pages");
verifyTextPresent(
"Home",
"People",
"Organizations",
"Research",
"Events",
"Activities"
);
clickAndWait(By.id("submit"));
assertTitle("Edit");
type(By.id("pageName"), "Courses");
type(By.name("prettyUrl"), "/courses");
selectByLabel(By.id("typeSelect"), "Browse Class Group");
selectByLabel(By.id("selectClassGroup"), "courses");
// clickAndWait(By.cssSelector("option[value=\"http://vivoweb.org/ontology#vitroClassGroupactivities\"]"));
clickAndWait(By.id("doneWithContent"));
clickAndWait(By.id("menuCheckbox"));
clickAndWait(By.id("pageSave"));
assertTitle("Pages");
verifyTextPresent(
"Home",
"People",
"Organizations",
"Research",
"Events",
"Activities",
"Courses"
);
clickAndWait(By.id("submit"));
assertTitle("Edit");
type(By.id("pageName"), "Equipment");
type(By.name("prettyUrl"), "/equipment");
selectByLabel(By.id("typeSelect"), "Browse Class Group");
selectByLabel(By.id("selectClassGroup"), "equipment");
// clickAndWait(By.cssSelector("option[value=\"http://vivoweb.org/ontology#vitroClassGroupactivities\"]"));
clickAndWait(By.id("doneWithContent"));
clickAndWait(By.id("menuCheckbox"));
clickAndWait(By.id("pageSave"));
assertTitle("Pages");
verifyTextPresent(
"Home",
"People",
"Organizations",
"Research",
"Events",
"Activities"
);
clickAndWait(By.id("submit"));
assertTitle("Edit");
verifyTextPresent(
"Home",
"People",
"Organizations",
"Research",
"Events",
"Activities",
"Courses",
"Equipment"
);
type(By.id("pageName"), "Locations");
type(By.name("prettyUrl"), "/locations");
selectByLabel(By.id("typeSelect"), "Browse Class Group");
selectByLabel(By.id("selectClassGroup"), "locations");
// clickAndWait(By.cssSelector("option[value=\"http://vivoweb.org/ontology#vitroClassGroupactivities\"]"));
clickAndWait(By.id("doneWithContent"));
clickAndWait(By.id("menuCheckbox"));
clickAndWait(By.id("pageSave"));
assertTitle("Pages");
verifyTextPresent(
"Home",
"People",
"Organizations",
"Research",
"Events",
"Activities",
"Locations"
);
clickAndWait(By.linkText("Activities"));
assertTitle("Activities");
clickAndWait(By.linkText("Project (1)"));
pause(500);
verifyElementPresent(By.linkText("Human and Ape Brain Comparison"));
clickAndWait(By.linkText("Research Project (1)"));
pause(500);
verifyElementPresent(By.linkText("Human and Ape Brain Comparison"));
clickAndWait(By.linkText("Service (2)"));
pause(500);
verifyElementPresent(By.linkText("Gorilla Moving Company"));
verifyElementPresent(By.linkText("Primate Heart Health"));
clickAndWait(By.linkText("Transport Service (1)"));
pause(500);
verifyElementPresent(By.linkText("Gorilla Moving Company"));
clickAndWait(By.linkText("Courses"));
assertTitle("Courses");
clickAndWait(By.linkText("Course (2)"));
pause(500);
verifyTextPresent("Course");
verifyElementPresent(By.linkText("Introduction to Primates"));
verifyElementPresent(By.linkText("Introduction to Primate Health"));
clickAndWait(By.linkText("Equipment"));
assertTitle("Equipment");
clickAndWait(By.linkText("Equipment (2)"));
pause(500);
verifyTextPresent("Equipment");
verifyElementPresent(By.linkText("Portable Primate Habitat"));
verifyElementPresent(By.linkText("Primate Feeder"));
clickAndWait(By.linkText("Locations"));
assertTitle("Locations");
clickAndWait(By.linkText("Building (2)"));
pause(500);
verifyTextPresent("Building");
verifyElementPresent(By.linkText("Jane Memorial Building"));
verifyElementPresent(By.linkText("Primate Memorial Building"));
clickAndWait(By.linkText("Facility (5)"));
pause(500);
verifyElementPresent(By.linkText("Jane Memorial Building"));
verifyElementPresent(By.linkText("Lab Admin Office"));
verifyElementPresent(By.linkText("Primate Memorial Building"));
verifyElementPresent(By.linkText("Primate Research Lab Room 123"));
verifyElementPresent(By.linkText("State Fair Park"));
clickAndWait(By.linkText("Room (1)"));
pause(500);
verifyElementPresent(By.linkText("Lab Admin Office"));
clickAndWait(By.linkText("Site Admin"));
assertTitle("VIVO Site Administration");
clickAndWait(By.linkText("Page management"));
assertTitle("Pages");
clickAndWait(By.xpath("(//img[@alt='delete this page'])[2]"));
assertConfirmation("Are you sure you wish to delete this page: Activities?");
assertTitle("Pages");
clickAndWait(By.linkText("Site Admin"));
assertTitle("VIVO Site Administration");
clickAndWait(By.linkText("Page management"));
assertTitle("Pages");
clickAndWait(By.xpath("(//img[@alt='delete this page'])[4]"));
assertConfirmation("Are you sure you wish to delete this page: Courses?");
assertTitle("Pages");
clickAndWait(By.linkText("Site Admin"));
assertTitle("VIVO Site Administration");
clickAndWait(By.linkText("Page management"));
assertTitle("Pages");
clickAndWait(By.xpath("(//img[@alt='delete this page'])[6]"));
assertConfirmation("Are you sure you wish to delete this page: Equipment?");
assertTitle("Pages");
clickAndWait(By.linkText("Site Admin"));
assertTitle("VIVO Site Administration");
clickAndWait(By.linkText("Page management"));
assertTitle("Pages");
clickAndWait(By.xpath("(//img[@alt='delete this page'])[7]"));
assertConfirmation("Are you sure you wish to delete this page: Locations?");
assertTitle("Pages");
}
}

View file

@ -0,0 +1,152 @@
package org.vivoweb.vivo.selenium.tests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openqa.selenium.By;
import static org.vivoweb.vivo.selenium.VIVOAppTester.*;
public class VerifyAllThingsSearchable {
@BeforeClass
public static void setUp() {
startTests();
vivoLogOut();
}
@AfterClass
public static void tearDown() {
endTests();
}
@Test
public void verifyAllThingsSearchable() {
type(By.name("querytext"), "primates");
clickAndWait(By.xpath("//input[@value='Search']"));
assertTitle("primates - VIVO Search Results");
verifyElementPresent(By.linkText("people"));
verifyElementPresent(By.linkText("activities"));
verifyElementPresent(By.linkText("courses"));
verifyElementPresent(By.linkText("events"));
verifyElementPresent(By.linkText("organizations"));
verifyElementPresent(By.linkText("equipment"));
verifyElementPresent(By.linkText("research"));
verifyElementPresent(By.linkText("locations"));
verifyElementPresent(By.linkText("Primates in the Wild"));
verifyElementPresent(By.linkText("Introduction to Primates"));
verifyElementPresent(By.linkText("Primates-r-us"));
verifyElementPresent(By.linkText("Primate Happenings"));
verifyElementPresent(By.linkText("Primate Info"));
verifyElementPresent(By.linkText("Primate Health"));
verifyElementPresent(By.linkText("Primate Quad"));
verifyElementPresent(By.linkText("Primate Feeder"));
verifyElementPresent(By.linkText("Primate Diet"));
verifyElementPresent(By.linkText("Primate College of America"));
verifyElementPresent(By.linkText("Primate Health Talks"));
verifyElementPresent(By.linkText("Primate Research Laboratory"));
verifyElementPresent(By.linkText("Portable Primate Habitat"));
verifyElementPresent(By.linkText("Primate Elderly Care"));
verifyElementPresent(By.linkText("Introduction to Primate Health"));
verifyElementPresent(By.linkText("Primate Health and Fitness"));
verifyElementPresent(By.linkText("Primate University of America"));
verifyElementPresent(By.linkText("Primate Colleges of the World"));
verifyElementPresent(By.linkText("Primate Health Check"));
verifyElementPresent(By.linkText("Primate Health Conference"));
verifyElementPresent(By.linkText("Primate Heart Health"));
verifyElementPresent(By.linkText("New Primate Students"));
verifyElementPresent(By.linkText("Primate Habitat Research Grant"));
verifyElementPresent(By.linkText("Best Primate College"));
verifyElementPresent(By.linkText("Primate History Library"));
verifyTextPresent(
"Primates in the Wild Performance",
"Introduction to Primates Course",
"Primates-r-us Company",
"Primate Happenings Blog Posting",
"Primate Info Database",
"Primate Health Concept",
"Primate Quad Geographic Location",
"Primate Feeder Equipment",
"Primate Diet Concept",
"Primate College of America College",
"Primate Health Talks Seminar Series",
"Primate Research Laboratory Laboratory",
"Portable Primate Habitat Equipment",
"Primate Elderly Care Grant",
"Introduction to Primate Health Course",
"Primate Health and Fitness Invited Talk",
"Primate University of America University",
"Primate Colleges of the World Consortium",
"Primate Health Check Event",
"Primate Health Conference Conference",
"Primate Heart Health Service",
"New Primate Students Workshop",
"Primate Habitat Research Grant Grant",
"Best Primate College Award or Honor",
"Primate History Library Library"
);
clickAndWait(By.linkText("2"));
assertTitle("primates - VIVO Search Results");
verifyElementPresent(By.linkText("Primate Memorial Building"));
verifyElementPresent(By.linkText("Primate Student of the Year"));
verifyElementPresent(By.linkText("Primate Survival Planning Grant"));
verifyElementPresent(By.linkText("Primate College of New York"));
verifyElementPresent(By.linkText("Primate Research Lab Room 123"));
verifyElementPresent(By.linkText("Animal Health"));
verifyElementPresent(By.linkText("Ape Health"));
verifyElementPresent(By.linkText("Elderly Care"));
verifyElementPresent(By.linkText("Jane Memorial Building"));
verifyElementPresent(By.linkText("http://primatehealthintro.cornell.edu"));
verifyElementPresent(By.linkText("Human and Ape Brain Comparison"));
verifyElementPresent(By.linkText("Person, Polly"));
verifyElementPresent(By.linkText("Gorilla Moving Company"));
verifyElementPresent(By.linkText("PHC Proceedings"));
verifyElementPresent(By.linkText("State Fair Park"));
verifyElementPresent(By.linkText("USA222333444555"));
verifyElementPresent(By.linkText("Africa"));
verifyElementPresent(By.linkText("Kenya"));
verifyTextPresent(
"Primate Memorial Building Building",
"Primate Student of the Year Award or Honor",
"Primate Survival Planning Grant Grant",
"Primate College of New York College",
"Primate Research Lab Room 123 Facility",
"Animal Health Concept",
"Ape Health Concept",
"Elderly Care Concept",
"http://primatehealthintro.cornell.edu Webpage",
"Human and Ape Brain Comparison Human Study",
"Gorilla Moving Company Transport Service",
"PHC Proceedings Proceedings",
"USA222333444555 Patent",
"Africa Continent Transnational Region",
"Kenya Country"
);
clickAndWait(By.linkText("Home"));
assertTitle("VIVO");
/*
<tr>
<td>verifyText</td>
<td>//div[@id='wrapper-content']/div/ul/li[9]/span</td>
<td>Building</td>
</tr>
<tr>
<td>verifyText</td>
<td>//div[@id='wrapper-content']/div/ul/li[12]/span</td>
<td>Person</td>
</tr>
<tr>
<td>verifyText</td>
<td>//div[@id='wrapper-content']/div/ul/li[15]/span</td>
<td>Facility</td>
</tr>
*/
}
}

View file

@ -0,0 +1,191 @@
<html>
<head>
<title>TestNG: Command line test</title>
<link href="../testng.css" rel="stylesheet" type="text/css" />
<link href="../my-testng.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.log { display: none;}
.stack-trace { display: none;}
</style>
<script type="text/javascript">
<!--
function flip(e) {
current = e.style.display;
if (current == 'block') {
e.style.display = 'none';
return 0;
}
else {
e.style.display = 'block';
return 1;
}
}
function toggleBox(szDivId, elem, msg1, msg2)
{
var res = -1; if (document.getElementById) {
res = flip(document.getElementById(szDivId));
}
else if (document.all) {
// this is the way old msie versions work
res = flip(document.all[szDivId]);
}
if(elem) {
if(res == 0) elem.innerHTML = msg1; else elem.innerHTML = msg2;
}
}
function toggleAllBoxes() {
if (document.getElementsByTagName) {
d = document.getElementsByTagName('div');
for (i = 0; i < d.length; i++) {
if (d[i].className == 'log') {
flip(d[i]);
}
}
}
}
// -->
</script>
</head>
<body>
<h2 align='center'>Command line test</h2><table border='1' align="center">
<tr>
<td>Tests passed/Failed/Skipped:</td><td>0/1/0</td>
</tr><tr>
<td>Started on:</td><td>Sat Jan 23 20:20:12 GMT 2016</td>
</tr>
<tr><td>Total time:</td><td>1 seconds (1334 ms)</td>
</tr><tr>
<td>Included groups:</td><td></td>
</tr><tr>
<td>Excluded groups:</td><td></td>
</tr>
</table><p/>
<small><i>(Hover the method name to see the test class name)</i></small><p/>
<table width='100%' border='1' class='invocation-failed'>
<tr><td colspan='4' align='center'><b>FAILED TESTS</b></td></tr>
<tr><td><b>Test method</b></td>
<td width="30%"><b>Exception</b></td>
<td width="10%"><b>Time (seconds)</b></td>
<td><b>Instance</b></td>
</tr>
<tr>
<td title='org.vivoweb.vivo.selenium.tests.RebuildSearchIndex.rebuildSearchIndexTest()'><b>rebuildSearchIndexTest</b><br>Test class: org.vivoweb.vivo.selenium.tests.RebuildSearchIndex</td>
<td><div><pre>org.openqa.selenium.NoSuchElementException: Unable to locate element: {&quot;method&quot;:&quot;link text&quot;,&quot;selector&quot;:&quot;Site Admin&quot;}
Command duration or timeout: 1.18 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: &apos;2.48.2&apos;, revision: &apos;41bccdd10cf2c0560f637404c2d96164b67d9d67&apos;, time: &apos;2015-10-09 13:08:06&apos;
System info: host: &apos;Grahams-MBP-2&apos;, ip: &apos;192.168.1.239&apos;, os.name: &apos;Mac OS X&apos;, os.arch: &apos;x86_64&apos;, os.version: &apos;10.11.3&apos;, java.version: &apos;1.8.0_60&apos;
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=43.0.4, platform=MAC, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 0454c462-95d4-4143-85a7-404602e998cd
*** Element info: {Using=link text, value=Site Admin}
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:647)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:353)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByLinkText(RemoteWebDriver.java:418)
at org.openqa.selenium.By$ByLinkText.findElement(By.java:246)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:345)
at org.vivoweb.vivo.selenium.tests.AbstractSeleniumTest.clickAndWait(AbstractSeleniumTest.java:46)
at org.vivoweb.vivo.selenium.tests.RebuildSearchIndex.rebuildSearchIndexTest(RebuildSearchIndex.java:15)
at org.vivoweb.vivo.selenium.suites.Suite2.suite2(Suite2.java:18)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate element: {&quot;method&quot;:&quot;link text&quot;,&quot;selector&quot;:&quot;Site Admin&quot;}
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: &apos;2.48.2&apos;, revision: &apos;41bccdd10cf2c0560f637404c2d96164b67d9d67&apos;, time: &apos;2015-10-09 13:08:06&apos;
System info: host: &apos;Grahams-MBP-2&apos;, ip: &apos;192.168.1.239&apos;, os.name: &apos;Mac OS X&apos;, os.arch: &apos;x86_64&apos;, os.version: &apos;10.11.3&apos;, java.version: &apos;1.8.0_60&apos;
Driver info: driver.version: unknown
at &lt;anonymous class&gt;.FirefoxDriver.prototype.findElementInternal_(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:10659)
at &lt;anonymous class&gt;.FirefoxDriver.prototype.findElement(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:10668)
at &lt;anonymous class&gt;.DelayedCommand.prototype.executeInternal_/h(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12534)
at &lt;anonymous class&gt;.DelayedCommand.prototype.executeInternal_(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12539)
at &lt;anonymous class&gt;.DelayedCommand.prototype.execute/&lt;(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12481)
... Removed 46 stack frames</pre></div><a href='#' onClick='toggleBox("stack-trace795242171", this, "Click to show all stack frames", "Click to hide stack frames")'>Click to show all stack frames</a>
<div class='stack-trace' id='stack-trace795242171'><pre>org.openqa.selenium.NoSuchElementException: Unable to locate element: {&quot;method&quot;:&quot;link text&quot;,&quot;selector&quot;:&quot;Site Admin&quot;}
Command duration or timeout: 1.18 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: &apos;2.48.2&apos;, revision: &apos;41bccdd10cf2c0560f637404c2d96164b67d9d67&apos;, time: &apos;2015-10-09 13:08:06&apos;
System info: host: &apos;Grahams-MBP-2&apos;, ip: &apos;192.168.1.239&apos;, os.name: &apos;Mac OS X&apos;, os.arch: &apos;x86_64&apos;, os.version: &apos;10.11.3&apos;, java.version: &apos;1.8.0_60&apos;
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=43.0.4, platform=MAC, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 0454c462-95d4-4143-85a7-404602e998cd
*** Element info: {Using=link text, value=Site Admin}
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:647)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:353)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByLinkText(RemoteWebDriver.java:418)
at org.openqa.selenium.By$ByLinkText.findElement(By.java:246)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:345)
at org.vivoweb.vivo.selenium.tests.AbstractSeleniumTest.clickAndWait(AbstractSeleniumTest.java:46)
at org.vivoweb.vivo.selenium.tests.RebuildSearchIndex.rebuildSearchIndexTest(RebuildSearchIndex.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:643)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
at org.testng.TestRunner.privateRun(TestRunner.java:782)
at org.testng.TestRunner.run(TestRunner.java:632)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
at org.testng.SuiteRunner.run(SuiteRunner.java:268)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
at org.testng.TestNG.run(TestNG.java:1064)
at org.vivoweb.vivo.selenium.suites.Suite2.suite2(Suite2.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:514)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:215)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
at org.testng.SuiteRunner.run(SuiteRunner.java:268)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
at org.testng.TestNG.run(TestNG.java:1064)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate element: {&quot;method&quot;:&quot;link text&quot;,&quot;selector&quot;:&quot;Site Admin&quot;}
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: &apos;2.48.2&apos;, revision: &apos;41bccdd10cf2c0560f637404c2d96164b67d9d67&apos;, time: &apos;2015-10-09 13:08:06&apos;
System info: host: &apos;Grahams-MBP-2&apos;, ip: &apos;192.168.1.239&apos;, os.name: &apos;Mac OS X&apos;, os.arch: &apos;x86_64&apos;, os.version: &apos;10.11.3&apos;, java.version: &apos;1.8.0_60&apos;
Driver info: driver.version: unknown
at &lt;anonymous class&gt;.FirefoxDriver.prototype.findElementInternal_(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:10659)
at &lt;anonymous class&gt;.FirefoxDriver.prototype.findElement(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:10668)
at &lt;anonymous class&gt;.DelayedCommand.prototype.executeInternal_/h(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12534)
at &lt;anonymous class&gt;.DelayedCommand.prototype.executeInternal_(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12539)
at &lt;anonymous class&gt;.DelayedCommand.prototype.execute/&lt;(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12481)
</pre></div></td>
<td>1</td>
<td>org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c</td></tr>
</table><p>
</body>
</html>

View file

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by org.testng.reporters.JUnitXMLReporter -->
<testsuite hostname="Grahams-MBP-2" name="Command line test" tests="1" failures="1" timestamp="23 Jan 2016 20:20:13 GMT" time="1.334" errors="0">
<testcase name="rebuildSearchIndexTest" time="1.191" classname="org.vivoweb.vivo.selenium.tests.RebuildSearchIndex">
<failure type="org.openqa.selenium.NoSuchElementException" message="Unable to locate element: {&amp;quot;method&amp;quot;:&amp;quot;link text&amp;quot;,&amp;quot;selector&amp;quot;:&amp;quot;Site Admin&amp;quot;}
Command duration or timeout: 1.18 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: &amp;apos;2.48.2&amp;apos;, revision: &amp;apos;41bccdd10cf2c0560f637404c2d96164b67d9d67&amp;apos;, time: &amp;apos;2015-10-09 13:08:06&amp;apos;
System info: host: &amp;apos;Grahams-MBP-2&amp;apos;, ip: &amp;apos;192.168.1.239&amp;apos;, os.name: &amp;apos;Mac OS X&amp;apos;, os.arch: &amp;apos;x86_64&amp;apos;, os.version: &amp;apos;10.11.3&amp;apos;, java.version: &amp;apos;1.8.0_60&amp;apos;
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=43.0.4, platform=MAC, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 0454c462-95d4-4143-85a7-404602e998cd
*** Element info: {Using=link text, value=Site Admin}">
<![CDATA[org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"link text","selector":"Site Admin"}
Command duration or timeout: 1.18 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
System info: host: 'Grahams-MBP-2', ip: '192.168.1.239', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.3', java.version: '1.8.0_60'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=43.0.4, platform=MAC, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 0454c462-95d4-4143-85a7-404602e998cd
*** Element info: {Using=link text, value=Site Admin}
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:647)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:353)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByLinkText(RemoteWebDriver.java:418)
at org.openqa.selenium.By$ByLinkText.findElement(By.java:246)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:345)
at org.vivoweb.vivo.selenium.tests.AbstractSeleniumTest.clickAndWait(AbstractSeleniumTest.java:46)
at org.vivoweb.vivo.selenium.tests.RebuildSearchIndex.rebuildSearchIndexTest(RebuildSearchIndex.java:15)
at org.vivoweb.vivo.selenium.suites.Suite2.suite2(Suite2.java:18)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"link text","selector":"Site Admin"}
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
System info: host: 'Grahams-MBP-2', ip: '192.168.1.239', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.3', java.version: '1.8.0_60'
Driver info: driver.version: unknown
at <anonymous class>.FirefoxDriver.prototype.findElementInternal_(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:10659)
at <anonymous class>.FirefoxDriver.prototype.findElement(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:10668)
at <anonymous class>.DelayedCommand.prototype.executeInternal_/h(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12534)
at <anonymous class>.DelayedCommand.prototype.executeInternal_(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12539)
at <anonymous class>.DelayedCommand.prototype.execute/<(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12481)
... Removed 46 stack frames]]>
</failure>
</testcase> <!-- rebuildSearchIndexTest -->
</testsuite> <!-- Command line test -->

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Failed suite [Command line suite]">
<test name="Command line test" preserve-order="false">
<classes>
<class name="org.vivoweb.vivo.selenium.tests.RebuildSearchIndex"/>
</classes>
</test> <!-- Command line test -->
<test name="Command line test(failed)">
<classes>
<class name="org.vivoweb.vivo.selenium.tests.RebuildSearchIndex">
<methods>
<include name="cleanup"/>
<include name="rebuildSearchIndexTest"/>
<include name="vivoSetup"/>
<include name="setUp"/>
<include name="vivoTeardown"/>
<include name="setup"/>
</methods>
</class> <!-- org.vivoweb.vivo.selenium.tests.RebuildSearchIndex -->
</classes>
</test> <!-- Command line test(failed) -->
</suite> <!-- Failed suite [Command line suite] -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

View file

@ -0,0 +1,32 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>TestNG Report</title><style type="text/css">table {margin-bottom:10px;border-collapse:collapse;empty-cells:show}th,td {border:1px solid #009;padding:.25em .5em}th {vertical-align:bottom}td {vertical-align:top}table a {font-weight:bold}.stripe td {background-color: #E6EBF9}.num {text-align:right}.passedodd td {background-color: #3F3}.passedeven td {background-color: #0A0}.skippedodd td {background-color: #DDD}.skippedeven td {background-color: #CCC}.failedodd td,.attn {background-color: #F33}.failedeven td,.stripe .attn {background-color: #D00}.stacktrace {white-space:pre;font-family:monospace}.totop {font-size:85%;text-align:center;border-bottom:2px solid #000}</style></head><body><table><tr><th>Test</th><th># Passed</th><th># Skipped</th><th># Failed</th><th>Time (ms)</th><th>Included Groups</th><th>Excluded Groups</th></tr><tr><th colspan="7">Command line suite</th></tr><tr><td><a href="#t0">Command line test</a></td><td class="num">0</td><td class="num">0</td><td class="num attn">1</td><td class="num">1,334</td><td></td><td></td></tr></table><table><thead><tr><th>Class</th><th>Method</th><th>Start</th><th>Time (ms)</th></tr></thead><tbody><tr><th colspan="4">Command line suite</th></tr></tbody><tbody id="t0"><tr><th colspan="4">Command line test &#8212; failed</th></tr><tr class="failedeven"><td rowspan="1">org.vivoweb.vivo.selenium.tests.RebuildSearchIndex</td><td><a href="#m0">rebuildSearchIndexTest</a></td><td rowspan="1">1453580412047</td><td rowspan="1">1191</td></tr></tbody></table><h2>Command line test</h2><h3 id="m0">org.vivoweb.vivo.selenium.tests.RebuildSearchIndex#rebuildSearchIndexTest</h3><table class="result"><tr><th>Exception</th></tr><tr><td><div class="stacktrace">org.openqa.selenium.NoSuchElementException: Unable to locate element: {&quot;method&quot;:&quot;link text&quot;,&quot;selector&quot;:&quot;Site Admin&quot;}
Command duration or timeout: 1.18 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: &apos;2.48.2&apos;, revision: &apos;41bccdd10cf2c0560f637404c2d96164b67d9d67&apos;, time: &apos;2015-10-09 13:08:06&apos;
System info: host: &apos;Grahams-MBP-2&apos;, ip: &apos;192.168.1.239&apos;, os.name: &apos;Mac OS X&apos;, os.arch: &apos;x86_64&apos;, os.version: &apos;10.11.3&apos;, java.version: &apos;1.8.0_60&apos;
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=43.0.4, platform=MAC, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 0454c462-95d4-4143-85a7-404602e998cd
*** Element info: {Using=link text, value=Site Admin}
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:647)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:353)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByLinkText(RemoteWebDriver.java:418)
at org.openqa.selenium.By$ByLinkText.findElement(By.java:246)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:345)
at org.vivoweb.vivo.selenium.tests.AbstractSeleniumTest.clickAndWait(AbstractSeleniumTest.java:46)
at org.vivoweb.vivo.selenium.tests.RebuildSearchIndex.rebuildSearchIndexTest(RebuildSearchIndex.java:15)
at org.vivoweb.vivo.selenium.suites.Suite2.suite2(Suite2.java:18)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate element: {&quot;method&quot;:&quot;link text&quot;,&quot;selector&quot;:&quot;Site Admin&quot;}
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: &apos;2.48.2&apos;, revision: &apos;41bccdd10cf2c0560f637404c2d96164b67d9d67&apos;, time: &apos;2015-10-09 13:08:06&apos;
System info: host: &apos;Grahams-MBP-2&apos;, ip: &apos;192.168.1.239&apos;, os.name: &apos;Mac OS X&apos;, os.arch: &apos;x86_64&apos;, os.version: &apos;10.11.3&apos;, java.version: &apos;1.8.0_60&apos;
Driver info: driver.version: unknown
at &lt;anonymous class&gt;.FirefoxDriver.prototype.findElementInternal_(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:10659)
at &lt;anonymous class&gt;.FirefoxDriver.prototype.findElement(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:10668)
at &lt;anonymous class&gt;.DelayedCommand.prototype.executeInternal_/h(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12534)
at &lt;anonymous class&gt;.DelayedCommand.prototype.executeInternal_(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12539)
at &lt;anonymous class&gt;.DelayedCommand.prototype.execute/&lt;(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12481)
... Removed 46 stack frames</div></td></tr></table><p class="totop"><a href="#summary">back to summary</a></p></body></html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 977 B

View file

@ -0,0 +1,302 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>TestNG reports</title>
<link type="text/css" href="testng-reports.css" rel="stylesheet" />
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="testng-reports.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type='text/javascript'>
google.load('visualization', '1', {packages:['table']});
google.setOnLoadCallback(drawTable);
var suiteTableInitFunctions = new Array();
var suiteTableData = new Array();
</script>
<!--
<script type="text/javascript" src="jquery-ui/js/jquery-ui-1.8.16.custom.min.js"></script>
-->
</head>
<body>
<div class="top-banner-root">
<span class="top-banner-title-font">Test results</span>
<br/>
<span class="top-banner-font-1">1 suite, 1 failed test</span>
</div> <!-- top-banner-root -->
<div class="navigator-root">
<div class="navigator-suite-header">
<span>All suites</span>
<a href="#" class="collapse-all-link" title="Collapse/expand all the suites">
<img class="collapse-all-icon" src="collapseall.gif">
</img> <!-- collapse-all-icon -->
</a> <!-- collapse-all-link -->
</div> <!-- navigator-suite-header -->
<div class="suite">
<div class="rounded-window">
<div class="suite-header light-rounded-window-top">
<a href="#" class="navigator-link" panel-name="suite-Command_line_suite">
<span class="suite-name border-failed">Command line suite</span>
</a> <!-- navigator-link -->
</div> <!-- suite-header light-rounded-window-top -->
<div class="navigator-suite-content">
<div class="suite-section-title">
<span>Info</span>
</div> <!-- suite-section-title -->
<div class="suite-section-content">
<ul>
<li>
<a href="#" class="navigator-link " panel-name="test-xml-Command_line_suite">
<span>[unset file name]</span>
</a> <!-- navigator-link -->
</li>
<li>
<a href="#" class="navigator-link " panel-name="testlist-Command_line_suite">
<span class="test-stats">2 tests</span>
</a> <!-- navigator-link -->
</li>
<li>
<a href="#" class="navigator-link " panel-name="group-Command_line_suite">
<span>0 groups</span>
</a> <!-- navigator-link -->
</li>
<li>
<a href="#" class="navigator-link " panel-name="times-Command_line_suite">
<span>Times</span>
</a> <!-- navigator-link -->
</li>
<li>
<a href="#" class="navigator-link " panel-name="reporter-Command_line_suite">
<span>Reporter output</span>
</a> <!-- navigator-link -->
</li>
<li>
<a href="#" class="navigator-link " panel-name="ignored-methods-Command_line_suite">
<span>Ignored methods</span>
</a> <!-- navigator-link -->
</li>
<li>
<a href="#" class="navigator-link " panel-name="chronological-Command_line_suite">
<span>Chronological view</span>
</a> <!-- navigator-link -->
</li>
</ul>
</div> <!-- suite-section-content -->
<div class="result-section">
<div class="suite-section-title">
<span>Results</span>
</div> <!-- suite-section-title -->
<div class="suite-section-content">
<ul>
<li>
<span class="method-stats">1 method, 1 failed, </span>
</li>
<li>
<span class="method-list-title failed">Failed methods</span>
<span class="show-or-hide-methods failed">
<a href="#" panel-name="suite-Command_line_suite" class="hide-methods failed suite-Command_line_suite"> (hide)</a> <!-- hide-methods failed suite-Command_line_suite -->
<a href="#" panel-name="suite-Command_line_suite" class="show-methods failed suite-Command_line_suite"> (show)</a> <!-- show-methods failed suite-Command_line_suite -->
</span>
<div class="method-list-content failed suite-Command_line_suite">
<span>
<img width="3%" src="failed.png"/>
<a href="#" class="method navigator-link" panel-name="suite-Command_line_suite" title="org.vivoweb.vivo.selenium.tests.RebuildSearchIndex" hash-for-method="rebuildSearchIndexTest">rebuildSearchIndexTest</a> <!-- method navigator-link -->
</span>
<br/>
</div> <!-- method-list-content failed suite-Command_line_suite -->
</li>
</ul>
</div> <!-- suite-section-content -->
</div> <!-- result-section -->
</div> <!-- navigator-suite-content -->
</div> <!-- rounded-window -->
</div> <!-- suite -->
</div> <!-- navigator-root -->
<div class="wrapper">
<div class="main-panel-root">
<div panel-name="suite-Command_line_suite" class="panel Command_line_suite">
<div class="suite-Command_line_suite-class-failed">
<div class="main-panel-header rounded-window-top">
<img src="failed.png"/>
<span class="class-name">org.vivoweb.vivo.selenium.tests.RebuildSearchIndex</span>
</div> <!-- main-panel-header rounded-window-top -->
<div class="main-panel-content rounded-window-bottom">
<div class="method">
<div class="method-content">
<a name="rebuildSearchIndexTest">
</a> <!-- rebuildSearchIndexTest -->
<span class="method-name">rebuildSearchIndexTest</span>
<div class="stack-trace">org.openqa.selenium.NoSuchElementException: Unable to locate element: {&quot;method&quot;:&quot;link text&quot;,&quot;selector&quot;:&quot;Site Admin&quot;}
Command duration or timeout: 1.18 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: &apos;2.48.2&apos;, revision: &apos;41bccdd10cf2c0560f637404c2d96164b67d9d67&apos;, time: &apos;2015-10-09 13:08:06&apos;
System info: host: &apos;Grahams-MBP-2&apos;, ip: &apos;192.168.1.239&apos;, os.name: &apos;Mac OS X&apos;, os.arch: &apos;x86_64&apos;, os.version: &apos;10.11.3&apos;, java.version: &apos;1.8.0_60&apos;
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=43.0.4, platform=MAC, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 0454c462-95d4-4143-85a7-404602e998cd
*** Element info: {Using=link text, value=Site Admin}
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:647)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:353)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByLinkText(RemoteWebDriver.java:418)
at org.openqa.selenium.By$ByLinkText.findElement(By.java:246)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:345)
at org.vivoweb.vivo.selenium.tests.AbstractSeleniumTest.clickAndWait(AbstractSeleniumTest.java:46)
at org.vivoweb.vivo.selenium.tests.RebuildSearchIndex.rebuildSearchIndexTest(RebuildSearchIndex.java:15)
at org.vivoweb.vivo.selenium.suites.Suite2.suite2(Suite2.java:18)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate element: {&quot;method&quot;:&quot;link text&quot;,&quot;selector&quot;:&quot;Site Admin&quot;}
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: &apos;2.48.2&apos;, revision: &apos;41bccdd10cf2c0560f637404c2d96164b67d9d67&apos;, time: &apos;2015-10-09 13:08:06&apos;
System info: host: &apos;Grahams-MBP-2&apos;, ip: &apos;192.168.1.239&apos;, os.name: &apos;Mac OS X&apos;, os.arch: &apos;x86_64&apos;, os.version: &apos;10.11.3&apos;, java.version: &apos;1.8.0_60&apos;
Driver info: driver.version: unknown
at &lt;anonymous class&gt;.FirefoxDriver.prototype.findElementInternal_(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:10659)
at &lt;anonymous class&gt;.FirefoxDriver.prototype.findElement(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:10668)
at &lt;anonymous class&gt;.DelayedCommand.prototype.executeInternal_/h(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12534)
at &lt;anonymous class&gt;.DelayedCommand.prototype.executeInternal_(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12539)
at &lt;anonymous class&gt;.DelayedCommand.prototype.execute/&lt;(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12481)
... Removed 46 stack frames
</div> <!-- stack-trace -->
</div> <!-- method-content -->
</div> <!-- method -->
</div> <!-- main-panel-content rounded-window-bottom -->
</div> <!-- suite-Command_line_suite-class-failed -->
</div> <!-- panel Command_line_suite -->
<div panel-name="test-xml-Command_line_suite" class="panel">
<div class="main-panel-header rounded-window-top">
</div> <!-- main-panel-header rounded-window-top -->
<div class="main-panel-content rounded-window-bottom">
<pre>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE suite SYSTEM &quot;http://testng.org/testng-1.0.dtd&quot;&gt;
&lt;suite name=&quot;Command line suite&quot;&gt;
&lt;test name=&quot;Command line test&quot; preserve-order=&quot;false&quot;&gt;
&lt;classes&gt;
&lt;class name=&quot;org.vivoweb.vivo.selenium.tests.RebuildSearchIndex&quot;/&gt;
&lt;/classes&gt;
&lt;/test&gt; &lt;!-- Command line test --&gt;
&lt;test name=&quot;Command line test(failed)&quot;&gt;
&lt;classes&gt;
&lt;class name=&quot;org.vivoweb.vivo.selenium.tests.RebuildSearchIndex&quot;&gt;
&lt;methods&gt;
&lt;include name=&quot;cleanup&quot;/&gt;
&lt;include name=&quot;rebuildSearchIndexTest&quot;/&gt;
&lt;include name=&quot;vivoSetup&quot;/&gt;
&lt;include name=&quot;setUp&quot;/&gt;
&lt;include name=&quot;vivoTeardown&quot;/&gt;
&lt;include name=&quot;setup&quot;/&gt;
&lt;/methods&gt;
&lt;/class&gt; &lt;!-- org.vivoweb.vivo.selenium.tests.RebuildSearchIndex --&gt;
&lt;/classes&gt;
&lt;/test&gt; &lt;!-- Command line test(failed) --&gt;
&lt;/suite&gt; &lt;!-- Command line suite --&gt;
</pre>
</div> <!-- main-panel-content rounded-window-bottom -->
</div> <!-- panel -->
<div panel-name="testlist-Command_line_suite" class="panel">
<div class="main-panel-header rounded-window-top">
<span class="header-content">Tests for Command line suite</span>
</div> <!-- main-panel-header rounded-window-top -->
<div class="main-panel-content rounded-window-bottom">
<ul>
<li>
<span class="test-name">Command line test (1 class)</span>
</li>
<li>
<span class="test-name">Command line test(failed) (1 class)</span>
</li>
</ul>
</div> <!-- main-panel-content rounded-window-bottom -->
</div> <!-- panel -->
<div panel-name="group-Command_line_suite" class="panel">
<div class="main-panel-header rounded-window-top">
<span class="header-content">Groups for Command line suite</span>
</div> <!-- main-panel-header rounded-window-top -->
<div class="main-panel-content rounded-window-bottom">
</div> <!-- main-panel-content rounded-window-bottom -->
</div> <!-- panel -->
<div panel-name="times-Command_line_suite" class="panel">
<div class="main-panel-header rounded-window-top">
<span class="header-content">Times for Command line suite</span>
</div> <!-- main-panel-header rounded-window-top -->
<div class="main-panel-content rounded-window-bottom">
<div class="times-div">
<script type="text/javascript">
suiteTableInitFunctions.push('tableData_Command_line_suite');
function tableData_Command_line_suite() {
var data = new google.visualization.DataTable();
data.addColumn('number', 'Number');
data.addColumn('string', 'Method');
data.addColumn('string', 'Class');
data.addColumn('number', 'Time (ms)');
data.addRows(1);
data.setCell(0, 0, 0)
data.setCell(0, 1, 'rebuildSearchIndexTest')
data.setCell(0, 2, 'org.vivoweb.vivo.selenium.tests.RebuildSearchIndex')
data.setCell(0, 3, 1191);
window.suiteTableData['Command_line_suite']= { tableData: data, tableDiv: 'times-div-Command_line_suite'}
return data;
}
</script>
<span class="suite-total-time">Total running time: 1 seconds</span>
<div id="times-div-Command_line_suite">
</div> <!-- times-div-Command_line_suite -->
</div> <!-- times-div -->
</div> <!-- main-panel-content rounded-window-bottom -->
</div> <!-- panel -->
<div panel-name="reporter-Command_line_suite" class="panel">
<div class="main-panel-header rounded-window-top">
<span class="header-content">Reporter output for Command line suite</span>
</div> <!-- main-panel-header rounded-window-top -->
<div class="main-panel-content rounded-window-bottom">
</div> <!-- main-panel-content rounded-window-bottom -->
</div> <!-- panel -->
<div panel-name="ignored-methods-Command_line_suite" class="panel">
<div class="main-panel-header rounded-window-top">
<span class="header-content">0 ignored methods</span>
</div> <!-- main-panel-header rounded-window-top -->
<div class="main-panel-content rounded-window-bottom">
</div> <!-- main-panel-content rounded-window-bottom -->
</div> <!-- panel -->
<div panel-name="chronological-Command_line_suite" class="panel">
<div class="main-panel-header rounded-window-top">
<span class="header-content">Methods in chronological order</span>
</div> <!-- main-panel-header rounded-window-top -->
<div class="main-panel-content rounded-window-bottom">
<div class="chronological-class">
<div class="chronological-class-name">org.vivoweb.vivo.selenium.tests.RebuildSearchIndex</div> <!-- chronological-class-name -->
<div class="configuration-test before">
<span class="method-name">vivoSetup</span>
<span class="method-start">0 ms</span>
</div> <!-- configuration-test before -->
<div class="configuration-class before">
<span class="method-name">setup</span>
<span class="method-start">0 ms</span>
</div> <!-- configuration-class before -->
<div class="configuration-class before">
<span class="method-name">setUp</span>
<span class="method-start">0 ms</span>
</div> <!-- configuration-class before -->
<div class="test-method">
<img src="failed.png">
</img>
<span class="method-name">rebuildSearchIndexTest</span>
<span class="method-start">0 ms</span>
</div> <!-- test-method -->
<div class="configuration-class after">
<span class="method-name">vivoTeardown</span>
<span class="method-start">1191 ms</span>
</div> <!-- configuration-class after -->
<div class="configuration-class after">
<span class="method-name">cleanup</span>
<span class="method-start">1191 ms</span>
</div> <!-- configuration-class after -->
</div> <!-- main-panel-content rounded-window-bottom -->
</div> <!-- panel -->
</div> <!-- main-panel-root -->
</div> <!-- wrapper -->
</body>
</html>

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by org.testng.reporters.JUnitReportReporter -->
<testsuite hostname="Grahams-MBP-2" name="org.vivoweb.vivo.selenium.tests.RebuildSearchIndex" tests="1" failures="0" timestamp="23 Jan 2016 20:20:13 GMT" time="1.191" errors="1">
<testcase name="rebuildSearchIndexTest" time="1.191" classname="org.vivoweb.vivo.selenium.tests.RebuildSearchIndex">
<error type="org.openqa.selenium.NoSuchElementException" message="Unable to locate element: {&quot;method&quot;:&quot;link text&quot;,&quot;selector&quot;:&quot;Site Admin&quot;}
Command duration or timeout: 1.18 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: &#039;2.48.2&#039;, revision: &#039;41bccdd10cf2c0560f637404c2d96164b67d9d67&#039;, time: &#039;2015-10-09 13:08:06&#039;
System info: host: &#039;Grahams-MBP-2&#039;, ip: &#039;192.168.1.239&#039;, os.name: &#039;Mac OS X&#039;, os.arch: &#039;x86_64&#039;, os.version: &#039;10.11.3&#039;, java.version: &#039;1.8.0_60&#039;
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=43.0.4, platform=MAC, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 0454c462-95d4-4143-85a7-404602e998cd
*** Element info: {Using=link text, value=Site Admin}">
<![CDATA[org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"link text","selector":"Site Admin"}
Command duration or timeout: 1.18 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
System info: host: 'Grahams-MBP-2', ip: '192.168.1.239', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.3', java.version: '1.8.0_60'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=43.0.4, platform=MAC, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 0454c462-95d4-4143-85a7-404602e998cd
*** Element info: {Using=link text, value=Site Admin}
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:647)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:353)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByLinkText(RemoteWebDriver.java:418)
at org.openqa.selenium.By$ByLinkText.findElement(By.java:246)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:345)
at org.vivoweb.vivo.selenium.tests.AbstractSeleniumTest.clickAndWait(AbstractSeleniumTest.java:46)
at org.vivoweb.vivo.selenium.tests.RebuildSearchIndex.rebuildSearchIndexTest(RebuildSearchIndex.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:643)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
at org.testng.TestRunner.privateRun(TestRunner.java:782)
at org.testng.TestRunner.run(TestRunner.java:632)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
at org.testng.SuiteRunner.run(SuiteRunner.java:268)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
at org.testng.TestNG.run(TestNG.java:1064)
at org.vivoweb.vivo.selenium.suites.Suite2.suite2(Suite2.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:514)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:215)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
at org.testng.SuiteRunner.run(SuiteRunner.java:268)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
at org.testng.TestNG.run(TestNG.java:1064)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"link text","selector":"Site Admin"}
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
System info: host: 'Grahams-MBP-2', ip: '192.168.1.239', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.3', java.version: '1.8.0_60'
Driver info: driver.version: unknown
at <anonymous class>.FirefoxDriver.prototype.findElementInternal_(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:10659)
at <anonymous class>.FirefoxDriver.prototype.findElement(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:10668)
at <anonymous class>.DelayedCommand.prototype.executeInternal_/h(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12534)
at <anonymous class>.DelayedCommand.prototype.executeInternal_(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12539)
at <anonymous class>.DelayedCommand.prototype.execute/<(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12481)
]]>
</error>
</testcase> <!-- rebuildSearchIndexTest -->
</testsuite> <!-- org.vivoweb.vivo.selenium.tests.RebuildSearchIndex -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

View file

@ -0,0 +1 @@
[SuiteResult context=Command line test]

View file

@ -0,0 +1,44 @@
<table border='1'>
<tr>
<th>Class name</th>
<th>Method name</th>
<th>Groups</th>
</tr><tr>
<td>org.vivoweb.vivo.selenium.tests.RebuildSearchIndex</td>
<td>&nbsp;</td><td>&nbsp;</td></tr>
<tr>
<td align='center' colspan='3'>@Test</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>rebuildSearchIndexTest</td>
<td>&nbsp;</td></tr>
<tr>
<td align='center' colspan='3'>@BeforeClass</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>setup</td>
<td>&nbsp;</td></tr>
<tr>
<td>&nbsp;</td>
<td>setUp</td>
<td>&nbsp;</td></tr>
<tr>
<td align='center' colspan='3'>@BeforeMethod</td>
</tr>
<tr>
<td align='center' colspan='3'>@AfterMethod</td>
</tr>
<tr>
<td align='center' colspan='3'>@AfterClass</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>vivoTeardown</td>
<td>&nbsp;</td></tr>
<tr>
<td>&nbsp;</td>
<td>cleanup</td>
<td>&nbsp;</td></tr>
</table>

View file

@ -0,0 +1 @@
<h2>Groups used for this test run</h2>

View file

@ -0,0 +1,6 @@
<html><head><title>Results for Command line suite</title></head>
<frameset cols="26%,74%">
<frame src="toc.html" name="navFrame">
<frame src="main.html" name="mainFrame">
</frameset>
</html>

View file

@ -0,0 +1,2 @@
<html><head><title>Results for Command line suite</title></head>
<body>Select a result on the left-hand pane.</body></html>

View file

@ -0,0 +1,16 @@
<h2>Methods run, sorted chronologically</h2><h3>&gt;&gt; means before, &lt;&lt; means after</h3><p/><br/><em>Command line suite</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/>
<table border="1">
<tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr>
<tr bgcolor="71cca7"> <td>16/01/23 20:20:13</td> <td>0</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&lt;&lt;AbstractSeleniumTest.cleanup()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]">&lt;&lt;cleanup</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1627960023</td> <td></td> </tr>
<tr bgcolor="aaed64"> <td>16/01/23 20:20:12</td> <td>-1191</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="RebuildSearchIndex.rebuildSearchIndexTest()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]">rebuildSearchIndexTest</td>
<td>main@1627960023</td> <td></td> </tr>
<tr bgcolor="aaed64"> <td>16/01/23 20:20:12</td> <td>-1191</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&gt;&gt;RebuildSearchIndex.setUp()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]">&gt;&gt;setUp</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1627960023</td> <td></td> </tr>
<tr bgcolor="71cca7"> <td>16/01/23 20:20:12</td> <td>-1191</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&gt;&gt;AbstractSeleniumTest.setup()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]">&gt;&gt;setup</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1627960023</td> <td></td> </tr>
<tr bgcolor="febc6f"> <td>16/01/23 20:20:12</td> <td>-1191</td> <td>&nbsp;</td><td title="&gt;&gt;AbstractVIVOSeleniumTest.vivoSetup()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]">&gt;&gt;vivoSetup</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1627960023</td> <td></td> </tr>
<tr bgcolor="febc6f"> <td>16/01/23 20:20:13</td> <td>0</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&lt;&lt;AbstractVIVOSeleniumTest.vivoTeardown()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]">&lt;&lt;vivoTeardown</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1627960023</td> <td></td> </tr>
</table>

View file

@ -0,0 +1,2 @@
<h2>Methods that were not run</h2><table>
</table>

View file

@ -0,0 +1,16 @@
<h2>Methods run, sorted chronologically</h2><h3>&gt;&gt; means before, &lt;&lt; means after</h3><p/><br/><em>Command line suite</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/>
<table border="1">
<tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr>
<tr bgcolor="febc6f"> <td>16/01/23 20:20:12</td> <td>0</td> <td>&nbsp;</td><td title="&gt;&gt;AbstractVIVOSeleniumTest.vivoSetup()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]">&gt;&gt;vivoSetup</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1627960023</td> <td></td> </tr>
<tr bgcolor="71cca7"> <td>16/01/23 20:20:12</td> <td>0</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&gt;&gt;AbstractSeleniumTest.setup()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]">&gt;&gt;setup</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1627960023</td> <td></td> </tr>
<tr bgcolor="aaed64"> <td>16/01/23 20:20:12</td> <td>0</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&gt;&gt;RebuildSearchIndex.setUp()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]">&gt;&gt;setUp</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1627960023</td> <td></td> </tr>
<tr bgcolor="aaed64"> <td>16/01/23 20:20:12</td> <td>0</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="RebuildSearchIndex.rebuildSearchIndexTest()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]">rebuildSearchIndexTest</td>
<td>main@1627960023</td> <td></td> </tr>
<tr bgcolor="febc6f"> <td>16/01/23 20:20:13</td> <td>1191</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&lt;&lt;AbstractVIVOSeleniumTest.vivoTeardown()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]">&lt;&lt;vivoTeardown</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1627960023</td> <td></td> </tr>
<tr bgcolor="71cca7"> <td>16/01/23 20:20:13</td> <td>1191</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&lt;&lt;AbstractSeleniumTest.cleanup()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]">&lt;&lt;cleanup</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1627960023</td> <td></td> </tr>
</table>

View file

@ -0,0 +1 @@
<h2>Reporter output</h2><table></table>

View file

@ -0,0 +1 @@
<html><head><title>testng.xml for Command line suite</title></head><body><tt>&lt;?xml&nbsp;version="1.0"&nbsp;encoding="UTF-8"?&gt;<br/>&lt;!DOCTYPE&nbsp;suite&nbsp;SYSTEM&nbsp;"http://testng.org/testng-1.0.dtd"&gt;<br/>&lt;suite&nbsp;name="Command&nbsp;line&nbsp;suite"&gt;<br/>&nbsp;&nbsp;&lt;test&nbsp;name="Command&nbsp;line&nbsp;test"&nbsp;preserve-order="false"&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;classes&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;class&nbsp;name="org.vivoweb.vivo.selenium.tests.RebuildSearchIndex"/&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/classes&gt;<br/>&nbsp;&nbsp;&lt;/test&gt;&nbsp;&lt;!--&nbsp;Command&nbsp;line&nbsp;test&nbsp;--&gt;<br/>&nbsp;&nbsp;&lt;test&nbsp;name="Command&nbsp;line&nbsp;test(failed)"&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;classes&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;class&nbsp;name="org.vivoweb.vivo.selenium.tests.RebuildSearchIndex"&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;methods&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;include&nbsp;name="cleanup"/&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;include&nbsp;name="rebuildSearchIndexTest"/&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;include&nbsp;name="vivoSetup"/&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;include&nbsp;name="setUp"/&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;include&nbsp;name="vivoTeardown"/&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;include&nbsp;name="setup"/&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/methods&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/class&gt;&nbsp;&lt;!--&nbsp;org.vivoweb.vivo.selenium.tests.RebuildSearchIndex&nbsp;--&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/classes&gt;<br/>&nbsp;&nbsp;&lt;/test&gt;&nbsp;&lt;!--&nbsp;Command&nbsp;line&nbsp;test(failed)&nbsp;--&gt;<br/>&lt;/suite&gt;&nbsp;&lt;!--&nbsp;Command&nbsp;line&nbsp;suite&nbsp;--&gt;<br/></tt></body></html>

View file

@ -0,0 +1,30 @@
<html>
<head>
<title>Results for Command line suite</title>
<link href="../testng.css" rel="stylesheet" type="text/css" />
<link href="../my-testng.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h3><p align="center">Results for<br/><em>Command line suite</em></p></h3>
<table border='1' width='100%'>
<tr valign='top'>
<td>1 test</td>
<td><a target='mainFrame' href='classes.html'>1 class</a></td>
<td>1 method:<br/>
&nbsp;&nbsp;<a target='mainFrame' href='methods.html'>chronological</a><br/>
&nbsp;&nbsp;<a target='mainFrame' href='methods-alphabetical.html'>alphabetical</a><br/>
&nbsp;&nbsp;<a target='mainFrame' href='methods-not-run.html'>not run (0)</a></td>
</tr>
<tr>
<td><a target='mainFrame' href='groups.html'>0 group</a></td>
<td><a target='mainFrame' href='reporter-output.html'>reporter output</a></td>
<td><a target='mainFrame' href='testng.xml.html'>testng.xml</a></td>
</tr></table>
<table width='100%' class='test-failed'>
<tr><td>
<table style='width: 100%'><tr><td valign='top'>Command line test (0/1/0)</td><td valign='top' align='right'>
<a href='Command line test.html' target='mainFrame'>Results</a>
</td></tr></table>
</td></tr><p/>
</table>
</body></html>

View file

@ -0,0 +1,9 @@
<html>
<head><title>Test results</title><link href="./testng.css" rel="stylesheet" type="text/css" />
<link href="./my-testng.css" rel="stylesheet" type="text/css" />
</head><body>
<h2><p align='center'>Test results</p></h2>
<table border='1' width='100%' class='main-page'><tr><th>Suite</th><th>Passed</th><th>Failed</th><th>Skipped</th><th>testng.xml</th></tr>
<tr align='center' class='invocation-failed'><td><em>Total</em></td><td><em>0</em></td><td><em>1</em></td><td><em>0</em></td><td>&nbsp;</td></tr>
<tr align='center' class='invocation-failed'><td><a href='Command line suite/index.html'>Command line suite</a></td>
<td>0</td><td>1</td><td>0</td><td><a href='Command line suite/testng.xml.html'>Link</a></td></tr></table></body></html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,019 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Failed suite [Command line suite]">
<test name="Command line test" preserve-order="false">
<classes>
<class name="org.vivoweb.vivo.selenium.tests.RebuildSearchIndex"/>
</classes>
</test> <!-- Command line test -->
<test name="Command line test(failed)">
<classes>
<class name="org.vivoweb.vivo.selenium.tests.RebuildSearchIndex">
<methods>
<include name="cleanup"/>
<include name="rebuildSearchIndexTest"/>
<include name="vivoSetup"/>
<include name="setUp"/>
<include name="vivoTeardown"/>
<include name="setup"/>
</methods>
</class> <!-- org.vivoweb.vivo.selenium.tests.RebuildSearchIndex -->
</classes>
</test> <!-- Command line test(failed) -->
</suite> <!-- Failed suite [Command line suite] -->

View file

@ -0,0 +1,309 @@
body {
margin: 0px 0px 5px 5px;
}
ul {
margin: 0px;
}
li {
list-style-type: none;
}
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.navigator-selected {
background: #ffa500;
}
.wrapper {
position: absolute;
top: 60px;
bottom: 0;
left: 400px;
right: 0;
overflow: auto;
}
.navigator-root {
position: absolute;
top: 60px;
bottom: 0;
left: 0;
width: 400px;
overflow-y: auto;
}
.suite {
margin: 0px 10px 10px 0px;
background-color: #fff8dc;
}
.suite-name {
padding-left: 10px;
font-size: 25px;
font-family: Times;
}
.main-panel-header {
padding: 5px;
background-color: #9FB4D9; //afeeee;
font-family: monospace;
font-size: 18px;
}
.main-panel-content {
padding: 5px;
margin-bottom: 10px;
background-color: #DEE8FC; //d0ffff;
}
.rounded-window {
border-radius: 10px;
border-style: solid;
border-width: 1px;
}
.rounded-window-top {
border-top-right-radius: 10px 10px;
border-top-left-radius: 10px 10px;
border-style: solid;
border-width: 1px;
overflow: auto;
}
.light-rounded-window-top {
border-top-right-radius: 10px 10px;
border-top-left-radius: 10px 10px;
}
.rounded-window-bottom {
border-style: solid;
border-width: 0px 1px 1px 1px;
border-bottom-right-radius: 10px 10px;
border-bottom-left-radius: 10px 10px;
overflow: auto;
}
.method-name {
font-size: 12px;
font-family: monospace;
}
.method-content {
border-style: solid;
border-width: 0px 0px 1px 0px;
margin-bottom: 10;
padding-bottom: 5px;
width: 80%;
}
.parameters {
font-size: 14px;
font-family: monospace;
}
.stack-trace {
white-space: pre;
font-family: monospace;
font-size: 12px;
font-weight: bold;
margin-top: 0px;
margin-left: 20px;
}
.testng-xml {
font-family: monospace;
}
.method-list-content {
margin-left: 10px;
}
.navigator-suite-content {
margin-left: 10px;
font: 12px 'Lucida Grande';
}
.suite-section-title {
margin-top: 10px;
width: 80%;
border-style: solid;
border-width: 1px 0px 0px 0px;
font-family: Times;
font-size: 18px;
font-weight: bold;
}
.suite-section-content {
list-style-image: url(bullet_point.png);
}
.top-banner-root {
position: absolute;
top: 0;
height: 45px;
left: 0;
right: 0;
padding: 5px;
margin: 0px 0px 5px 0px;
background-color: #0066ff;
font-family: Times;
color: #fff;
text-align: center;
}
.top-banner-title-font {
font-size: 25px;
}
.test-name {
font-family: 'Lucida Grande';
font-size: 16px;
}
.suite-icon {
padding: 5px;
float: right;
height: 20;
}
.test-group {
font: 20px 'Lucida Grande';
margin: 5px 5px 10px 5px;
border-width: 0px 0px 1px 0px;
border-style: solid;
padding: 5px;
}
.test-group-name {
font-weight: bold;
}
.method-in-group {
font-size: 16px;
margin-left: 80px;
}
table.google-visualization-table-table {
width: 100%;
}
.reporter-method-name {
font-size: 14px;
font-family: monospace;
}
.reporter-method-output-div {
padding: 5px;
margin: 0px 0px 5px 20px;
font-size: 12px;
font-family: monospace;
border-width: 0px 0px 0px 1px;
border-style: solid;
}
.ignored-class-div {
font-size: 14px;
font-family: monospace;
}
.ignored-methods-div {
padding: 5px;
margin: 0px 0px 5px 20px;
font-size: 12px;
font-family: monospace;
border-width: 0px 0px 0px 1px;
border-style: solid;
}
.border-failed {
border-top-left-radius: 10px 10px;
border-bottom-left-radius: 10px 10px;
border-style: solid;
border-width: 0px 0px 0px 10px;
border-color: #f00;
}
.border-skipped {
border-top-left-radius: 10px 10px;
border-bottom-left-radius: 10px 10px;
border-style: solid;
border-width: 0px 0px 0px 10px;
border-color: #edc600;
}
.border-passed {
border-top-left-radius: 10px 10px;
border-bottom-left-radius: 10px 10px;
border-style: solid;
border-width: 0px 0px 0px 10px;
border-color: #19f52d;
}
.times-div {
text-align: center;
padding: 5px;
}
.suite-total-time {
font: 16px 'Lucida Grande';
}
.configuration-suite {
margin-left: 20px;
}
.configuration-test {
margin-left: 40px;
}
.configuration-class {
margin-left: 60px;
}
.configuration-method {
margin-left: 80px;
}
.test-method {
margin-left: 100px;
}
.chronological-class {
background-color: #0ccff;
border-style: solid;
border-width: 0px 0px 1px 1px;
}
.method-start {
float: right;
}
.chronological-class-name {
padding: 0px 0px 0px 5px;
color: #008;
}
.after, .before, .test-method {
font-family: monospace;
font-size: 14px;
}
.navigator-suite-header {
font-size: 22px;
margin: 0px 10px 5px 0px;
background-color: #deb887;
text-align: center;
}
.collapse-all-icon {
padding: 5px;
float: right;
}

View file

@ -0,0 +1,122 @@
$(document).ready(function() {
$('a.navigator-link').click(function() {
// Extract the panel for this link
var panel = getPanelName($(this));
// Mark this link as currently selected
$('.navigator-link').parent().removeClass('navigator-selected');
$(this).parent().addClass('navigator-selected');
showPanel(panel);
});
installMethodHandlers('failed');
installMethodHandlers('skipped');
installMethodHandlers('passed', true); // hide passed methods by default
$('a.method').click(function() {
showMethod($(this));
return false;
});
// Hide all the panels and display the first one (do this last
// to make sure the click() will invoke the listeners)
$('.panel').hide();
$('.navigator-link').first().click();
// Collapse/expand the suites
$('a.collapse-all-link').click(function() {
var contents = $('.navigator-suite-content');
if (contents.css('display') == 'none') {
contents.show();
} else {
contents.hide();
}
});
});
// The handlers that take care of showing/hiding the methods
function installMethodHandlers(name, hide) {
function getContent(t) {
return $('.method-list-content.' + name + "." + t.attr('panel-name'));
}
function getHideLink(t, name) {
var s = 'a.hide-methods.' + name + "." + t.attr('panel-name');
return $(s);
}
function getShowLink(t, name) {
return $('a.show-methods.' + name + "." + t.attr('panel-name'));
}
function getMethodPanelClassSel(element, name) {
var panelName = getPanelName(element);
var sel = '.' + panelName + "-class-" + name;
return $(sel);
}
$('a.hide-methods.' + name).click(function() {
var w = getContent($(this));
w.hide();
getHideLink($(this), name).hide();
getShowLink($(this), name).show();
getMethodPanelClassSel($(this), name).hide();
});
$('a.show-methods.' + name).click(function() {
var w = getContent($(this));
w.show();
getHideLink($(this), name).show();
getShowLink($(this), name).hide();
showPanel(getPanelName($(this)));
getMethodPanelClassSel($(this), name).show();
});
if (hide) {
$('a.hide-methods.' + name).click();
} else {
$('a.show-methods.' + name).click();
}
}
function getHashForMethod(element) {
return element.attr('hash-for-method');
}
function getPanelName(element) {
return element.attr('panel-name');
}
function showPanel(panelName) {
$('.panel').hide();
var panel = $('.panel[panel-name="' + panelName + '"]');
panel.show();
}
function showMethod(element) {
var hashTag = getHashForMethod(element);
var panelName = getPanelName(element);
showPanel(panelName);
var current = document.location.href;
var base = current.substring(0, current.indexOf('#'))
document.location.href = base + '#' + hashTag;
var newPosition = $(document).scrollTop() - 65;
$(document).scrollTop(newPosition);
}
function drawTable() {
for (var i = 0; i < suiteTableInitFunctions.length; i++) {
window[suiteTableInitFunctions[i]]();
}
for (var k in window.suiteTableData) {
var v = window.suiteTableData[k];
var div = v.tableDiv;
var data = v.tableData
var table = new google.visualization.Table(document.getElementById(div));
table.draw(data, {
showRowNumber : false
});
}
}

View file

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<testng-results skipped="0" failed="1" total="1" passed="0">
<reporter-output>
</reporter-output>
<suite name="Command line suite" duration-ms="1334" started-at="2016-01-23T20:20:12Z" finished-at="2016-01-23T20:20:13Z">
<groups>
</groups>
<test name="Command line test" duration-ms="1334" started-at="2016-01-23T20:20:12Z" finished-at="2016-01-23T20:20:13Z">
<class name="org.vivoweb.vivo.selenium.tests.RebuildSearchIndex">
<test-method status="PASS" signature="setup()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]" name="setup" is-config="true" duration-ms="0" started-at="2016-01-23T20:20:12Z" finished-at="2016-01-23T20:20:12Z">
<reporter-output>
</reporter-output>
</test-method> <!-- setup -->
<test-method status="PASS" signature="setUp()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]" name="setUp" is-config="true" duration-ms="0" started-at="2016-01-23T20:20:12Z" finished-at="2016-01-23T20:20:12Z">
<reporter-output>
</reporter-output>
</test-method> <!-- setUp -->
<test-method status="PASS" signature="vivoSetup()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]" name="vivoSetup" is-config="true" duration-ms="0" started-at="2016-01-23T20:20:12Z" finished-at="2016-01-23T20:20:12Z">
<reporter-output>
</reporter-output>
</test-method> <!-- vivoSetup -->
<test-method status="FAIL" signature="rebuildSearchIndexTest()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]" name="rebuildSearchIndexTest" duration-ms="1191" started-at="2016-01-23T20:20:12Z" finished-at="2016-01-23T20:20:13Z">
<exception class="org.openqa.selenium.NoSuchElementException">
<message>
<![CDATA[Unable to locate element: {"method":"link text","selector":"Site Admin"}
Command duration or timeout: 1.18 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
System info: host: 'Grahams-MBP-2', ip: '192.168.1.239', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.3', java.version: '1.8.0_60'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=43.0.4, platform=MAC, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 0454c462-95d4-4143-85a7-404602e998cd
*** Element info: {Using=link text, value=Site Admin}]]>
</message>
<full-stacktrace>
<![CDATA[org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"link text","selector":"Site Admin"}
Command duration or timeout: 1.18 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
System info: host: 'Grahams-MBP-2', ip: '192.168.1.239', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.3', java.version: '1.8.0_60'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=43.0.4, platform=MAC, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 0454c462-95d4-4143-85a7-404602e998cd
*** Element info: {Using=link text, value=Site Admin}
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:647)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:353)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByLinkText(RemoteWebDriver.java:418)
at org.openqa.selenium.By$ByLinkText.findElement(By.java:246)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:345)
at org.vivoweb.vivo.selenium.tests.AbstractSeleniumTest.clickAndWait(AbstractSeleniumTest.java:46)
at org.vivoweb.vivo.selenium.tests.RebuildSearchIndex.rebuildSearchIndexTest(RebuildSearchIndex.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:643)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
at org.testng.TestRunner.privateRun(TestRunner.java:782)
at org.testng.TestRunner.run(TestRunner.java:632)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
at org.testng.SuiteRunner.run(SuiteRunner.java:268)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
at org.testng.TestNG.run(TestNG.java:1064)
at org.vivoweb.vivo.selenium.suites.Suite2.suite2(Suite2.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:514)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:215)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
at org.testng.SuiteRunner.run(SuiteRunner.java:268)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
at org.testng.TestNG.run(TestNG.java:1064)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"link text","selector":"Site Admin"}
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
System info: host: 'Grahams-MBP-2', ip: '192.168.1.239', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.3', java.version: '1.8.0_60'
Driver info: driver.version: unknown
at <anonymous class>.FirefoxDriver.prototype.findElementInternal_(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:10659)
at <anonymous class>.FirefoxDriver.prototype.findElement(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:10668)
at <anonymous class>.DelayedCommand.prototype.executeInternal_/h(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12534)
at <anonymous class>.DelayedCommand.prototype.executeInternal_(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12539)
at <anonymous class>.DelayedCommand.prototype.execute/<(file:///var/folders/7d/pmw9wv8n4nz_x9t4ztp_6tgw0000gn/T/anonymous8499514178617750884webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12481)
]]>
</full-stacktrace>
</exception> <!-- org.openqa.selenium.NoSuchElementException -->
<reporter-output>
</reporter-output>
</test-method> <!-- rebuildSearchIndexTest -->
<test-method status="PASS" signature="vivoTeardown()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]" name="vivoTeardown" is-config="true" duration-ms="0" started-at="2016-01-23T20:20:13Z" finished-at="2016-01-23T20:20:13Z">
<reporter-output>
</reporter-output>
</test-method> <!-- vivoTeardown -->
<test-method status="PASS" signature="cleanup()[pri:0, instance:org.vivoweb.vivo.selenium.tests.RebuildSearchIndex@1cf56a1c]" name="cleanup" is-config="true" duration-ms="142" started-at="2016-01-23T20:20:13Z" finished-at="2016-01-23T20:20:13Z">
<reporter-output>
</reporter-output>
</test-method> <!-- cleanup -->
</class> <!-- org.vivoweb.vivo.selenium.tests.RebuildSearchIndex -->
</test> <!-- Command line test -->
</suite> <!-- Command line suite -->
</testng-results>

View file

@ -0,0 +1,9 @@
.invocation-failed, .test-failed { background-color: #DD0000; }
.invocation-percent, .test-percent { background-color: #006600; }
.invocation-passed, .test-passed { background-color: #00AA00; }
.invocation-skipped, .test-skipped { background-color: #CCCC00; }
.main-page {
font-size: x-large;
}

View file

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#"
xmlns:auth="http://vitro.mannlib.cornell.edu/ns/vitro/authorization#"
xmlns="http://vitro.mannlib.cornell.edu/ns/vitro/default#"
xml:base="http://vitro.mannlib.cornell.edu/ns/vitro/default">
<auth:UserAccount rdf:about="http://vivo.mydomain.edu/individual/TestAdmin">
<auth:emailAddress rdf:datatype="http://www.w3.org/2001/XMLSchema#string">testAdmin@cornell.edu</auth:emailAddress>
<auth:externalAuthId rdf:datatype="http://www.w3.org/2001/XMLSchema#string">testAdmin</auth:externalAuthId>
<auth:firstName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Test</auth:firstName>
<auth:lastName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Admin</auth:lastName>
<auth:md5password rdf:datatype="http://www.w3.org/2001/XMLSchema#string">DC647EB65E6711E155375218212B3964</auth:md5password>
<auth:status rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ACTIVE</auth:status>
<auth:loginCount rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</auth:loginCount>
<auth:passwordLinkExpires rdf:datatype="http://www.w3.org/2001/XMLSchema#long">0</auth:passwordLinkExpires>
<auth:hasPermissionSet rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/authorization#ADMIN"/>
</auth:UserAccount>
<auth:UserAccount rdf:about="http://vivo.mydomain.edu/individual/JohnCurator">
<auth:emailAddress rdf:datatype="http://www.w3.org/2001/XMLSchema#string">johnCurator@cornell.edu</auth:emailAddress>
<auth:externalAuthId rdf:datatype="http://www.w3.org/2001/XMLSchema#string">johnCurator</auth:externalAuthId>
<auth:firstName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">John</auth:firstName>
<auth:lastName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Curator</auth:lastName>
<auth:md5password rdf:datatype="http://www.w3.org/2001/XMLSchema#string">DC647EB65E6711E155375218212B3964</auth:md5password>
<auth:status rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ACTIVE</auth:status>
<auth:loginCount rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</auth:loginCount>
<auth:passwordLinkExpires rdf:datatype="http://www.w3.org/2001/XMLSchema#long">0</auth:passwordLinkExpires>
<auth:hasPermissionSet rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/authorization#CURATOR"/>
</auth:UserAccount>
<auth:UserAccount rdf:about="http://vivo.mydomain.edu/individual/SallyEditor">
<auth:emailAddress rdf:datatype="http://www.w3.org/2001/XMLSchema#string">sallyEditor@cornell.edu</auth:emailAddress>
<auth:externalAuthId rdf:datatype="http://www.w3.org/2001/XMLSchema#string">sallyEditor</auth:externalAuthId>
<auth:firstName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Sally</auth:firstName>
<auth:lastName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Editor</auth:lastName>
<auth:md5password rdf:datatype="http://www.w3.org/2001/XMLSchema#string">DC647EB65E6711E155375218212B3964</auth:md5password>
<auth:status rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ACTIVE</auth:status>
<auth:loginCount rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</auth:loginCount>
<auth:passwordLinkExpires rdf:datatype="http://www.w3.org/2001/XMLSchema#long">0</auth:passwordLinkExpires>
<auth:hasPermissionSet rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/authorization#EDITOR"/>
</auth:UserAccount>
<auth:UserAccount rdf:about="http://vivo.mydomain.edu/individual/JoeUser">
<auth:emailAddress rdf:datatype="http://www.w3.org/2001/XMLSchema#string">joeUser@cornell.edu</auth:emailAddress>
<auth:externalAuthId rdf:datatype="http://www.w3.org/2001/XMLSchema#string">joeUser</auth:externalAuthId>
<auth:firstName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Joe</auth:firstName>
<auth:lastName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">User</auth:lastName>
<auth:md5password rdf:datatype="http://www.w3.org/2001/XMLSchema#string">DC647EB65E6711E155375218212B3964</auth:md5password>
<auth:status rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ACTIVE</auth:status>
<auth:loginCount rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</auth:loginCount>
<auth:passwordLinkExpires rdf:datatype="http://www.w3.org/2001/XMLSchema#long">0</auth:passwordLinkExpires>
<auth:hasPermissionSet rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/authorization#SELF_EDITOR"/>
</auth:UserAccount>
</rdf:RDF>

View file

@ -22,6 +22,7 @@
?org
?orgLabel
?title
?dateTimeEnd
WHERE {
?subject ?property ?person .
OPTIONAL { ?person core:relatedBy ?position .
@ -42,8 +43,13 @@
?org a foaf:Organization .
?org rdfs:label ?orgLabel
}
OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd .
FILTER ( ?dateTimeEnd &lt; now() )
}
ORDER BY (fn:lower-case(?personName))
}
ORDER BY (fn:lower-case(?personName)) (bound(?dateTimeEnd)) desc(?dateTimeEnd)
</query-select>
<query-construct>
@ -59,6 +65,9 @@
?position core:relates ?org .
?org a foaf:Organization .
?org rdfs:label ?orgName .
?position core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?endDate .
?endDate core:dateTime ?endDateValue .
} WHERE {
{
?subject ?property ?person
@ -84,6 +93,13 @@
?position core:relates ?org .
?org a foaf:Organization .
?org rdfs:label ?orgName
} UNION {
?subject ?property ?person .
?person core:relatedBy ?position .
?position a core:Position .
?position core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?endDate .
?endDate core:dateTime ?endDateValue
}
}
</query-construct>

View file

@ -14,6 +14,7 @@
<#local linkedIndividual>
<a href="${profileUrl(statement.uri("person"))}" title="${i18n().person_name}">${statement.personName!}</a>
</#local>
<#if !(statement.dateTimeEnd?has_content)>
<#if statement.title?has_content >
<#local posnTitle = statement.title>
<#elseif statement.posnLabel?has_content>
@ -24,6 +25,7 @@
<a href="${profileUrl(statement.uri("org"))}" title="${i18n().organization_name}">${statement.orgLabel!""}</a>
</#local>
</#if>
</#if>
<@s.join [ linkedIndividual, posnTitle!, orgString! ] />
</#macro>