@windward/games 0.0.9 → 0.1.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/CrudTable.vue +2 -2
- package/components/content/blocks/crosswordPuzzle/CrosswordClues.vue +4 -2
- package/components/content/blocks/crosswordPuzzle/CrosswordPuzzle.vue +14 -12
- package/components/content/blocks/dragDrop/BucketGame.vue +54 -101
- package/components/content/blocks/dragDrop/SortingGame.vue +47 -33
- package/components/content/blocks/flashcards/CardFace.vue +38 -39
- package/components/content/blocks/flashcards/Flashcard.vue +109 -28
- package/components/content/blocks/flashcards/FlashcardSlides.vue +3 -2
- package/components/content/blocks/matchingGame/MatchingGame.vue +105 -61
- package/components/content/blocks/multipleChoice/MultipleChoice.vue +186 -225
- package/components/content/blocks/multipleChoice/QuestionDialog.vue +7 -7
- package/components/content/blocks/quizshowGame/AnswerPanel.vue +31 -24
- package/components/content/blocks/quizshowGame/Gridview.vue +20 -24
- package/components/content/blocks/quizshowGame/QuizShow.vue +22 -9
- package/components/content/blocks/quizshowGame/feedbackIcons.vue +4 -2
- package/components/content/blocks/sevenStrikes/SevenStikes.vue +153 -108
- package/components/content/blocks/sevenStrikes/keyboard.vue +9 -2
- package/components/content/blocks/slideshow/SlideShow.vue +5 -3
- package/components/content/blocks/wordJumble/Jumble.vue +4 -4
- package/components/content/blocks/wordJumble/WordJumble.vue +128 -62
- package/components/settings/BucketGameSettingsManager.vue +185 -359
- package/components/settings/CrosswordPuzzleSettingsManager.vue +114 -181
- package/components/settings/FlashCardSlidesManager.vue +323 -419
- package/components/settings/MatchingGameManager.vue +357 -618
- package/components/settings/MultipleChoiceSettingsManager.vue +130 -140
- package/components/settings/QuizShowSettingsManager.vue +17 -17
- package/components/settings/SevenStrikesSettingsManager.vue +131 -193
- package/components/settings/SlideShowManager.vue +91 -129
- package/components/settings/SortingGameSettingsManager.vue +41 -153
- package/components/settings/WordJumbleSettingsManager.vue +84 -150
- package/i18n/en-US/components/content/blocks/bucket_game.ts +1 -0
- package/i18n/en-US/components/content/blocks/flashcard.ts +3 -0
- package/i18n/en-US/components/content/blocks/word_jumble.ts +2 -0
- package/i18n/en-US/components/settings/bucket_game.ts +3 -2
- package/i18n/en-US/components/settings/flashcard.ts +1 -0
- package/i18n/en-US/components/settings/matching_game.ts +1 -1
- package/i18n/en-US/components/settings/quizshow_game.ts +1 -1
- package/i18n/en-US/components/settings/seven_strikes.ts +1 -1
- package/i18n/en-US/components/settings/slideshow.ts +2 -0
- package/i18n/en-US/index.ts +2 -1
- package/i18n/es-ES/components/content/blocks/bucket_game.ts +40 -0
- package/i18n/es-ES/components/content/blocks/crossword.ts +25 -0
- package/i18n/es-ES/components/content/blocks/flashcard.ts +8 -0
- package/i18n/es-ES/components/content/blocks/index.ts +23 -0
- package/i18n/es-ES/components/content/blocks/matching_game.ts +26 -0
- package/i18n/es-ES/components/content/blocks/multiple_choice.ts +9 -0
- package/i18n/es-ES/components/content/blocks/quizshow_game.ts +35 -0
- package/i18n/es-ES/components/content/blocks/seven_strikes.ts +6 -0
- package/i18n/es-ES/components/content/blocks/slideshow.ts +13 -0
- package/i18n/es-ES/components/content/blocks/sorting_game.ts +5 -0
- package/i18n/es-ES/components/content/blocks/word_jumble.ts +11 -0
- package/i18n/es-ES/components/content/crud_table.ts +6 -0
- package/i18n/es-ES/components/content/index.ts +7 -0
- package/i18n/es-ES/components/index.ts +9 -0
- package/i18n/es-ES/components/navigation/index.ts +5 -0
- package/i18n/es-ES/components/settings/bucket_game.ts +39 -0
- package/i18n/es-ES/components/settings/crossword.ts +7 -0
- package/i18n/es-ES/components/settings/flashcard.ts +29 -0
- package/i18n/es-ES/components/settings/index.ts +23 -0
- package/i18n/es-ES/components/settings/matching_game.ts +15 -0
- package/i18n/es-ES/components/settings/multiple_choice.ts +17 -0
- package/i18n/es-ES/components/settings/quizshow_game.ts +20 -0
- package/i18n/es-ES/components/settings/seven_strikes.ts +8 -0
- package/i18n/es-ES/components/settings/slideshow.ts +13 -0
- package/i18n/es-ES/components/settings/sorting_game.ts +5 -0
- package/i18n/es-ES/components/settings/word_jumble.ts +11 -0
- package/i18n/es-ES/index.ts +16 -0
- package/i18n/es-ES/modules/index.ts +5 -0
- package/i18n/es-ES/pages/index.ts +5 -0
- package/i18n/es-ES/shared/content_blocks.ts +18 -0
- package/i18n/es-ES/shared/index.ts +7 -0
- package/i18n/es-ES/shared/settings.ts +14 -0
- package/i18n/index.ts +11 -0
- package/i18n/sv-SE/components/content/blocks/bucket_game.ts +40 -0
- package/i18n/sv-SE/components/content/blocks/crossword.ts +20 -0
- package/i18n/sv-SE/components/content/blocks/flashcard.ts +8 -0
- package/i18n/sv-SE/components/content/blocks/index.ts +23 -0
- package/i18n/sv-SE/components/content/blocks/matching_game.ts +25 -0
- package/i18n/sv-SE/components/content/blocks/multiple_choice.ts +9 -0
- package/i18n/sv-SE/components/content/blocks/quizshow_game.ts +35 -0
- package/i18n/sv-SE/components/content/blocks/seven_strikes.ts +6 -0
- package/i18n/sv-SE/components/content/blocks/slideshow.ts +13 -0
- package/i18n/sv-SE/components/content/blocks/sorting_game.ts +5 -0
- package/i18n/sv-SE/components/content/blocks/word_jumble.ts +11 -0
- package/i18n/sv-SE/components/content/crud_table.ts +6 -0
- package/i18n/sv-SE/components/content/index.ts +7 -0
- package/i18n/sv-SE/components/index.ts +9 -0
- package/i18n/sv-SE/components/navigation/index.ts +5 -0
- package/i18n/sv-SE/components/settings/bucket_game.ts +38 -0
- package/i18n/sv-SE/components/settings/crossword.ts +7 -0
- package/i18n/sv-SE/components/settings/flashcard.ts +29 -0
- package/i18n/sv-SE/components/settings/index.ts +23 -0
- package/i18n/sv-SE/components/settings/matching_game.ts +15 -0
- package/i18n/sv-SE/components/settings/multiple_choice.ts +16 -0
- package/i18n/sv-SE/components/settings/quizshow_game.ts +20 -0
- package/i18n/sv-SE/components/settings/seven_strikes.ts +8 -0
- package/i18n/sv-SE/components/settings/slideshow.ts +13 -0
- package/i18n/sv-SE/components/settings/sorting_game.ts +5 -0
- package/i18n/sv-SE/components/settings/word_jumble.ts +11 -0
- package/i18n/sv-SE/index.ts +16 -0
- package/i18n/sv-SE/modules/index.ts +5 -0
- package/i18n/sv-SE/pages/index.ts +5 -0
- package/i18n/sv-SE/shared/content_blocks.ts +18 -0
- package/i18n/sv-SE/shared/index.ts +7 -0
- package/i18n/sv-SE/shared/settings.ts +14 -0
- package/package.json +1 -1
- package/plugin.js +33 -34
- package/test/Feature/LocaleKeys.spec.js +11 -0
- package/test/__mocks__/componentsMock.js +12 -0
- package/test/__mocks__/fileMock.js +1 -0
- package/test/__mocks__/modelMock.js +88 -0
- package/test/__mocks__/styleMock.js +1 -0
- package/test/blocks/crossword/CrosswordPuzzle.spec.js +1 -1
- package/test/blocks/dragDrop/BucketGame.spec.js +1 -1
- package/test/blocks/dragDrop/SortingGame.spec.js +1 -1
- package/test/blocks/flashcards/CardFace.spec.js +1 -1
- package/test/blocks/flashcards/FlashCardSlides.spec.js +1 -1
- package/test/blocks/flashcards/Flashcard.spec.js +1 -1
- package/test/blocks/matchingGame/MatchingGame.spec.js +1 -1
- package/test/blocks/multipleChoice/MultipleChoice.spec.js +1 -1
- package/test/blocks/multipleChoice/QuestionDialog.spec.js +1 -1
- package/test/blocks/quizShow/quizShow.spec.js +1 -1
- package/test/blocks/sevenStrikes/sevenStrikes.spec.js +1 -1
- package/test/blocks/slideshow/slideshow.spec.js +1 -1
- package/test/blocks/wordJumble/Jumble.spec.js +1 -1
- package/test/blocks/wordJumble/WordJumble.spec.js +1 -1
- package/test/mocks.js +8 -2
- package/test/settings/BucketGameManager.spec.js +4 -4
- package/test/settings/CrosswordPuzzleManager.spec.js +6 -11
- package/test/settings/FlashCardSlidesManager.spec.js +1 -1
- package/test/settings/MatchingGameManager.spec.js +1 -1
- package/test/settings/MultipleChoiceGameManager.spec.js +1 -1
- package/test/settings/SevenStrikesManager.spec.js +1 -1
- package/test/settings/SlideShowManager.spec.js +1 -1
- package/test/settings/SortingGameManager.spec.js +1 -1
- package/test/settings/WordJumbleManager.spec.js +1 -4
- package/i18n/en-US.ts +0 -5
package/plugin.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import locales from './i18n'
|
|
2
|
+
|
|
2
3
|
import flashcards from './components/content/blocks/flashcards/FlashcardSlides'
|
|
3
4
|
import slideShow from './components/content/blocks/slideshow/SlideShow.vue'
|
|
4
5
|
import WordJumble from './components/content/blocks/wordJumble/WordJumble'
|
|
@@ -32,9 +33,7 @@ export default {
|
|
|
32
33
|
onLoad: (page) => {},
|
|
33
34
|
onContent: () => {},
|
|
34
35
|
},
|
|
35
|
-
i18n:
|
|
36
|
-
'en-US': enUS,
|
|
37
|
-
},
|
|
36
|
+
i18n: locales.messages,
|
|
38
37
|
components: {
|
|
39
38
|
contentBlock: [
|
|
40
39
|
{
|
|
@@ -42,9 +41,9 @@ export default {
|
|
|
42
41
|
template: flashcards,
|
|
43
42
|
metadata: {
|
|
44
43
|
icon: 'mdi-cards-variant',
|
|
45
|
-
name: '
|
|
44
|
+
name: 'windward.games.shared.content_blocks.title.flashcards',
|
|
46
45
|
grouping:
|
|
47
|
-
'
|
|
46
|
+
'windward.games.shared.content_blocks.grouping.game',
|
|
48
47
|
},
|
|
49
48
|
},
|
|
50
49
|
{
|
|
@@ -52,9 +51,9 @@ export default {
|
|
|
52
51
|
template: SortingGame,
|
|
53
52
|
metadata: {
|
|
54
53
|
icon: 'mdi-sort',
|
|
55
|
-
name: '
|
|
54
|
+
name: 'windward.games.shared.content_blocks.title.sort',
|
|
56
55
|
grouping:
|
|
57
|
-
'
|
|
56
|
+
'windward.games.shared.content_blocks.grouping.game',
|
|
58
57
|
},
|
|
59
58
|
},
|
|
60
59
|
{
|
|
@@ -62,9 +61,9 @@ export default {
|
|
|
62
61
|
template: BucketGame,
|
|
63
62
|
metadata: {
|
|
64
63
|
icon: 'mdi-bucket-outline',
|
|
65
|
-
name: '
|
|
64
|
+
name: 'windward.games.shared.content_blocks.title.bucket',
|
|
66
65
|
grouping:
|
|
67
|
-
'
|
|
66
|
+
'windward.games.shared.content_blocks.grouping.game',
|
|
68
67
|
},
|
|
69
68
|
},
|
|
70
69
|
{
|
|
@@ -72,9 +71,9 @@ export default {
|
|
|
72
71
|
template: slideShow,
|
|
73
72
|
metadata: {
|
|
74
73
|
icon: 'mdi-view-gallery',
|
|
75
|
-
name: '
|
|
74
|
+
name: 'windward.games.shared.content_blocks.title.slideshow',
|
|
76
75
|
grouping:
|
|
77
|
-
'
|
|
76
|
+
'windward.games.shared.content_blocks.grouping.multimedia',
|
|
78
77
|
},
|
|
79
78
|
},
|
|
80
79
|
{
|
|
@@ -82,9 +81,9 @@ export default {
|
|
|
82
81
|
template: MatchingGame,
|
|
83
82
|
metadata: {
|
|
84
83
|
icon: 'mdi-image-filter-none',
|
|
85
|
-
name: '
|
|
84
|
+
name: 'windward.games.shared.content_blocks.title.matching_game',
|
|
86
85
|
grouping:
|
|
87
|
-
'
|
|
86
|
+
'windward.games.shared.content_blocks.grouping.game',
|
|
88
87
|
},
|
|
89
88
|
},
|
|
90
89
|
{
|
|
@@ -92,9 +91,9 @@ export default {
|
|
|
92
91
|
template: quizShow,
|
|
93
92
|
metadata: {
|
|
94
93
|
icon: 'mdi-head-question-outline',
|
|
95
|
-
name: '
|
|
94
|
+
name: 'windward.games.shared.content_blocks.title.quizshow',
|
|
96
95
|
grouping:
|
|
97
|
-
'
|
|
96
|
+
'windward.games.shared.content_blocks.grouping.game',
|
|
98
97
|
},
|
|
99
98
|
},
|
|
100
99
|
{
|
|
@@ -102,9 +101,9 @@ export default {
|
|
|
102
101
|
template: MultipleChoice,
|
|
103
102
|
metadata: {
|
|
104
103
|
icon: 'mdi-head-question-outline',
|
|
105
|
-
name: '
|
|
104
|
+
name: 'windward.games.shared.content_blocks.title.multiple_choice',
|
|
106
105
|
grouping:
|
|
107
|
-
'
|
|
106
|
+
'windward.games.shared.content_blocks.grouping.game',
|
|
108
107
|
},
|
|
109
108
|
},
|
|
110
109
|
{
|
|
@@ -112,9 +111,9 @@ export default {
|
|
|
112
111
|
template: WordJumble,
|
|
113
112
|
metadata: {
|
|
114
113
|
icon: 'mdi-ab-testing',
|
|
115
|
-
name: '
|
|
114
|
+
name: 'windward.games.shared.content_blocks.title.word_jumble',
|
|
116
115
|
grouping:
|
|
117
|
-
'
|
|
116
|
+
'windward.games.shared.content_blocks.grouping.game',
|
|
118
117
|
},
|
|
119
118
|
},
|
|
120
119
|
{
|
|
@@ -122,9 +121,9 @@ export default {
|
|
|
122
121
|
template: SevenStrikes,
|
|
123
122
|
metadata: {
|
|
124
123
|
icon: 'mdi-ab-testing',
|
|
125
|
-
name: '
|
|
124
|
+
name: 'windward.games.shared.content_blocks.title.seven_strikes',
|
|
126
125
|
grouping:
|
|
127
|
-
'
|
|
126
|
+
'windward.games.shared.content_blocks.grouping.game',
|
|
128
127
|
},
|
|
129
128
|
},
|
|
130
129
|
{
|
|
@@ -132,9 +131,9 @@ export default {
|
|
|
132
131
|
template: CrosswordPuzzle,
|
|
133
132
|
metadata: {
|
|
134
133
|
icon: 'mdi-alpha-c-box-outline',
|
|
135
|
-
name: '
|
|
134
|
+
name: 'windward.games.shared.content_blocks.title.crossword_puzzle',
|
|
136
135
|
grouping:
|
|
137
|
-
'
|
|
136
|
+
'windward.games.shared.content_blocks.grouping.game',
|
|
138
137
|
},
|
|
139
138
|
},
|
|
140
139
|
],
|
|
@@ -145,7 +144,7 @@ export default {
|
|
|
145
144
|
context: ['block.games-flash-card'],
|
|
146
145
|
metadata: {
|
|
147
146
|
icon: 'mdi-cog',
|
|
148
|
-
name: '
|
|
147
|
+
name: 'windward.games.shared.settings.title.card_manager',
|
|
149
148
|
},
|
|
150
149
|
},
|
|
151
150
|
{
|
|
@@ -154,7 +153,7 @@ export default {
|
|
|
154
153
|
context: ['block.games-bucket'],
|
|
155
154
|
metadata: {
|
|
156
155
|
icon: 'mdi-cog',
|
|
157
|
-
name: '
|
|
156
|
+
name: 'windward.games.shared.settings.title.bucket_manager',
|
|
158
157
|
},
|
|
159
158
|
},
|
|
160
159
|
{
|
|
@@ -163,7 +162,7 @@ export default {
|
|
|
163
162
|
context: ['block.games-sorting'],
|
|
164
163
|
metadata: {
|
|
165
164
|
icon: 'mdi-cog',
|
|
166
|
-
name: '
|
|
165
|
+
name: 'windward.games.shared.settings.title.sorting_manager',
|
|
167
166
|
},
|
|
168
167
|
},
|
|
169
168
|
{
|
|
@@ -172,7 +171,7 @@ export default {
|
|
|
172
171
|
context: ['block.games-slideshow'],
|
|
173
172
|
metadata: {
|
|
174
173
|
icon: 'mdi-cog',
|
|
175
|
-
name: '
|
|
174
|
+
name: 'windward.games.shared.settings.title.slideshow_manager',
|
|
176
175
|
},
|
|
177
176
|
},
|
|
178
177
|
{
|
|
@@ -181,7 +180,7 @@ export default {
|
|
|
181
180
|
context: ['block.games-matching-game'],
|
|
182
181
|
metadata: {
|
|
183
182
|
icon: 'mdi-cog',
|
|
184
|
-
name: '
|
|
183
|
+
name: 'windward.games.shared.settings.title.matching_game_manager',
|
|
185
184
|
},
|
|
186
185
|
},
|
|
187
186
|
{
|
|
@@ -190,7 +189,7 @@ export default {
|
|
|
190
189
|
context: ['block.games-quizshow-game'],
|
|
191
190
|
metadata: {
|
|
192
191
|
icon: 'mdi-cog',
|
|
193
|
-
name: '
|
|
192
|
+
name: 'windward.games.shared.settings.title.quizshow_manager',
|
|
194
193
|
},
|
|
195
194
|
},
|
|
196
195
|
{
|
|
@@ -199,7 +198,7 @@ export default {
|
|
|
199
198
|
context: ['block.games-multiple-choice'],
|
|
200
199
|
metadata: {
|
|
201
200
|
icon: 'mdi-cog',
|
|
202
|
-
name: '
|
|
201
|
+
name: 'windward.games.shared.settings.title.multiple_choice_manager',
|
|
203
202
|
},
|
|
204
203
|
},
|
|
205
204
|
{
|
|
@@ -208,7 +207,7 @@ export default {
|
|
|
208
207
|
context: ['block.games-wordjumble-game'],
|
|
209
208
|
metadata: {
|
|
210
209
|
icon: 'mdi-cog',
|
|
211
|
-
name: '
|
|
210
|
+
name: 'windward.games.shared.settings.title.wordjumble_manager',
|
|
212
211
|
},
|
|
213
212
|
},
|
|
214
213
|
{
|
|
@@ -217,7 +216,7 @@ export default {
|
|
|
217
216
|
context: ['block.games-seven-strikes-game'],
|
|
218
217
|
metadata: {
|
|
219
218
|
icon: 'mdi-cog',
|
|
220
|
-
name: '
|
|
219
|
+
name: 'windward.games.shared.settings.title.seven_strikes_manager',
|
|
221
220
|
},
|
|
222
221
|
},
|
|
223
222
|
{
|
|
@@ -226,7 +225,7 @@ export default {
|
|
|
226
225
|
context: ['block.games-crossword-puzzle-game'],
|
|
227
226
|
metadata: {
|
|
228
227
|
icon: 'mdi-cog',
|
|
229
|
-
name: '
|
|
228
|
+
name: 'windward.games.shared.settings.title.crossword_puzzle_manager',
|
|
230
229
|
},
|
|
231
230
|
},
|
|
232
231
|
],
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import _ from 'lodash'
|
|
2
|
+
import locales from '../../i18n'
|
|
3
|
+
import localeTest from '@windward/core/test/locales'
|
|
4
|
+
|
|
5
|
+
describe('LocaleKeys', () => {
|
|
6
|
+
test('Confirm that all localizations are equal aka not missing keys between them', () => {
|
|
7
|
+
const messages = locales.messages
|
|
8
|
+
//console.log('here it is', messages)
|
|
9
|
+
localeTest.test(messages)
|
|
10
|
+
})
|
|
11
|
+
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = 'test-file-stub'
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Model as mockModel } from 'vue-api-query'
|
|
2
|
+
|
|
3
|
+
import axios from 'axios'
|
|
4
|
+
jest.mock('axios')
|
|
5
|
+
mockModel.$http = axios
|
|
6
|
+
|
|
7
|
+
jest.mock('axios')
|
|
8
|
+
|
|
9
|
+
// Define any new model mocks here. The imports / mocks will be auto-generated below
|
|
10
|
+
const mockVirtualModels = [
|
|
11
|
+
{
|
|
12
|
+
path: '~/models/UserContentBlockState',
|
|
13
|
+
resource: 'user-content-block-state',
|
|
14
|
+
},
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
const mockModels = []
|
|
18
|
+
|
|
19
|
+
// DO NOT ALTER THE BELOW CODE
|
|
20
|
+
jest.mock('', () => {
|
|
21
|
+
return {
|
|
22
|
+
__esModule: true,
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils'
|
|
2
|
-
import { defaultMocks } from '
|
|
2
|
+
import { defaultMocks } from '@/test/mocks'
|
|
3
3
|
import CrosswordPuzzle from '@/components/content/blocks/crosswordPuzzle/CrosswordPuzzle'
|
|
4
4
|
|
|
5
5
|
import Vuetify from 'vuetify'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mount, shallowMount } from '@vue/test-utils'
|
|
2
|
-
import { defaultMocks } from '
|
|
2
|
+
import { defaultMocks } from '@/test/mocks'
|
|
3
3
|
import FlashcardSlides from '@/components/content/blocks/flashcards/FlashcardSlides'
|
|
4
4
|
|
|
5
5
|
import Vuetify from 'vuetify'
|
package/test/mocks.js
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { defaultMocks as coreMocks } from '@windward/core/test/mocks'
|
|
2
|
+
|
|
3
|
+
require('./__mocks__/fileMock')
|
|
4
|
+
require('./__mocks__/styleMock')
|
|
5
|
+
require('./__mocks__/modelMock')
|
|
6
|
+
require('./__mocks__/componentsMock')
|
|
7
|
+
|
|
8
|
+
export const defaultMocks = coreMocks
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils'
|
|
2
|
-
import { defaultMocks } from '
|
|
2
|
+
import { defaultMocks } from '@/test/mocks'
|
|
3
3
|
import BucketGameSettingsManager from '@/components/settings/BucketGameSettingsManager'
|
|
4
4
|
|
|
5
5
|
import Vuetify from 'vuetify'
|
|
@@ -47,8 +47,8 @@ describe('Bucket game manager', () => {
|
|
|
47
47
|
})
|
|
48
48
|
wrapper.vm.onAddBucket()
|
|
49
49
|
expect(wrapper.vm.block.metadata.config.bucket_titles).toEqual([
|
|
50
|
-
{ title: '', color: '', expand: false },
|
|
51
|
-
{ title: '', color: '', expand: true },
|
|
50
|
+
{ title: '', color: '#eceff1', expand: false },
|
|
51
|
+
{ title: '', color: '#eceff1', expand: true },
|
|
52
52
|
])
|
|
53
53
|
})
|
|
54
54
|
|
|
@@ -99,7 +99,7 @@ describe('Bucket game manager', () => {
|
|
|
99
99
|
})
|
|
100
100
|
wrapper.vm.onConfirmDeleteBucket(0)
|
|
101
101
|
expect(wrapper.vm.block.metadata.config.bucket_titles).toEqual([
|
|
102
|
-
{ title: '', color: '', expand: true },
|
|
102
|
+
{ title: '', color: '#eceff1', expand: true },
|
|
103
103
|
])
|
|
104
104
|
})
|
|
105
105
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils'
|
|
2
|
-
import { defaultMocks } from '
|
|
2
|
+
import { defaultMocks } from '@/test/mocks'
|
|
3
3
|
import CrosswordPuzzleSettingsManager from '@/components/settings/CrosswordPuzzleSettingsManager'
|
|
4
4
|
|
|
5
5
|
import Vuetify from 'vuetify'
|
|
@@ -50,20 +50,17 @@ describe('Crossword game manager', () => {
|
|
|
50
50
|
{
|
|
51
51
|
id: 0,
|
|
52
52
|
word: '',
|
|
53
|
-
|
|
54
|
-
expand: false,
|
|
53
|
+
clue: '',
|
|
55
54
|
},
|
|
56
55
|
{
|
|
57
56
|
id: 1,
|
|
58
57
|
word: '',
|
|
59
|
-
|
|
60
|
-
expand: false,
|
|
58
|
+
clue: '',
|
|
61
59
|
},
|
|
62
60
|
{
|
|
63
61
|
id: 2,
|
|
64
62
|
word: '',
|
|
65
|
-
|
|
66
|
-
expand: true,
|
|
63
|
+
clue: '',
|
|
67
64
|
},
|
|
68
65
|
])
|
|
69
66
|
})
|
|
@@ -89,14 +86,12 @@ describe('Crossword game manager', () => {
|
|
|
89
86
|
{
|
|
90
87
|
id: 0,
|
|
91
88
|
word: '',
|
|
92
|
-
|
|
93
|
-
expand: false,
|
|
89
|
+
clue: '',
|
|
94
90
|
},
|
|
95
91
|
{
|
|
96
92
|
id: 1,
|
|
97
93
|
word: '',
|
|
98
|
-
|
|
99
|
-
expand: true,
|
|
94
|
+
clue: '',
|
|
100
95
|
},
|
|
101
96
|
])
|
|
102
97
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mount, shallowMount } from '@vue/test-utils'
|
|
2
|
-
import { defaultMocks } from '
|
|
2
|
+
import { defaultMocks } from '@/test/mocks'
|
|
3
3
|
import MatchingGameManager from '@/components/settings/MatchingGameManager'
|
|
4
4
|
import Vuetify from 'vuetify'
|
|
5
5
|
import Vue from 'vue'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mount, shallowMount } from '@vue/test-utils'
|
|
2
|
-
import { defaultMocks } from '
|
|
2
|
+
import { defaultMocks } from '@/test/mocks'
|
|
3
3
|
import MultipleChoiceSettingsManager from '@/components/settings/MultipleChoiceSettingsManager'
|
|
4
4
|
import Vuetify from 'vuetify'
|
|
5
5
|
import Vue from 'vue'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils'
|
|
2
|
-
import { defaultMocks } from '
|
|
2
|
+
import { defaultMocks } from '@/test/mocks'
|
|
3
3
|
import SevenStrikesSettingsManager from '@/components/settings/SevenStrikesSettingsManager'
|
|
4
4
|
|
|
5
5
|
import Vuetify from 'vuetify'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils'
|
|
2
|
-
import { defaultMocks } from '
|
|
2
|
+
import { defaultMocks } from '@/test/mocks'
|
|
3
3
|
import SortingGameSettingsManager from '@/components/settings/SortingGameSettingsManager'
|
|
4
4
|
|
|
5
5
|
import Vuetify from 'vuetify'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mount, shallowMount } from '@vue/test-utils'
|
|
2
|
-
import { defaultMocks } from '
|
|
2
|
+
import { defaultMocks } from '@/test/mocks'
|
|
3
3
|
import WordJumbleSettingsManager from '@/components/settings/WordJumbleSettingsManager'
|
|
4
4
|
|
|
5
5
|
import Vuetify from 'vuetify'
|
|
@@ -49,13 +49,11 @@ describe('WordJumble manager', () => {
|
|
|
49
49
|
id: 1,
|
|
50
50
|
value: '',
|
|
51
51
|
hint: '',
|
|
52
|
-
expand: false,
|
|
53
52
|
},
|
|
54
53
|
{
|
|
55
54
|
id: 2,
|
|
56
55
|
value: '',
|
|
57
56
|
hint: '',
|
|
58
|
-
expand: true,
|
|
59
57
|
},
|
|
60
58
|
])
|
|
61
59
|
})
|
|
@@ -80,7 +78,6 @@ describe('WordJumble manager', () => {
|
|
|
80
78
|
id: 1,
|
|
81
79
|
value: '',
|
|
82
80
|
hint: '',
|
|
83
|
-
expand: true,
|
|
84
81
|
},
|
|
85
82
|
])
|
|
86
83
|
})
|