Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
techweb_cci
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESTELLON Bertrand
techweb_cci
Commits
d19d8886
Commit
d19d8886
authored
7 months ago
by
ESTELLON Bertrand
Browse files
Options
Downloads
Patches
Plain Diff
Modification des tests
parent
d397b329
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
TD45/all.test.js
+11
-3
11 additions, 3 deletions
TD45/all.test.js
with
11 additions
and
3 deletions
TD45/all.test.js
+
11
−
3
View file @
d19d8886
...
@@ -71,7 +71,13 @@ if (progression >= 27) {
...
@@ -71,7 +71,13 @@ if (progression >= 27) {
const
browser
=
await
puppeteer
.
launch
();
const
browser
=
await
puppeteer
.
launch
();
const
page
=
await
browser
.
newPage
();
const
page
=
await
browser
.
newPage
();
const
consoleLogs
=
[];
const
consoleLogs
=
[];
page
.
on
(
'
console
'
,
async
consoleObj
=>
{
consoleLogs
.
push
(
await
consoleObj
.
args
()[
0
]?.
jsonValue
())
});
page
.
on
(
'
console
'
,
async
consoleObj
=>
{
const
args
=
consoleObj
.
args
();
const
arg0
=
args
[
0
];
if
(
arg0
==
undefined
)
return
;
const
json
=
await
arg0
.
jsonValue
();
consoleLogs
.
push
(
json
);
});
await
page
.
goto
(
`http://localhost:
${
fastify
.
server
.
address
().
port
}
`
);
await
page
.
goto
(
`http://localhost:
${
fastify
.
server
.
address
().
port
}
`
);
const
content
=
await
page
.
content
();
const
content
=
await
page
.
content
();
const
dom
=
new
JSDOM
(
content
);
const
dom
=
new
JSDOM
(
content
);
...
@@ -97,8 +103,9 @@ if (progression >= 28 && progression < 30) {
...
@@ -97,8 +103,9 @@ if (progression >= 28 && progression < 30) {
page
.
on
(
'
console
'
,
async
consoleObj
=>
{
page
.
on
(
'
console
'
,
async
consoleObj
=>
{
const
args
=
consoleObj
.
args
();
const
args
=
consoleObj
.
args
();
const
arg0
=
args
[
0
];
const
arg0
=
args
[
0
];
if
(
arg0
==
undefined
)
return
;
const
json
=
await
arg0
.
jsonValue
();
const
json
=
await
arg0
.
jsonValue
();
consoleLogs
.
push
(
json
)
consoleLogs
.
push
(
json
)
;
});
});
await
page
.
goto
(
`http://localhost:
${
fastify
.
server
.
address
().
port
}
`
);
await
page
.
goto
(
`http://localhost:
${
fastify
.
server
.
address
().
port
}
`
);
const
content
=
await
page
.
content
();
const
content
=
await
page
.
content
();
...
@@ -123,8 +130,9 @@ if (progression == 29) {
...
@@ -123,8 +130,9 @@ if (progression == 29) {
page
.
on
(
'
console
'
,
async
consoleObj
=>
{
page
.
on
(
'
console
'
,
async
consoleObj
=>
{
const
args
=
consoleObj
.
args
();
const
args
=
consoleObj
.
args
();
const
arg0
=
args
[
0
];
const
arg0
=
args
[
0
];
if
(
arg0
==
undefined
)
return
;
const
json
=
await
arg0
.
jsonValue
();
const
json
=
await
arg0
.
jsonValue
();
consoleLogs
.
push
(
json
)
consoleLogs
.
push
(
json
)
;
});
});
await
page
.
goto
(
`http://localhost:
${
fastify
.
server
.
address
().
port
}
`
);
await
page
.
goto
(
`http://localhost:
${
fastify
.
server
.
address
().
port
}
`
);
await
page
.
evaluate
(
'
window.onload()
'
);
await
page
.
evaluate
(
'
window.onload()
'
);
...
...
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