@windward/games 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/content/DatableEditor.vue +1 -1
- package/components/content/blocks/crosswordPuzzle/CrosswordPuzzle.vue +1 -0
- package/components/content/blocks/dragDrop/BucketGame.vue +2 -2
- package/components/content/blocks/dragDrop/SortingGame.vue +38 -36
- package/components/content/blocks/flashcards/FlashcardSlides.vue +5 -12
- package/components/content/blocks/matchingGame/MatchingGame.vue +8 -13
- package/components/content/blocks/multipleChoice/MultipleChoice.vue +34 -10
- package/components/content/blocks/multipleChoice/QuestionDialog.vue +25 -21
- package/components/content/blocks/quizshowGame/AnswerPanel.vue +2 -3
- package/components/content/blocks/quizshowGame/Gridview.vue +3 -2
- package/components/content/blocks/sevenStrikes/SevenStikes.vue +31 -3
- package/components/content/blocks/slideshow/SlideShow.vue +5 -12
- package/components/content/blocks/wordJumble/WordJumble.vue +25 -1
- package/components/settings/BucketGameSettingsManager.vue +20 -4
- package/components/settings/CrosswordPuzzleSettingsManager.vue +19 -10
- package/components/settings/FlashCardSlidesManager.vue +121 -83
- package/components/settings/MatchingGameManager.vue +77 -43
- package/components/settings/MultipleChoiceSettingsManager.vue +33 -78
- package/components/settings/QuizShowSettingsManager.vue +26 -13
- package/components/settings/SevenStrikesSettingsManager.vue +16 -5
- package/components/settings/SlideShowManager.vue +15 -4
- package/components/settings/SortingGameSettingsManager.vue +18 -8
- package/components/settings/WordJumbleSettingsManager.vue +21 -10
- package/jest.config.js +0 -1
- package/package.json +2 -2
- package/plugin.js +6 -6
- package/test/__mocks__/componentsMock.js +3 -1
- package/test/__mocks__/modelMock.js +13 -84
- package/test/blocks/multipleChoice/MultipleChoice.spec.js +1 -1
- package/test/settings/WordJumbleManager.spec.js +3 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<v-form ref="form" v-model="valid" v-if="!loading">
|
|
4
4
|
<v-container class="pa-0">
|
|
5
5
|
<v-text-field
|
|
6
|
+
ref="title"
|
|
6
7
|
v-model="block.metadata.config.title"
|
|
7
8
|
outlined
|
|
8
9
|
:counter="50"
|
|
@@ -12,7 +13,7 @@
|
|
|
12
13
|
'windward.games.components.settings.bucket_game.form.title'
|
|
13
14
|
)
|
|
14
15
|
"
|
|
15
|
-
|
|
16
|
+
:disabled="render"
|
|
16
17
|
></v-text-field>
|
|
17
18
|
<v-textarea
|
|
18
19
|
v-model="block.metadata.config.instructions"
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
'windward.games.components.settings.bucket_game.form.instructions'
|
|
24
25
|
)
|
|
25
26
|
"
|
|
27
|
+
:disabled="render"
|
|
26
28
|
></v-textarea>
|
|
27
29
|
</v-container>
|
|
28
30
|
<v-divider class="my-4 primary"></v-divider>
|
|
@@ -37,6 +39,7 @@
|
|
|
37
39
|
<SortableExpansionPanel
|
|
38
40
|
v-model="block.metadata.config.words"
|
|
39
41
|
v-bind:currentPanel.sync="block.metadata.config.currentWord"
|
|
42
|
+
:disabled="render"
|
|
40
43
|
@click:close="onDelete($event)"
|
|
41
44
|
>
|
|
42
45
|
<template #header="{ item, index }">
|
|
@@ -64,6 +67,7 @@
|
|
|
64
67
|
"
|
|
65
68
|
outlined
|
|
66
69
|
:autofocus="true"
|
|
70
|
+
:disabled="render"
|
|
67
71
|
></v-textarea>
|
|
68
72
|
<p class="p-label">
|
|
69
73
|
{{
|
|
@@ -78,6 +82,7 @@
|
|
|
78
82
|
"
|
|
79
83
|
outlined
|
|
80
84
|
class="pt-4"
|
|
85
|
+
:disabled="render"
|
|
81
86
|
></v-textarea>
|
|
82
87
|
</v-flex>
|
|
83
88
|
</v-container>
|
|
@@ -86,7 +91,11 @@
|
|
|
86
91
|
</v-container>
|
|
87
92
|
<v-container class="pa-0">
|
|
88
93
|
<v-row justify="center" class="my-4">
|
|
89
|
-
<v-btn
|
|
94
|
+
<v-btn
|
|
95
|
+
color="primary"
|
|
96
|
+
:disabled="render"
|
|
97
|
+
@click="onAddElement"
|
|
98
|
+
>
|
|
90
99
|
<v-icon>mdi-plus</v-icon>
|
|
91
100
|
{{
|
|
92
101
|
$t(
|
|
@@ -98,6 +107,7 @@
|
|
|
98
107
|
</v-container>
|
|
99
108
|
<v-row class="mt-3">
|
|
100
109
|
<v-textarea
|
|
110
|
+
ref="title"
|
|
101
111
|
v-model="block.metadata.config.feedback_correct"
|
|
102
112
|
outlined
|
|
103
113
|
auto-grow
|
|
@@ -107,7 +117,7 @@
|
|
|
107
117
|
'windward.games.components.settings.word_jumble.feedback_correct'
|
|
108
118
|
)
|
|
109
119
|
"
|
|
110
|
-
|
|
120
|
+
:disabled="render"
|
|
111
121
|
></v-textarea>
|
|
112
122
|
<v-textarea
|
|
113
123
|
v-model="block.metadata.config.feedback_incorrect"
|
|
@@ -118,6 +128,7 @@
|
|
|
118
128
|
'windward.games.components.settings.word_jumble.feedback_incorrect'
|
|
119
129
|
)
|
|
120
130
|
"
|
|
131
|
+
:disabled="render"
|
|
121
132
|
></v-textarea>
|
|
122
133
|
</v-row>
|
|
123
134
|
</v-form>
|
|
@@ -127,9 +138,9 @@
|
|
|
127
138
|
<script>
|
|
128
139
|
import _ from 'lodash'
|
|
129
140
|
import draggable from 'vuedraggable'
|
|
130
|
-
import BaseContentSettings from '~/components/Content/
|
|
141
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
131
142
|
import CrudTable from '../content/CrudTable.vue'
|
|
132
|
-
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
143
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
133
144
|
|
|
134
145
|
export default {
|
|
135
146
|
name: 'SevenStrikesSettingsManager',
|
|
@@ -12,11 +12,12 @@
|
|
|
12
12
|
'windward.games.components.settings.slideshow.form.title'
|
|
13
13
|
)
|
|
14
14
|
"
|
|
15
|
+
:disabled="render"
|
|
15
16
|
></v-text-field>
|
|
16
17
|
<v-textarea
|
|
18
|
+
v-model="block.metadata.config.instructions"
|
|
17
19
|
outlined
|
|
18
20
|
auto-grow
|
|
19
|
-
v-model="block.metadata.config.instructions"
|
|
20
21
|
:counter="255"
|
|
21
22
|
maxlength="255"
|
|
22
23
|
:label="
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
'windward.games.components.settings.slideshow.form.instructions'
|
|
25
26
|
)
|
|
26
27
|
"
|
|
28
|
+
:disabled="render"
|
|
27
29
|
></v-textarea>
|
|
28
30
|
</v-container>
|
|
29
31
|
<v-divider class="my-4 primary"></v-divider>
|
|
@@ -40,6 +42,7 @@
|
|
|
40
42
|
v-bind:currentPanel.sync="
|
|
41
43
|
block.metadata.config.currentSlide
|
|
42
44
|
"
|
|
45
|
+
:disabled="render"
|
|
43
46
|
@click:close="onDeleteSlide($event)"
|
|
44
47
|
>
|
|
45
48
|
<template #header="{ item, index }">
|
|
@@ -65,6 +68,7 @@
|
|
|
65
68
|
'windward.games.components.content.blocks.slideshow.slides.slide_header'
|
|
66
69
|
)
|
|
67
70
|
"
|
|
71
|
+
:disabled="render"
|
|
68
72
|
></v-text-field>
|
|
69
73
|
<v-text-field
|
|
70
74
|
v-model="
|
|
@@ -77,6 +81,7 @@
|
|
|
77
81
|
'windward.games.components.content.blocks.slideshow.slides.slide_description'
|
|
78
82
|
)
|
|
79
83
|
"
|
|
84
|
+
:disabled="render"
|
|
80
85
|
></v-text-field>
|
|
81
86
|
<v-text-field
|
|
82
87
|
v-model="
|
|
@@ -89,6 +94,7 @@
|
|
|
89
94
|
'windward.games.components.content.blocks.slideshow.slides.image_alt'
|
|
90
95
|
)
|
|
91
96
|
"
|
|
97
|
+
:disabled="render"
|
|
92
98
|
></v-text-field>
|
|
93
99
|
<ContentBlockAsset
|
|
94
100
|
id="content-block-asset"
|
|
@@ -96,13 +102,18 @@
|
|
|
96
102
|
block.metadata.config.slides[index].image
|
|
97
103
|
"
|
|
98
104
|
mimes="image/png,image/jpeg"
|
|
105
|
+
:disabled="render"
|
|
99
106
|
></ContentBlockAsset>
|
|
100
107
|
</v-container>
|
|
101
108
|
</template>
|
|
102
109
|
</SortableExpansionPanel>
|
|
103
110
|
<v-container>
|
|
104
111
|
<v-row justify="center" class="my-4">
|
|
105
|
-
<v-btn
|
|
112
|
+
<v-btn
|
|
113
|
+
color="primary"
|
|
114
|
+
:disabled="render"
|
|
115
|
+
@click="onAddSlide"
|
|
116
|
+
>
|
|
106
117
|
<v-icon>mdi-plus</v-icon>
|
|
107
118
|
{{
|
|
108
119
|
$t(
|
|
@@ -125,10 +136,10 @@
|
|
|
125
136
|
</div>
|
|
126
137
|
</template>
|
|
127
138
|
<script>
|
|
128
|
-
import BaseContentSettings from '~/components/Content/
|
|
139
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
129
140
|
import _ from 'lodash'
|
|
130
141
|
import ContentBlockAsset from '~/components/Content/ContentBlockAsset.vue'
|
|
131
|
-
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
142
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
132
143
|
|
|
133
144
|
export default {
|
|
134
145
|
name: 'SlideShowManager',
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<v-form ref="form" v-model="valid" v-if="!loading">
|
|
4
4
|
<v-container class="pa-0">
|
|
5
5
|
<v-text-field
|
|
6
|
+
ref="title"
|
|
6
7
|
v-model="block.metadata.config.title"
|
|
7
8
|
outlined
|
|
8
9
|
:autofocus="true"
|
|
@@ -12,18 +13,19 @@
|
|
|
12
13
|
'windward.games.components.settings.bucket_game.form.title'
|
|
13
14
|
)
|
|
14
15
|
"
|
|
15
|
-
|
|
16
|
+
:disabled="render"
|
|
16
17
|
></v-text-field>
|
|
17
18
|
<v-textarea
|
|
19
|
+
v-model="block.metadata.config.instructions"
|
|
18
20
|
outlined
|
|
19
21
|
auto-grow
|
|
20
|
-
v-model="block.metadata.config.instructions"
|
|
21
22
|
:counter="255"
|
|
22
23
|
:label="
|
|
23
24
|
$t(
|
|
24
25
|
'windward.games.components.settings.bucket_game.form.instructions'
|
|
25
26
|
)
|
|
26
27
|
"
|
|
28
|
+
:disabled="render"
|
|
27
29
|
></v-textarea>
|
|
28
30
|
</v-container>
|
|
29
31
|
<v-divider class="my-4 primary"></v-divider>
|
|
@@ -37,6 +39,7 @@
|
|
|
37
39
|
</p>
|
|
38
40
|
<SortableExpansionPanel
|
|
39
41
|
v-model="block.metadata.config.answer"
|
|
42
|
+
:disabled="render"
|
|
40
43
|
@click:close="onDelete($event)"
|
|
41
44
|
>
|
|
42
45
|
<template #header="{ item, index }">
|
|
@@ -58,11 +61,12 @@
|
|
|
58
61
|
}}
|
|
59
62
|
</p>
|
|
60
63
|
<v-textarea
|
|
61
|
-
outlined
|
|
62
64
|
v-model="
|
|
63
65
|
block.metadata.config.answer[index].value
|
|
64
66
|
"
|
|
67
|
+
outlined
|
|
65
68
|
:autofocus="true"
|
|
69
|
+
:disabled="render"
|
|
66
70
|
></v-textarea>
|
|
67
71
|
</v-container>
|
|
68
72
|
</template>
|
|
@@ -70,7 +74,11 @@
|
|
|
70
74
|
</v-container>
|
|
71
75
|
<v-container class="pa-0">
|
|
72
76
|
<v-row justify="center" class="my-4">
|
|
73
|
-
<v-btn
|
|
77
|
+
<v-btn
|
|
78
|
+
color="primary"
|
|
79
|
+
:disabled="render"
|
|
80
|
+
@click="onAddElement"
|
|
81
|
+
>
|
|
74
82
|
<v-icon>mdi-plus</v-icon>
|
|
75
83
|
{{
|
|
76
84
|
$t(
|
|
@@ -80,26 +88,28 @@
|
|
|
80
88
|
</v-btn>
|
|
81
89
|
</v-row>
|
|
82
90
|
<v-textarea
|
|
91
|
+
v-model="block.metadata.config.feedback_correct"
|
|
83
92
|
outlined
|
|
84
93
|
auto-grow
|
|
85
|
-
v-model="block.metadata.config.feedback_correct"
|
|
86
94
|
:counter="255"
|
|
87
95
|
:label="
|
|
88
96
|
$t(
|
|
89
97
|
'windward.games.components.settings.bucket_game.form.feedback.correct'
|
|
90
98
|
)
|
|
91
99
|
"
|
|
100
|
+
:disabled="render"
|
|
92
101
|
></v-textarea>
|
|
93
102
|
<v-textarea
|
|
103
|
+
v-model="block.metadata.config.feedback_incorrect"
|
|
94
104
|
outlined
|
|
95
105
|
auto-grow
|
|
96
|
-
v-model="block.metadata.config.feedback_incorrect"
|
|
97
106
|
:counter="255"
|
|
98
107
|
:label="
|
|
99
108
|
$t(
|
|
100
109
|
'windward.games.components.settings.bucket_game.form.feedback.incorrect'
|
|
101
110
|
)
|
|
102
111
|
"
|
|
112
|
+
:disabled="render"
|
|
103
113
|
></v-textarea>
|
|
104
114
|
</v-container>
|
|
105
115
|
</v-form>
|
|
@@ -116,8 +126,8 @@
|
|
|
116
126
|
|
|
117
127
|
<script>
|
|
118
128
|
import _ from 'lodash'
|
|
119
|
-
import BaseContentSettings from '~/components/Content/
|
|
120
|
-
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
129
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
130
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
121
131
|
export default {
|
|
122
132
|
name: 'SortingGameSettingsManager',
|
|
123
133
|
extends: BaseContentSettings,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<v-form ref="form" v-model="valid" v-if="!loading">
|
|
4
4
|
<v-container class="pa-0">
|
|
5
5
|
<v-text-field
|
|
6
|
+
ref="title"
|
|
6
7
|
v-model="block.metadata.config.title"
|
|
7
8
|
:counter="50"
|
|
8
9
|
outlined
|
|
@@ -12,17 +13,18 @@
|
|
|
12
13
|
'windward.games.components.settings.word_jumble.title_input'
|
|
13
14
|
)
|
|
14
15
|
"
|
|
15
|
-
|
|
16
|
+
:disabled="render"
|
|
16
17
|
></v-text-field>
|
|
17
18
|
<v-textarea
|
|
19
|
+
v-model="block.metadata.config.instructions"
|
|
18
20
|
outlined
|
|
19
21
|
auto-grow
|
|
20
|
-
v-model="block.metadata.config.instructions"
|
|
21
22
|
:label="
|
|
22
23
|
$t(
|
|
23
24
|
'windward.games.components.settings.word_jumble.instructions'
|
|
24
25
|
)
|
|
25
26
|
"
|
|
27
|
+
:disabled="render"
|
|
26
28
|
></v-textarea>
|
|
27
29
|
</v-container>
|
|
28
30
|
<v-divider class="my-4 primary"></v-divider>
|
|
@@ -37,6 +39,7 @@
|
|
|
37
39
|
<SortableExpansionPanel
|
|
38
40
|
v-model="block.metadata.config.words"
|
|
39
41
|
v-bind:currentPanel.sync="block.metadata.config.currentWord"
|
|
42
|
+
:disabled="render"
|
|
40
43
|
@click:close="onDelete($event)"
|
|
41
44
|
>
|
|
42
45
|
<template #header="{ item, index }">
|
|
@@ -59,11 +62,12 @@
|
|
|
59
62
|
}}
|
|
60
63
|
</p>
|
|
61
64
|
<v-textarea
|
|
62
|
-
outlined
|
|
63
|
-
:autofocus="true"
|
|
64
65
|
v-model="
|
|
65
66
|
block.metadata.config.words[index].value
|
|
66
67
|
"
|
|
68
|
+
outlined
|
|
69
|
+
:autofocus="true"
|
|
70
|
+
:disabled="render"
|
|
67
71
|
></v-textarea>
|
|
68
72
|
</v-flex>
|
|
69
73
|
<v-flex xs12>
|
|
@@ -75,10 +79,11 @@
|
|
|
75
79
|
}}
|
|
76
80
|
</p>
|
|
77
81
|
<v-textarea
|
|
78
|
-
outlined
|
|
79
82
|
v-model="
|
|
80
83
|
block.metadata.config.words[index].hint
|
|
81
84
|
"
|
|
85
|
+
outlined
|
|
86
|
+
:disabled="render"
|
|
82
87
|
></v-textarea>
|
|
83
88
|
</v-flex>
|
|
84
89
|
</v-container>
|
|
@@ -87,7 +92,11 @@
|
|
|
87
92
|
</v-container>
|
|
88
93
|
<v-container class="pa-0">
|
|
89
94
|
<v-row justify="center" class="my-4">
|
|
90
|
-
<v-btn
|
|
95
|
+
<v-btn
|
|
96
|
+
color="primary"
|
|
97
|
+
:disabled="render"
|
|
98
|
+
@click="onAddWord"
|
|
99
|
+
>
|
|
91
100
|
<v-icon>mdi-plus</v-icon>
|
|
92
101
|
{{
|
|
93
102
|
$t(
|
|
@@ -97,6 +106,7 @@
|
|
|
97
106
|
</v-btn>
|
|
98
107
|
</v-row>
|
|
99
108
|
<v-textarea
|
|
109
|
+
ref="title"
|
|
100
110
|
v-model="block.metadata.config.feedback_correct"
|
|
101
111
|
outlined
|
|
102
112
|
auto-grow
|
|
@@ -106,17 +116,18 @@
|
|
|
106
116
|
'windward.games.components.settings.word_jumble.feedback_correct'
|
|
107
117
|
)
|
|
108
118
|
"
|
|
109
|
-
|
|
119
|
+
:disabled="render"
|
|
110
120
|
></v-textarea>
|
|
111
121
|
<v-textarea
|
|
122
|
+
v-model="block.metadata.config.feedback_incorrect"
|
|
112
123
|
outlined
|
|
113
124
|
auto-grow
|
|
114
|
-
v-model="block.metadata.config.feedback_incorrect"
|
|
115
125
|
:label="
|
|
116
126
|
$t(
|
|
117
127
|
'windward.games.components.settings.word_jumble.feedback_incorrect'
|
|
118
128
|
)
|
|
119
129
|
"
|
|
130
|
+
:disabled="render"
|
|
120
131
|
></v-textarea>
|
|
121
132
|
</v-container>
|
|
122
133
|
</v-form>
|
|
@@ -132,8 +143,8 @@
|
|
|
132
143
|
</template>
|
|
133
144
|
<script>
|
|
134
145
|
import _ from 'lodash'
|
|
135
|
-
import BaseContentSettings from '~/components/Content/
|
|
136
|
-
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
146
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
147
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
137
148
|
|
|
138
149
|
export default {
|
|
139
150
|
name: 'WordJumbleSettings',
|
package/jest.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@windward/games",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Windward UI Plugin Games",
|
|
5
5
|
"main": "plugin.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"homepage": "https://bitbucket.org/mindedge/windward-ui-plugin-games#readme",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@windward/core": "^0.0
|
|
24
|
+
"@windward/core": "^0.3.0",
|
|
25
25
|
"eslint": "^8.11.0",
|
|
26
26
|
"lodash": "^4.17.21",
|
|
27
27
|
"prettier": "^2.6.0",
|
package/plugin.js
CHANGED
|
@@ -40,7 +40,7 @@ export default {
|
|
|
40
40
|
tag: 'games-flash-card',
|
|
41
41
|
template: flashcards,
|
|
42
42
|
metadata: {
|
|
43
|
-
icon: '
|
|
43
|
+
icon: '$flashcards',
|
|
44
44
|
name: 'windward.games.shared.content_blocks.title.flashcards',
|
|
45
45
|
grouping: 'components.content.blocks.group.activities',
|
|
46
46
|
},
|
|
@@ -67,7 +67,7 @@ export default {
|
|
|
67
67
|
tag: 'games-slideshow',
|
|
68
68
|
template: slideShow,
|
|
69
69
|
metadata: {
|
|
70
|
-
icon: '
|
|
70
|
+
icon: '$slideshow',
|
|
71
71
|
name: 'windward.games.shared.content_blocks.title.slideshow',
|
|
72
72
|
grouping: 'components.content.blocks.group.multimedia',
|
|
73
73
|
},
|
|
@@ -76,7 +76,7 @@ export default {
|
|
|
76
76
|
tag: 'games-matching-game',
|
|
77
77
|
template: MatchingGame,
|
|
78
78
|
metadata: {
|
|
79
|
-
icon: '
|
|
79
|
+
icon: '$match_game',
|
|
80
80
|
name: 'windward.games.shared.content_blocks.title.matching_game',
|
|
81
81
|
grouping: 'components.content.blocks.group.activities',
|
|
82
82
|
},
|
|
@@ -94,7 +94,7 @@ export default {
|
|
|
94
94
|
tag: 'games-multiple-choice',
|
|
95
95
|
template: MultipleChoice,
|
|
96
96
|
metadata: {
|
|
97
|
-
icon: '
|
|
97
|
+
icon: '$multiple_choice',
|
|
98
98
|
name: 'windward.games.shared.content_blocks.title.multiple_choice',
|
|
99
99
|
grouping: 'components.content.blocks.group.activities',
|
|
100
100
|
},
|
|
@@ -112,7 +112,7 @@ export default {
|
|
|
112
112
|
tag: 'games-seven-strikes-game',
|
|
113
113
|
template: SevenStrikes,
|
|
114
114
|
metadata: {
|
|
115
|
-
icon: '
|
|
115
|
+
icon: '$seven_strikes',
|
|
116
116
|
name: 'windward.games.shared.content_blocks.title.seven_strikes',
|
|
117
117
|
grouping: 'components.content.blocks.group.activities',
|
|
118
118
|
},
|
|
@@ -121,7 +121,7 @@ export default {
|
|
|
121
121
|
tag: 'games-crossword-puzzle-game',
|
|
122
122
|
template: CrosswordPuzzle,
|
|
123
123
|
metadata: {
|
|
124
|
-
icon: '
|
|
124
|
+
icon: '$crossword',
|
|
125
125
|
name: 'windward.games.shared.content_blocks.title.crossword_puzzle',
|
|
126
126
|
grouping: 'components.content.blocks.group.activities',
|
|
127
127
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// TODO find better way for jest to recognize utils imports
|
|
2
|
+
/*
|
|
2
3
|
jest.mock(
|
|
3
|
-
'~/components/
|
|
4
|
+
'~/components/SomeComponent.vue',
|
|
4
5
|
() => {
|
|
5
6
|
return {
|
|
6
7
|
data() {
|
|
@@ -10,3 +11,4 @@ jest.mock(
|
|
|
10
11
|
},
|
|
11
12
|
{ virtual: true }
|
|
12
13
|
)
|
|
14
|
+
*/
|
|
@@ -1,88 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import axios from 'axios'
|
|
4
|
-
jest.mock('axios')
|
|
5
|
-
mockModel.$http = axios
|
|
6
|
-
|
|
7
|
-
jest.mock('axios')
|
|
1
|
+
//import { registerVirtualModels, registerModels } from '@windward/core/test/__mocks__/modelMock.js'
|
|
8
2
|
|
|
9
3
|
// Define any new model mocks here. The imports / mocks will be auto-generated below
|
|
10
|
-
|
|
4
|
+
/*
|
|
5
|
+
registerVirtualModels([
|
|
11
6
|
{
|
|
12
|
-
path: '~/models/
|
|
13
|
-
resource: '
|
|
7
|
+
path: '~/models/MyNewModel',
|
|
8
|
+
resource: 'my-new-model',
|
|
14
9
|
},
|
|
15
|
-
]
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
default: class Model {},
|
|
24
|
-
}
|
|
25
|
-
})
|
|
26
|
-
class mockBaseModel extends mockModel {
|
|
27
|
-
baseURL() {
|
|
28
|
-
return 'http://windwardapi.local'
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
request(_config) {
|
|
32
|
-
return new Promise((resolve) => {
|
|
33
|
-
resolve({ data: {} })
|
|
34
|
-
})
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
jest.mock(
|
|
39
|
-
'~/models/Model',
|
|
40
|
-
() => {
|
|
41
|
-
return {
|
|
42
|
-
__esModule: true,
|
|
43
|
-
default: class Model extends mockBaseModel {},
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
{ virtual: true }
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
for (let mockI = 0; mockI < mockVirtualModels.length; mockI++) {
|
|
50
|
-
jest.mock(
|
|
51
|
-
mockVirtualModels[mockI].path,
|
|
52
|
-
() => {
|
|
53
|
-
return {
|
|
54
|
-
__esModule: true,
|
|
55
|
-
default: class Model extends mockBaseModel {
|
|
56
|
-
resource() {
|
|
57
|
-
return (
|
|
58
|
-
mockVirtualModels[mockI].resource ||
|
|
59
|
-
this.constructor.name
|
|
60
|
-
)
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
{ virtual: true }
|
|
66
|
-
)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
for (let mockJ = 0; mockJ < mockModels.length; mockJ++) {
|
|
70
|
-
jest.mock(mockModels[mockJ].path, () => {
|
|
71
|
-
return {
|
|
72
|
-
__esModule: true,
|
|
73
|
-
default: class Model extends mockBaseModel {
|
|
74
|
-
resource() {
|
|
75
|
-
return mockModels[mockJ].resource || this.constructor.name
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
integrations() {
|
|
79
|
-
return this
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
get() {
|
|
83
|
-
return []
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
}
|
|
87
|
-
})
|
|
88
|
-
}
|
|
10
|
+
])
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
registerModels([
|
|
15
|
+
{ path: '../../models/UserFileAsset', resource: 'user-files' },
|
|
16
|
+
])
|
|
17
|
+
*/
|
|
@@ -49,11 +49,13 @@ describe('WordJumble manager', () => {
|
|
|
49
49
|
id: 1,
|
|
50
50
|
value: '',
|
|
51
51
|
hint: '',
|
|
52
|
+
shuffledWord: '',
|
|
52
53
|
},
|
|
53
54
|
{
|
|
54
55
|
id: 2,
|
|
55
56
|
value: '',
|
|
56
57
|
hint: '',
|
|
58
|
+
shuffledWord: '',
|
|
57
59
|
},
|
|
58
60
|
])
|
|
59
61
|
})
|
|
@@ -78,6 +80,7 @@ describe('WordJumble manager', () => {
|
|
|
78
80
|
id: 1,
|
|
79
81
|
value: '',
|
|
80
82
|
hint: '',
|
|
83
|
+
shuffledWord: '',
|
|
81
84
|
},
|
|
82
85
|
])
|
|
83
86
|
})
|