Skip to content
Snippets Groups Projects
Commit 9ddd9e0f authored by Matthew Williams's avatar Matthew Williams
Browse files

Start to work on selenium test

parent ae245554
No related branches found
No related tags found
1 merge request!22Merge UC92 into Master
......@@ -14,6 +14,7 @@ public class ViewAllPreregisteredPatientsTest extends iTrustSeleniumTest {
public void setUp() throws Exception {
super.setUp();
gen.standardData();
gen.patient92();
driver = new HtmlUnitDriver();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}
......@@ -28,7 +29,7 @@ public class ViewAllPreregisteredPatientsTest extends iTrustSeleniumTest {
// Make sure we were able to log in
assertEquals("iTrust - HCP Home", driver.getTitle());
driver.findElement(By.cssSelector("h2.panel-title")).click();
driver.findElement(By.linkText("All Patients")).click();
driver.findElement(By.linkText("View Pre-Registered Patients")).click();
String text = driver.findElement(By.cssSelector("table.fTable")).getText();
assertTrue("Text not found!", text.contains("10/10/2008"));
assertTrue("Text not found!", text.contains("09/14/2009"));
......
......@@ -20,17 +20,21 @@ public class ViewPreRegisteredPatientListActionTest extends TestCase {
protected void setUp() throws Exception {
gen = new TestDataGenerator();
gen.clearAllTables();
gen.patient4();
gen.hcp3();
}
public void testViewPatients() throws Exception {
action = new ViewPreRegisteredPatientListAction(factory);
List<PatientBean> pb = action.getPreRegisteredPatients();
assertEquals(pb.get(0).getMID(), 4);
assertEquals(0, pb.size());
gen.patient92();
gen.patient4();
pb = action.getPreRegisteredPatients();
assertEquals(1, pb.size());
assertEquals(492, pb.get(0).getMID());
}
public void testNoPersonnel() throws Exception {
gen.patient92();
action = new ViewPreRegisteredPatientListAction(factory);
List<PatientBean> pb = action.getPreRegisteredPatients();
for (PatientBean p : pb) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment