Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cs427fa20team22
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
htmoss2
cs427fa20team22
Commits
790f917b
Commit
790f917b
authored
4 years ago
by
mjw11
Browse files
Options
Downloads
Patches
Plain Diff
Add ViewAllPreregisteredPatientsTest selenium test
parent
c91668fc
No related branches found
Branches containing commit
No related tags found
1 merge request
!22
Merge UC92 into Master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iTrust/test/edu/ncsu/csc/itrust/selenium/ViewAllPreregisteredPatientsTest.java
+49
-0
49 additions, 0 deletions
...csc/itrust/selenium/ViewAllPreregisteredPatientsTest.java
with
49 additions
and
0 deletions
iTrust/test/edu/ncsu/csc/itrust/selenium/ViewAllPreregisteredPatientsTest.java
0 → 100644
+
49
−
0
View file @
790f917b
package
edu.ncsu.csc.itrust.selenium
;
import
java.util.concurrent.TimeUnit
;
import
org.junit.*
;
import
org.openqa.selenium.*
;
import
org.openqa.selenium.htmlunit.HtmlUnitDriver
;
public
class
ViewAllPreregisteredPatientsTest
extends
iTrustSeleniumTest
{
private
WebDriver
driver
;
private
StringBuffer
verificationErrors
=
new
StringBuffer
();
@Before
public
void
setUp
()
throws
Exception
{
super
.
setUp
();
gen
.
standardData
();
driver
=
new
HtmlUnitDriver
();
driver
.
manage
().
timeouts
().
implicitlyWait
(
30
,
TimeUnit
.
SECONDS
);
}
@Test
public
void
testViewAllPatients
()
throws
Exception
{
// This logs us into iTrust and returns the HtmlUnitDriver for use in
// this case
HtmlUnitDriver
driver
=
(
HtmlUnitDriver
)
login
(
"9000000000"
,
"pw"
);
// 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
();
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"
));
assertTrue
(
"Text not found!"
,
text
.
contains
(
"344 Bob Street"
));
assertTrue
(
"Text not found!"
,
text
.
contains
(
"Raleigh NC 27607"
));
}
@After
public
void
tearDown
()
throws
Exception
{
driver
.
quit
();
String
verificationErrorString
=
verificationErrors
.
toString
();
if
(!
""
.
equals
(
verificationErrorString
))
{
fail
(
verificationErrorString
);
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment