Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Xavier Bachelot
lemonldap-ng
Commits
1ebe67cf
Commit
1ebe67cf
authored
Jan 12, 2019
by
Christophe Maudoux
🐛
Browse files
WIP - Improve e2e tests (#1600)
parent
b656f7d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
e2e-tests/portal/10-sfaManager.js
View file @
1ebe67cf
...
...
@@ -56,7 +56,7 @@ describe('10 Lemonldap::NG', function() {
// Back to Portal
links
[
3
].
click
();
browser
.
driver
.
findElement
(
by
.
xpath
(
"
//button[@type='button']
"
)).
click
();
browser
.
sleep
(
10
00
);
browser
.
sleep
(
5
00
);
expect
(
browser
.
driver
.
findElement
(
by
.
css
(
'
[trspan="yourApps"]
'
)).
getText
()).
toEqual
(
'
Vos applications
'
);
});
});
...
...
e2e-tests/portal/99-logout.js
View file @
1ebe67cf
...
...
@@ -3,9 +3,17 @@
/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
describe
(
'
99 Lemonldap::NG auth mechanism
'
,
function
()
{
it
(
'
should allow logout
'
,
function
()
{
browser
.
driver
.
get
(
'
http://auth.example.com:
'
+
process
.
env
.
TESTWEBSERVERPORT
+
'
/?logout=1
'
);
browser
.
driver
.
findElements
(
by
.
xpath
(
'
//li/a/span/img
'
)).
then
(
function
(
links
)
{
expect
(
links
.
length
).
toEqual
(
4
);
links
[
3
].
click
();
browser
.
sleep
(
1000
);
expect
(
browser
.
driver
.
findElement
(
by
.
css
(
'
[trspan="areYouSure"]
'
)).
getText
()).
toEqual
(
'
Êtes-vous sûr ?
'
);
browser
.
driver
.
findElement
(
by
.
css
(
'
[trspan="imSure"]
'
)).
click
();
expect
(
browser
.
driver
.
findElement
(
by
.
css
(
'
[trmsg="47"]
'
)).
getText
()).
toEqual
(
'
Vous avez été déconnecté
'
);
browser
.
sleep
(
500
);
browser
.
driver
.
findElement
(
by
.
css
(
'
[trspan="goToPortal"]
'
)).
click
();
expect
(
browser
.
driver
.
findElement
(
by
.
css
(
'
[trmsg="9"]
'
)).
getText
()).
toEqual
(
'
Veuillez vous authentifier
'
);
});
});
});
\ No newline at end of file
e2e-tests/protractor-conf.js
View file @
1ebe67cf
...
...
@@ -7,6 +7,7 @@ exports.config = {
//specs: ['handler/*.js', 'portal/*.js', 'manager/*.js' ],
capabilities
:
{
//'browserName': 'firefox'
'
browserName
'
:
'
chrome
'
},
...
...
Write
Preview
Supports
Markdown
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