Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
38aeaa48
Verified
Commit
38aeaa48
authored
4 years ago
by
Florian Azizian
Browse files
Options
Downloads
Patches
Plain Diff
FEAT #11895 TIME 0:15 add canConvert TU
parent
39049f9b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
test/e2e/conf.js
+1
-1
1 addition, 1 deletion
test/e2e/conf.js
test/e2e/index-resource-spec.js
+1
-19
1 addition, 19 deletions
test/e2e/index-resource-spec.js
test/e2e/login-spec.js
+52
-24
52 additions, 24 deletions
test/e2e/login-spec.js
with
54 additions
and
44 deletions
test/e2e/conf.js
+
1
−
1
View file @
38aeaa48
...
@@ -2,8 +2,8 @@ exports.config = {
...
@@ -2,8 +2,8 @@ exports.config = {
baseUrl
:
'
http://127.0.0.1/MaarchCourrier
'
,
baseUrl
:
'
http://127.0.0.1/MaarchCourrier
'
,
seleniumAddress
:
'
http://localhost:4444/wd/hub
'
,
seleniumAddress
:
'
http://localhost:4444/wd/hub
'
,
specs
:
[
specs
:
[
'
login-spec.js
'
,
'
index-resource-spec.js
'
,
'
index-resource-spec.js
'
,
//'login-spec.js',
//'about-us-spec.js'
//'about-us-spec.js'
],
],
multiCapabilities
:
[
multiCapabilities
:
[
...
...
This diff is collapsed.
Click to expand it.
test/e2e/index-resource-spec.js
+
1
−
19
View file @
38aeaa48
...
@@ -12,26 +12,8 @@ function writeScreenShot(data, filename) {
...
@@ -12,26 +12,8 @@ function writeScreenShot(data, filename) {
}
}
describe
(
'
index resource page
'
,
function
()
{
describe
(
'
index resource page
'
,
function
()
{
it
(
'
login to app
'
,
function
()
{
browser
.
waitForAngularEnabled
(
true
);
browser
.
get
(
browser
.
baseUrl
+
'
/dist/index.html#/login
'
);
browser
.
sleep
(
500
);
browser
.
takeScreenshot
().
then
(
function
(
png
)
{
writeScreenShot
(
png
,
'
test/e2e/screenshots/login_to_app_
'
+
browser
.
browserName
);
});
element
(
by
.
id
(
'
login
'
)).
sendKeys
(
'
bblier
'
);
browser
.
sleep
(
500
);
element
(
by
.
id
(
'
password
'
)).
sendKeys
(
'
maarch
'
);
browser
.
sleep
(
500
);
element
(
by
.
id
(
'
submit
'
)).
click
();
browser
.
sleep
(
100
);
browser
.
takeScreenshot
().
then
(
function
(
png
)
{
writeScreenShot
(
png
,
'
test/e2e/screenshots/submitLogin_
'
+
browser
.
browserName
);
});
});
it
(
'
index a document whitout file
'
,
function
()
{
it
(
'
index a document whitout file
'
,
function
()
{
browser
.
sleep
(
4
000
);
browser
.
sleep
(
2
000
);
expect
(
browser
.
getCurrentUrl
()).
toEqual
(
browser
.
baseUrl
+
"
/dist/index.html#/home
"
);
expect
(
browser
.
getCurrentUrl
()).
toEqual
(
browser
.
baseUrl
+
"
/dist/index.html#/home
"
);
browser
.
takeScreenshot
().
then
(
function
(
png
)
{
browser
.
takeScreenshot
().
then
(
function
(
png
)
{
writeScreenShot
(
png
,
'
test/e2e/screenshots/home_
'
+
browser
.
browserName
);
writeScreenShot
(
png
,
'
test/e2e/screenshots/home_
'
+
browser
.
browserName
);
...
...
This diff is collapsed.
Click to expand it.
test/e2e/login-spec.js
+
52
−
24
View file @
38aeaa48
describe
(
'
angular homepage todo list
'
,
function
()
{
var
fs
=
require
(
'
fs
'
);
it
(
'
should add a todo
'
,
function
()
{
browser
.
waitForAngularEnabled
(
false
);
function
writeScreenShot
(
data
,
filename
)
{
browser
.
get
(
'
http://127.0.0.1/maarch_trunk/apps/maarch_entreprise/index.php?display=true&page=login
'
);
var
stream
=
fs
.
createWriteStream
(
filename
+
'
.png
'
);
stream
.
write
(
new
Buffer
.
from
(
data
,
'
base64
'
));
element
(
by
.
id
(
'
login
'
)).
sendKeys
(
'
bbain
'
);
stream
.
end
();
element
(
by
.
id
(
'
pass
'
)).
sendKeys
(
'
maarch
'
);
// var stream = fs.createWriteStream(filename+'.txt');
element
(
by
.
css
(
'
[name="submit"]
'
)).
click
();
// stream.write(data);
// stream.end();
// var todoList = element.all(by.repeater('todo in todoList.todos'));
// console.log(data);
// expect(todoList.count()).toEqual(3);
}
// expect(todoList.get(2).getText()).toEqual('write first protractor test');
//
describe
(
'
Login to app
'
,
function
()
{
// // You wrote your first test, cross it off the list
// it('should add a todo', function() {
// todoList.get(2).element(by.css('input')).click();
// browser.waitForAngularEnabled(false);
// var completedAmount = element.all(by.css('.done-true'));
// browser.get('http://127.0.0.1/maarch_trunk/apps/maarch_entreprise/index.php?display=true&page=login');
// expect(completedAmount.count()).toEqual(2);
});
// element(by.id('login')).sendKeys('bbain');
// element(by.id('pass')).sendKeys('maarch');
// element(by.css('[name="submit"]')).click();
// // var todoList = element.all(by.repeater('todo in todoList.todos'));
// // expect(todoList.count()).toEqual(3);
// // expect(todoList.get(2).getText()).toEqual('write first protractor test');
// //
// // // You wrote your first test, cross it off the list
// // todoList.get(2).element(by.css('input')).click();
// // var completedAmount = element.all(by.css('.done-true'));
// // expect(completedAmount.count()).toEqual(2);
// });
// it('test 2', function() {
// var nbHeader = element.all(by.css('[class="bg-head-content"]'));
// expect(nbHeader.count()).toEqual(1);
it
(
'
test 2
'
,
function
()
{
// element(by.css('[routerLink="/about-us"]')).click();
browser
.
sleep
(
4000
);
// });
browser
.
waitForAngularEnabled
(
false
);
var
nbHeader
=
element
.
all
(
by
.
css
(
'
[class="bg-head-content"]
'
));
expect
(
nbHeader
.
count
()).
toEqual
(
1
);
element
(
by
.
css
(
'
[routerLink="/about-us"]
'
)).
click
();
it
(
'
login to app
'
,
function
()
{
browser
.
waitForAngularEnabled
(
true
);
browser
.
get
(
browser
.
baseUrl
+
'
/dist/index.html#/login
'
);
browser
.
sleep
(
500
);
browser
.
takeScreenshot
().
then
(
function
(
png
)
{
writeScreenShot
(
png
,
'
test/e2e/screenshots/login_to_app_
'
+
browser
.
browserName
);
});
element
(
by
.
id
(
'
login
'
)).
sendKeys
(
'
bblier
'
);
browser
.
sleep
(
500
);
element
(
by
.
id
(
'
password
'
)).
sendKeys
(
'
maarch
'
);
browser
.
sleep
(
500
);
element
(
by
.
id
(
'
submit
'
)).
click
();
browser
.
sleep
(
100
);
browser
.
takeScreenshot
().
then
(
function
(
png
)
{
writeScreenShot
(
png
,
'
test/e2e/screenshots/submitLogin_
'
+
browser
.
browserName
);
});
});
});
});
});
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