@windward/games 0.8.1 → 0.10.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/CHANGELOG.md +3 -0
- package/components/content/blocks/crosswordPuzzle/CrosswordPuzzle.vue +4 -24
- package/components/content/blocks/dragDrop/BucketGame.vue +139 -60
- package/components/content/blocks/flashcards/CardFace.vue +22 -57
- package/components/content/blocks/flashcards/Flashcard.vue +19 -16
- package/components/content/blocks/flashcards/FlashcardSlides.vue +13 -38
- package/components/content/blocks/matchingGame/MatchingGame.vue +3 -3
- package/components/content/blocks/multipleChoice/MultipleChoice.vue +18 -118
- package/components/content/blocks/sevenStrikes/SevenStikes.vue +158 -165
- package/components/content/blocks/slideshow/SlideShow.vue +49 -99
- package/components/content/blocks/wordJumble/WordJumble.vue +122 -129
- package/components/settings/BucketGameSettingsManager.vue +9 -0
- package/components/settings/FlashCardSlidesManager.vue +26 -91
- package/i18n/en-US/components/content/blocks/bucket_game.ts +1 -0
- package/i18n/en-US/components/content/blocks/multiple_choice.ts +0 -1
- package/i18n/en-US/shared/content_blocks.ts +1 -0
- package/i18n/es-ES/components/content/blocks/bucket_game.ts +1 -0
- package/i18n/es-ES/components/content/blocks/multiple_choice.ts +0 -1
- package/i18n/es-ES/shared/content_blocks.ts +1 -0
- package/i18n/sv-SE/components/content/blocks/bucket_game.ts +1 -0
- package/i18n/sv-SE/components/content/blocks/multiple_choice.ts +0 -1
- package/i18n/sv-SE/shared/content_blocks.ts +1 -0
- package/package.json +1 -1
- package/test/__mocks__/contentBlockMock.js +94 -0
- package/test/mocks.js +1 -0
- package/test/settings/BucketGameManager.spec.js +3 -3
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import mock_ from 'lodash'
|
|
2
|
+
|
|
3
|
+
jest.mock(
|
|
4
|
+
'~/components/Content/ActionPanel.vue',
|
|
5
|
+
() => {
|
|
6
|
+
return jest.fn().mockImplementation(() => {
|
|
7
|
+
return { test: () => {} }
|
|
8
|
+
})
|
|
9
|
+
},
|
|
10
|
+
{ virtual: true }
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
jest.mock(
|
|
14
|
+
'~/components/Content/ContentBlockAsset.vue',
|
|
15
|
+
() => {
|
|
16
|
+
return jest.fn().mockImplementation(() => {
|
|
17
|
+
return { test: () => {} }
|
|
18
|
+
})
|
|
19
|
+
},
|
|
20
|
+
{ virtual: true }
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
jest.mock(
|
|
24
|
+
'~/components/Content/ImageAssetViewer.vue',
|
|
25
|
+
() => {
|
|
26
|
+
return jest.fn().mockImplementation(() => {
|
|
27
|
+
return { test: () => {} }
|
|
28
|
+
})
|
|
29
|
+
},
|
|
30
|
+
{ virtual: true }
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
jest.mock(
|
|
34
|
+
'~/components/Content/Settings/ImageAssetSettings.vue',
|
|
35
|
+
() => {
|
|
36
|
+
return jest.fn().mockImplementation(() => {
|
|
37
|
+
return { test: () => {} }
|
|
38
|
+
})
|
|
39
|
+
},
|
|
40
|
+
{ virtual: true }
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
jest.mock(
|
|
44
|
+
'~/components/Text/TextViewer.vue',
|
|
45
|
+
() => {
|
|
46
|
+
return {
|
|
47
|
+
props: {},
|
|
48
|
+
computed: {
|
|
49
|
+
body() {
|
|
50
|
+
return ''
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
data() {
|
|
54
|
+
return {}
|
|
55
|
+
},
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{ virtual: true }
|
|
59
|
+
)
|
|
60
|
+
jest.mock(
|
|
61
|
+
'~/components/Text/TextEditor.vue',
|
|
62
|
+
() => {
|
|
63
|
+
return {
|
|
64
|
+
props: {},
|
|
65
|
+
computed: {
|
|
66
|
+
body() {
|
|
67
|
+
return ''
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
data() {
|
|
71
|
+
return {}
|
|
72
|
+
},
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{ virtual: true }
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
jest.mock(
|
|
79
|
+
'~/components/Core/FileDropZone.vue',
|
|
80
|
+
() => {
|
|
81
|
+
return {
|
|
82
|
+
props: {},
|
|
83
|
+
computed: {
|
|
84
|
+
body() {
|
|
85
|
+
return ''
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
data() {
|
|
89
|
+
return {}
|
|
90
|
+
},
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{ virtual: true }
|
|
94
|
+
)
|
package/test/mocks.js
CHANGED
|
@@ -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: '#eceff1', expand: false },
|
|
51
|
-
{ title: '', color: '#eceff1', expand: true },
|
|
50
|
+
{ title: '', color: '#eceff1', expand: false, nested_answers: [] },
|
|
51
|
+
{ title: '', color: '#eceff1', expand: true, nested_answers: [] },
|
|
52
52
|
])
|
|
53
53
|
})
|
|
54
54
|
|
|
@@ -98,7 +98,7 @@ describe('Bucket game manager', () => {
|
|
|
98
98
|
})
|
|
99
99
|
wrapper.vm.onConfirmDeleteBucket(0)
|
|
100
100
|
expect(wrapper.vm.block.metadata.config.bucket_titles).toEqual([
|
|
101
|
-
{ title: '', color: '#eceff1', expand: true },
|
|
101
|
+
{ title: '', color: '#eceff1', expand: true, nested_answers: [] },
|
|
102
102
|
])
|
|
103
103
|
})
|
|
104
104
|
|