Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
ulakbus-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ulakbus
ulakbus-ui
Commits
67d63df2
Commit
67d63df2
authored
May 26, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sample protractor tests and config
parent
2dd72a40
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
34 deletions
+34
-34
protractor.conf.js
e2e-tests/protractor.conf.js
+12
-12
scenarios.js
e2e-tests/scenarios.js
+22
-22
No files found.
e2e-tests/protractor.conf.js
View file @
67d63df2
exports
.
config
=
{
allScriptsTimeout
:
11000
,
allScriptsTimeout
:
11000
,
specs
:
[
'*.js'
],
specs
:
[
'*.js'
],
capabilities
:
{
'browserName'
:
'chrome'
},
capabilities
:
{
'browserName'
:
'chrome'
},
baseUrl
:
'http://localhost:8000/'
,
baseUrl
:
'http://localhost:8000/'
,
framework
:
'jasmine'
,
framework
:
'jasmine'
,
jasmineNodeOpts
:
{
defaultTimeoutInterval
:
30000
}
jasmineNodeOpts
:
{
defaultTimeoutInterval
:
30000
}
};
e2e-tests/scenarios.js
View file @
67d63df2
...
...
@@ -2,41 +2,41 @@
/* https://github.com/angular/protractor/blob/master/docs/toc.md */
describe
(
'my app'
,
function
()
{
describe
(
'my app'
,
function
()
{
browser
.
get
(
'index.html'
);
browser
.
get
(
'index.html'
);
it
(
'should automatically redirect to /dashboard when location hash/fragment is empty'
,
function
()
{
expect
(
browser
.
getLocationAbsUrl
()).
toMatch
(
"/login"
);
});
it
(
'should automatically redirect to /dashboard when location hash/fragment is empty'
,
function
()
{
expect
(
browser
.
getLocationAbsUrl
()).
toMatch
(
"/login"
);
});
describe
(
'dashboard'
,
function
()
{
describe
(
'dashboard'
,
function
()
{
beforeEach
(
function
()
{
browser
.
get
(
'index.html#/dashboard'
);
});
beforeEach
(
function
()
{
browser
.
get
(
'index.html#/dashboard'
);
});
it
(
'should redirect to login page if not logged in'
,
function
()
{
expect
(
element
.
all
(
by
.
css
(
'[ng-view] h1'
)).
first
().
getText
()).
toMatch
(
/Zaerp Login Form/
);
});
it
(
'should redirect to login page if not logged in'
,
function
()
{
expect
(
element
.
all
(
by
.
css
(
'[ng-view] h1'
)).
first
().
getText
()).
toMatch
(
/Zaerp Login Form/
);
});
});
describe
(
'login'
,
function
()
{
describe
(
'login'
,
function
()
{
beforeEach
(
function
()
{
browser
.
get
(
'index.html#/login'
);
});
beforeEach
(
function
()
{
browser
.
get
(
'index.html#/login'
);
});
it
(
'should render view2 when user navigates to /view2'
,
function
()
{
expect
(
element
.
all
(
by
.
css
(
'[ng-view] h1'
)).
first
().
getText
()).
toMatch
(
/Zaerp Login Form/
);
});
it
(
'should render view2 when user navigates to /view2'
,
function
()
{
expect
(
element
.
all
(
by
.
css
(
'[ng-view] h1'
)).
first
().
getText
()).
toMatch
(
/Zaerp Login Form/
);
});
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment