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
6d444b03
Commit
6d444b03
authored
Sep 03, 2021
by
Jérémie Passerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sauvegarde avant essai pour résoudre un pb de tests
parent
838442fc
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
35 additions
and
32 deletions
+35
-32
Detail_Filtre.vue
src/components/Detail_Filtre.vue
+3
-2
Modifier_Contenu.vue
src/components/Modifier_Contenu.vue
+10
-5
Volet_Base.vue
src/components/Volet_Base.vue
+17
-6
Filtre_Recherche.vue
src/components/filtres/Filtre_Recherche.vue
+2
-4
Manuel.test.js
src/tests/Manuel.test.js
+0
-4
NewContenu.test.js
src/tests/NewContenu.test.js
+2
-2
Profil.test.js
src/tests/Profil.test.js
+0
-4
Volet_Menu.test.js
src/tests/Volet_Menu.test.js
+1
-5
No files found.
src/components/Detail_Filtre.vue
View file @
6d444b03
<
template
>
<
template
>
<div
id=
"detail_filtre"
>
<div
id=
"detail_filtre"
>
<!--
<button
id=
"effacerFiltres"
v-on:click=
"effacer_Filtres"
></button>
-->
<!--
<button
id=
"effacerFiltres"
v-on:click=
"effacer_Filtres"
></button>
-->
<span
v-bind:class=
"darktheme ? 'effacerFiltresDark' : 'effacerFiltres'"
v-on:click=
"effacer_Filtres"
></span>
<span
id=
"effacerFiltres"
v-bind:class=
"darktheme ? 'effacerFiltresDark' : 'effacerFiltres'"
v-on:click=
"effacer_Filtres"
></span>
<div
id=
"filtresChoisis"
v-for=
"(index) in filtres_Choisis"
:key=
"index.filtre"
>
<div
id=
"filtresChoisis"
v-for=
"(index) in filtres_Choisis"
:key=
"index.filtre"
>
<span
:id=
"JSON.stringify(index.filtre)"
class=
"filtreChoisi"
>
{{
affichageTag
(
index
)
}}
<button
class=
"supprimerFiltre"
v-on:click=
"supprimer($event, index)"
></button></span>
<span
:id=
"JSON.stringify(index.filtre)"
class=
"filtreChoisi"
>
{{
affichageTag
(
index
)
}}
<button
class=
"supprimerFiltre"
v-on:click=
"supprimer($event, index)"
></button></span>
<b-popover
v-if=
"index.type === 'tags libres'"
:target=
"JSON.stringify(index.filtre)"
triggers=
"hover"
placement=
"rightbottom"
>
<b-popover
v-if=
"index.type === 'tags libres'"
:target=
"JSON.stringify(index.filtre)"
triggers=
"hover"
placement=
"rightbottom"
>
<p>
{{
index
.
filtre
}}
</p>
<p>
{{
index
.
filtre
}}
</p>
</b-popover>
</b-popover>
...
...
src/components/Modifier_Contenu.vue
View file @
6d444b03
...
@@ -6,13 +6,13 @@
...
@@ -6,13 +6,13 @@
&& versionMax > 1"
v-model=
"versionChoisie"
v-on:change=
"changerVersion"
>
-->
&& versionMax > 1"
v-model=
"versionChoisie"
v-on:change=
"changerVersion"
>
-->
<div
id=
"typeEtSource"
>
<div
id=
"typeEtSource"
>
Type :
{{
contenuClique
.
type
}}
<br>
Type :
{{
typeContenu
}}
<br>
Source :
{{
contenuClique
.
source
}}
Source :
{{
sourceContenu
}}
</div>
</div>
<div
id=
"notePopularite"
>
<div
id=
"notePopularite"
>
Note version :
{{
noteContenu
}}
<br>
Note version :
{{
noteContenu
}}
<br>
Popularité :
{{
contenuClique
.
popularite
}}
<br>
Popularité :
{{
populariteContenu
}}
<br>
</div>
</div>
<span
id=
"tagsLibres"
v-on:click=
"modifierTags"
>
{{
titreModifierTags
}}
</span>
<span
id=
"tagsLibres"
v-on:click=
"modifierTags"
>
{{
titreModifierTags
}}
</span>
...
@@ -111,7 +111,9 @@ export default {
...
@@ -111,7 +111,9 @@ export default {
populariteContenu
:
0
,
populariteContenu
:
0
,
noteContenu
:
0
,
noteContenu
:
0
,
isModeTag
:
false
,
isModeTag
:
false
,
titreModifierTags
:
"modifier Tags"
titreModifierTags
:
"modifier Tags"
,
typeContenu
:
''
,
sourceContenu
:
''
}
}
},
},
methods
:
{
methods
:
{
...
@@ -251,6 +253,9 @@ export default {
...
@@ -251,6 +253,9 @@ export default {
this
.
titreContenu
=
this
.
contenuClique
.
titre
this
.
titreContenu
=
this
.
contenuClique
.
titre
this
.
noteContenu
=
this
.
calculerNoteContenu
this
.
noteContenu
=
this
.
calculerNoteContenu
this
.
typeContenu
=
this
.
contenuClique
.
type
this
.
sourceContenu
=
this
.
contenuClique
.
source
this
.
populariteContenu
=
this
.
contenuClique
.
popularite
this
.
isContenuRefuse
=
Object
.
prototype
.
hasOwnProperty
.
call
(
this
.
contenuClique
,
'refuse'
);
this
.
isContenuRefuse
=
Object
.
prototype
.
hasOwnProperty
.
call
(
this
.
contenuClique
,
'refuse'
);
...
@@ -314,7 +319,7 @@ button {
...
@@ -314,7 +319,7 @@ button {
text-align
:
center
;
text-align
:
center
;
align-content
:
center
;
align-content
:
center
;
display
:
flex
;
display
:
flex
;
margin
:
0
auto
-15px
;
/*margin: 0 auto -15px;*/
}
}
#typeEtSource
,
#notePopularite
{
#typeEtSource
,
#notePopularite
{
...
...
src/components/Volet_Base.vue
View file @
6d444b03
...
@@ -866,12 +866,23 @@ export default {
...
@@ -866,12 +866,23 @@ export default {
}
}
}
}
if
(
event
.
filtres
.
filter
(
contenu
=>
contenu
.
type
===
'recherche'
))
{
if
(
event
.
filtres
.
filter
(
contenu
=>
contenu
.
type
===
'recherche'
))
{
let
filtre_recherche
=
(
event
.
filtres
.
filter
(
contenu
=>
contenu
.
type
===
'recherche'
))
//alert("Nouveau filtre recherche")
for
(
let
itBe
in
filtre_recherche
){
switch
(
filtre_recherche
[
itBe
].
choix
){
case
"titre"
:
contenusFiltres
=
contenusFiltres
.
filter
(
contenu
=>
contenu
.
titre
===
filtre_recherche
[
itBe
].
filtre
)
break
case
"contenu"
:
alert
(
"je recherche "
+
filtre_recherche
[
itBe
].
filtre
+
"dans le contenu"
)
break
case
"titre&contenu"
:
alert
(
"je recherche "
+
filtre_recherche
[
itBe
].
filtre
+
"dans le titre et dans le contenu"
)
break
}
}
}
}
// et on les réinjecte dans la "source"
// et on les réinjecte dans la "source"
if
(
this
.
panierChoisi
){
if
(
this
.
panierChoisi
){
this
.
contenus
=
contenusFiltres
this
.
contenus
=
contenusFiltres
...
@@ -1051,8 +1062,8 @@ export default {
...
@@ -1051,8 +1062,8 @@ export default {
this
.
checkes
=
[]
this
.
checkes
=
[]
$
(
".horns"
).
prop
(
"checked"
,
false
)
$
(
".horns"
).
prop
(
"checked"
,
false
)
$
(
".horns"
).
parent
().
parent
().
removeClass
()
$
(
".horns"
).
parent
().
parent
().
removeClass
()
// alert($(".horns").parent().parent().parent().prop('nodeName'))
// alert($(".horns").parent().parent().parent().prop('nodeName'))
// alert($(".horns").parent().parent().prop('nodeName'))
// alert($(".horns").parent().parent().prop('nodeName'))
},
},
}
}
...
...
src/components/filtres/Filtre_Recherche.vue
View file @
6d444b03
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<br>
<br>
<span
id=
"validerRecherche"
:class=
"(recherche.length === 0 || choixRecherche.length === 0) ? 'indisponible' : ''"
@
click=
"submit"
>
Valider la recherche
</span>
<span
id=
"validerRecherche"
:class=
"(recherche.length === 0 || choixRecherche.length === 0) ? 'indisponible' : ''"
@
click=
"submit"
>
Valider la recherche
</span>
<br>
<br>
<p
style=
"color: red; font-weight: bold"
>
⚠ Pas câblé
au tableau des contenus
</p>
<p
style=
"color: red; font-weight: bold"
>
⚠ Pas câblé
⚠
</p>
</div>
</div>
</
template
>
</
template
>
...
@@ -45,14 +45,12 @@ export default {
...
@@ -45,14 +45,12 @@ export default {
if
(
this
.
recherche
.
length
!==
0
&&
this
.
choixRecherche
.
length
!==
0
){
if
(
this
.
recherche
.
length
!==
0
&&
this
.
choixRecherche
.
length
!==
0
){
for
(
let
mot
in
this
.
recherche
.
split
(
' '
)){
for
(
let
mot
in
this
.
recherche
.
split
(
' '
)){
this
.
$emit
(
"creer_filtre"
,
{
filtre
:
this
.
recherche
.
split
(
' '
)[
mot
],
type
:
"recherche"
})
this
.
$emit
(
"creer_filtre"
,
{
filtre
:
this
.
recherche
.
split
(
' '
)[
mot
],
type
:
"recherche"
,
choix
:
this
.
choixRecherche
})
}
}
this
.
recherche
=
''
this
.
recherche
=
''
this
.
choixRecherche
=
''
this
.
choixRecherche
=
''
}
}
}
}
}
}
}
}
...
...
src/tests/Manuel.test.js
View file @
6d444b03
...
@@ -4,8 +4,4 @@ import Manuel from "../Manuel";
...
@@ -4,8 +4,4 @@ import Manuel from "../Manuel";
test
(
'Manuel'
,
()
=>
{
test
(
'Manuel'
,
()
=>
{
const
wrapper
=
shallowMount
(
Manuel
)
const
wrapper
=
shallowMount
(
Manuel
)
expect
(
wrapper
.
vm
.
choixVariante
).
toHaveBeenCalledTimes
(
0
);
})
})
\ No newline at end of file
src/tests/NewContenu.test.js
View file @
6d444b03
...
@@ -9,8 +9,8 @@ import NewContenu from "../NewContenu";
...
@@ -9,8 +9,8 @@ import NewContenu from "../NewContenu";
test
(
'NewContenu'
,
()
=>
{
test
(
'NewContenu'
,
()
=>
{
const
wrapper
=
shallowMount
(
NewContenu
)
const
wrapper
=
shallowMount
(
NewContenu
)
expect
(
wrapper
.
vm
.
test
).
toEqual
(
''
)
expect
(
wrapper
.
vm
.
isCreation
).
toEqual
(
true
)
wrapper
.
find
(
'.ajouterContenu'
).
trigger
(
'click'
);
wrapper
.
find
(
'.ajouterContenu'
).
trigger
(
'click'
);
expect
(
wrapper
.
vm
.
test
).
toEqual
(
'test'
)
expect
(
wrapper
.
vm
.
isCreation
).
toEqual
(
false
)
})
})
\ No newline at end of file
src/tests/Profil.test.js
View file @
6d444b03
...
@@ -16,13 +16,9 @@ test('Profil', () => {
...
@@ -16,13 +16,9 @@ test('Profil', () => {
button
.
trigger
(
'click'
);
button
.
trigger
(
'click'
);
expect
(
wrapper
.
vm
.
editMode
).
toEqual
(
true
)
expect
(
wrapper
.
vm
.
editMode
).
toEqual
(
true
)
console
.
log
(
wrapper
.
vm
.
editMode
)
button
=
wrapper
.
find
(
'#afficherMenuChangementMdp'
)
button
=
wrapper
.
find
(
'#afficherMenuChangementMdp'
)
button
.
trigger
(
'click'
);
button
.
trigger
(
'click'
);
expect
(
wrapper
.
vm
.
editMode
).
toEqual
(
false
)
expect
(
wrapper
.
vm
.
editMode
).
toEqual
(
false
)
console
.
log
(
wrapper
.
vm
.
editMode
)
})
})
src/tests/Volet_Menu.test.js
View file @
6d444b03
...
@@ -7,15 +7,11 @@ import Volet_Base from "../components/Volet_Base";
...
@@ -7,15 +7,11 @@ import Volet_Base from "../components/Volet_Base";
import
Volet_Menu
from
"../components/Volet_Menu"
;
import
Volet_Menu
from
"../components/Volet_Menu"
;
import
Volet_Contenu
from
"../components/Volet_Contenu"
;
import
Volet_Contenu
from
"../components/Volet_Contenu"
;
// Rien a tester dans
Index.vue, car c'est juste un "aggrégateur" pour d'autres composants.
// Rien a tester dans
Volet_Menu.vue
test
(
'Volet_Menu'
,
()
=>
{
test
(
'Volet_Menu'
,
()
=>
{
const
wrapper
=
shallowMount
(
Volet_Menu
)
const
wrapper
=
shallowMount
(
Volet_Menu
)
let
button
=
wrapper
.
find
(
'#recherche'
);
expect
(
wrapper
.
vm
.
modeFiltre
).
toEqual
(
true
)
button
.
trigger
(
'click'
);
expect
(
wrapper
.
vm
.
modeFiltre
).
toEqual
(
false
)
})
})
\ No newline at end of file
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