Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90321050
demo.spec.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Oct 31, 11:59
Size
1 KB
Mime Type
text/x-java
Expires
Sat, Nov 2, 11:59 (2 d)
Engine
blob
Format
Raw Data
Handle
22051389
Attached To
R2664 SHRINE MedCo Fork
demo.spec.js
View Options
import
{
PageObjectWelcome
}
from
'./welcome.po.js'
;
import
{
PageObjectSkeleton
}
from
'./skeleton.po.js'
;
describe
(
'aurelia skeleton app'
,
function
()
{
let
poWelcome
;
let
poSkeleton
;
beforeEach
(()
=>
{
poSkeleton
=
new
PageObjectSkeleton
();
poWelcome
=
new
PageObjectWelcome
();
browser
.
loadAndWaitForAureliaPage
(
'http://localhost:9000'
);
});
it
(
'should load the page and display the initial page title'
,
()
=>
{
expect
(
poSkeleton
.
getCurrentPageTitle
()).
toBe
(
'Welcome | Aurelia'
);
});
it
(
'should display greeting'
,
()
=>
{
expect
(
poWelcome
.
getGreeting
()).
toBe
(
'Welcome to the Aurelia Navigation App!'
);
});
it
(
'should automatically write down the fullname'
,
()
=>
{
poWelcome
.
setFirstname
(
'Rob'
);
poWelcome
.
setLastname
(
'Eisenberg'
);
// For now there is a timing issue with the binding.
// Until resolved we will use a short sleep to overcome the issue.
browser
.
sleep
(
200
);
expect
(
poWelcome
.
getFullname
()).
toBe
(
'ROB EISENBERG'
);
});
it
(
'should show alert message when clicking submit button'
,
()
=>
{
expect
(
poWelcome
.
openAlertDialog
()).
toBe
(
true
);
});
it
(
'should navigate to users page'
,
()
=>
{
poSkeleton
.
navigateTo
(
'#/users'
);
expect
(
poSkeleton
.
getCurrentPageTitle
()).
toBe
(
'Github Users | Aurelia'
);
});
});
Event Timeline
Log In to Comment