Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenQuizz
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
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
Weber Rodolphe
OpenQuizz
Commits
4f4b88f1
Commit
4f4b88f1
authored
Sep 03, 2021
by
Jérémie Passerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correction des tests
parent
6d444b03
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
11 deletions
+10
-11
fileMock.js
__mocks__/fileMock.js
+1
-0
styleMock.js
__mocks__/styleMock.js
+1
-0
package.json
package.json
+5
-1
Index.vue
src/Index.vue
+3
-7
Index.test.js
src/tests/Index.test.js
+0
-3
No files found.
__mocks__/fileMock.js
0 → 100644
View file @
4f4b88f1
module
.
exports
=
'test-file-stub'
;
__mocks__/styleMock.js
0 → 100644
View file @
4f4b88f1
module
.
exports
=
{};
\ No newline at end of file
package.json
View file @
4f4b88f1
...
@@ -9,7 +9,11 @@
...
@@ -9,7 +9,11 @@
"^.+
\\
.js$"
:
"<rootDir>/node_modules/babel-jest"
,
"^.+
\\
.js$"
:
"<rootDir>/node_modules/babel-jest"
,
".*
\\
.(vue)$"
:
"<rootDir>/node_modules/vue-jest"
".*
\\
.(vue)$"
:
"<rootDir>/node_modules/vue-jest"
},
},
"testEnvironment"
:
"jsdom"
"testEnvironment"
:
"jsdom"
,
"moduleNameMapper"
:
{
"
\\
.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$"
:
"<rootDir>/__mocks__/fileMock.js"
,
"
\\
.(css|less)$"
:
"<rootDir>/__mocks__/styleMock.js"
}
},
},
"version"
:
"0.1.0"
,
"version"
:
"0.1.0"
,
"private"
:
true
,
"private"
:
true
,
...
...
src/Index.vue
View file @
4f4b88f1
...
@@ -36,9 +36,9 @@ import Maj from "./Maj";
...
@@ -36,9 +36,9 @@ import Maj from "./Maj";
import
Profil
from
"./Profil"
;
import
Profil
from
"./Profil"
;
import
NewContenu
from
"./NewContenu"
;
import
NewContenu
from
"./NewContenu"
;
import
ImporterFichier
from
"./ImporterFichier"
;
import
ImporterFichier
from
"./ImporterFichier"
;
import
GererTagsLibres
from
"
@
/GererTagsLibres"
;
import
GererTagsLibres
from
"
.
/GererTagsLibres"
;
import
TagsFixes
from
"
@
/TagsFixes"
;
import
TagsFixes
from
"
.
/TagsFixes"
;
import
Manuel
from
"
@
/Manuel"
;
import
Manuel
from
"
.
/Manuel"
;
// import Service from "./service/Service";
// import Service from "./service/Service";
// import showdown from "showdown"
// import showdown from "showdown"
...
@@ -79,12 +79,8 @@ export default {
...
@@ -79,12 +79,8 @@ export default {
setLogged
:
function
(
event
)
{
setLogged
:
function
(
event
)
{
if
(
event
.
isLogged
){
if
(
event
.
isLogged
){
this
.
etat
=
"Contenu"
this
.
etat
=
"Contenu"
//this.errorLogin = false
this
.
auteur
=
event
.
auteur
this
.
auteur
=
event
.
auteur
}
}
/* else {
this.errorLogin = true
}*/
},
},
/**
/**
* @vuese
* @vuese
...
...
src/tests/Index.test.js
View file @
4f4b88f1
...
@@ -24,11 +24,8 @@ test('Index', () => {
...
@@ -24,11 +24,8 @@ test('Index', () => {
subComponent
.
vm
.
$emit
(
"user_logged"
,
{
"isLogged"
:
true
,
"auteur"
:
"Marmaduke"
})
subComponent
.
vm
.
$emit
(
"user_logged"
,
{
"isLogged"
:
true
,
"auteur"
:
"Marmaduke"
})
expect
(
wrapper
.
vm
.
etat
).
toEqual
(
"Contenu"
)
expect
(
wrapper
.
vm
.
etat
).
toEqual
(
"Contenu"
)
expect
(
wrapper
.
vm
.
errorLogin
).
toEqual
(
false
)
expect
(
wrapper
.
vm
.
auteur
).
toEqual
(
"Marmaduke"
)
expect
(
wrapper
.
vm
.
auteur
).
toEqual
(
"Marmaduke"
)
subComponent
.
vm
.
$emit
(
"user_logged"
,
{
"isLogged"
:
false
})
expect
(
wrapper
.
vm
.
errorLogin
).
toEqual
(
true
)
// Tests du retour de l'émit de Menu.vue
// Tests du retour de l'émit de Menu.vue
const
subComponentTwo
=
wrapper
.
findComponent
(
Menu
)
const
subComponentTwo
=
wrapper
.
findComponent
(
Menu
)
...
...
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