mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 21:15:50 +00:00
Renamed AddVisitTest to AddVisitIT
This commit is contained in:
parent
f8f68bfb82
commit
a1de7e2ca3
1 changed files with 41 additions and 0 deletions
41
src/test/java/nl/utwente/bpsd/selenium/AddVisitIT.java
Normal file
41
src/test/java/nl/utwente/bpsd/selenium/AddVisitIT.java
Normal file
|
@ -0,0 +1,41 @@
|
|||
package nl.utwente.bpsd.selenium;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.WebElement;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Martijn
|
||||
* @since 21-6-2017.
|
||||
*/
|
||||
public class AddVisitIT extends SeleniumBaseIT {
|
||||
public AddVisitIT() throws MalformedURLException {
|
||||
super();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Category(SeleniumBaseIT.class)
|
||||
public void addOwnerTest() {
|
||||
driver.findElement(By.name("lastName")).submit();
|
||||
|
||||
//Go to first owner
|
||||
WebElement table = driver.findElement(By.tagName("table"));
|
||||
List<WebElement> cells = table.findElements(By.xpath("tr/td"));
|
||||
cells.get(0).findElement(By.xpath("a")).click();
|
||||
|
||||
//Go to edit page of first pet
|
||||
driver.findElement(By.xpath("//table//tr/td/table/tbody//a[text()='Edit Pet']")).click();
|
||||
|
||||
//Edit Name of pet
|
||||
fillTextField(By.name("name"), "foobar");
|
||||
driver.findElement(By.name("name")).submit();
|
||||
|
||||
Assert.assertNotNull(driver.findElement(By.xpath("//table//tr/td/dl/dd/[contains(text(), 'foobar')]")));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue