@windward/core 0.0.9 → 0.1.1
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/Blocks/Accordion.vue +7 -2
- package/components/Content/Blocks/BlockQuote.vue +191 -0
- package/components/Content/Blocks/Email.vue +248 -0
- package/components/Content/Blocks/FeedbackTemplates/FeedbackQuestionLikert.vue +25 -14
- package/components/Content/Blocks/FeedbackTemplates/FeedbackQuestionTrueFalse.vue +3 -7
- package/components/Content/Blocks/Image.vue +1 -1
- package/components/Content/Blocks/OpenResponse.vue +22 -16
- package/components/Content/Blocks/Tab.vue +7 -3
- package/components/Content/Blocks/UserUpload.vue +2 -2
- package/components/Settings/AccordionSettings.vue +9 -1
- package/components/Settings/BlockQuoteSettings.vue +143 -0
- package/components/Settings/EmailSettings.vue +216 -0
- package/components/Settings/ImageSettings.vue +1 -1
- package/components/Settings/OpenResponseCollateSettings.vue +1 -1
- package/components/Settings/OpenResponseSettings.vue +7 -9
- package/components/Settings/TabSettings.vue +14 -5
- package/components/Settings/TextEditorSettings.vue +1 -1
- package/components/Settings/UserUploadSettings.vue +1 -1
- package/components/utils/MathExpressionEditor.vue +30 -15
- package/components/utils/TinyMCEWrapper.vue +3 -1
- package/i18n/en-US/components/content/blocks/block_quote.ts +3 -0
- package/i18n/en-US/components/content/blocks/email.ts +12 -0
- package/i18n/en-US/components/content/blocks/index.ts +4 -0
- package/i18n/en-US/components/settings/block_quote.ts +9 -0
- package/i18n/en-US/components/settings/email.ts +9 -0
- package/i18n/en-US/components/settings/index.ts +4 -0
- package/i18n/en-US/components/utils/index.ts +2 -0
- package/i18n/en-US/components/utils/math_expression_editor.ts +3 -0
- package/i18n/en-US/shared/content_blocks.ts +2 -1
- package/i18n/en-US/shared/settings.ts +5 -0
- package/i18n/es-ES/components/content/blocks/block_quote.ts +3 -0
- package/i18n/es-ES/components/content/blocks/email.ts +12 -0
- package/i18n/es-ES/components/content/blocks/index.ts +4 -0
- package/i18n/es-ES/components/settings/block_quote.ts +9 -0
- package/i18n/es-ES/components/settings/email.ts +9 -0
- package/i18n/es-ES/components/settings/index.ts +4 -0
- package/i18n/es-ES/components/utils/index.ts +2 -1
- package/i18n/es-ES/components/utils/math_expression_editor.ts +3 -0
- package/i18n/es-ES/shared/content_blocks.ts +2 -1
- package/i18n/es-ES/shared/settings.ts +5 -0
- package/i18n/sv-SE/components/content/blocks/block_quote.ts +3 -0
- package/i18n/sv-SE/components/content/blocks/email.ts +12 -0
- package/i18n/sv-SE/components/content/blocks/index.ts +4 -0
- package/i18n/sv-SE/components/settings/block_quote.ts +9 -0
- package/i18n/sv-SE/components/settings/email.ts +9 -0
- package/i18n/sv-SE/components/settings/index.ts +4 -0
- package/i18n/sv-SE/components/utils/index.ts +2 -1
- package/i18n/sv-SE/components/utils/math_expression_editor.ts +3 -0
- package/i18n/sv-SE/shared/content_blocks.ts +2 -1
- package/i18n/sv-SE/shared/settings.ts +5 -0
- package/package.json +4 -4
- package/plugin.js +42 -0
- package/test/Components/Content/Blocks/Accordion.spec.js +2 -0
- package/test/Components/Content/Blocks/BlockQuote.spec.js +23 -0
- package/test/Components/Content/Blocks/Email.spec.js +23 -0
- package/test/Components/Content/Blocks/Feedback.spec.js +1 -0
- package/test/Components/Content/Blocks/Math.spec.js +1 -0
- package/test/Components/Content/Blocks/Tab.spec.js +1 -0
- package/test/Components/Settings/BlockQuoteSettings.spec.js +20 -0
- package/test/Components/Settings/EmailSettings.spec.js +45 -0
- package/test/__mocks__/componentsMock.js +6 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils'
|
|
2
|
+
import Vuetify from 'vuetify'
|
|
3
|
+
import Vue from 'vue'
|
|
4
|
+
|
|
5
|
+
import { defaultMocks } from '@/test/mocks'
|
|
6
|
+
import BlockQuoteSettings from '@/components/Settings/BlockQuoteSettings'
|
|
7
|
+
|
|
8
|
+
Vue.use(Vuetify)
|
|
9
|
+
|
|
10
|
+
describe('BlockQuoteSettings', () => {
|
|
11
|
+
test('is a Vue instance', () => {
|
|
12
|
+
const wrapper = shallowMount(BlockQuoteSettings, {
|
|
13
|
+
propsData: {
|
|
14
|
+
tag: 'core-block-quote-settings',
|
|
15
|
+
},
|
|
16
|
+
mocks: defaultMocks,
|
|
17
|
+
})
|
|
18
|
+
expect(wrapper.vm).toBeTruthy()
|
|
19
|
+
})
|
|
20
|
+
})
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils'
|
|
2
|
+
import Vuetify from 'vuetify'
|
|
3
|
+
import Vue from 'vue'
|
|
4
|
+
|
|
5
|
+
import { defaultMocks } from '@/test/mocks'
|
|
6
|
+
import EmailSettings from '@/components/Settings/EmailSettings'
|
|
7
|
+
|
|
8
|
+
Vue.use(Vuetify)
|
|
9
|
+
|
|
10
|
+
describe('EmailSettings', () => {
|
|
11
|
+
test('is a Vue instance', () => {
|
|
12
|
+
const wrapper = shallowMount(EmailSettings, {
|
|
13
|
+
propsData: {
|
|
14
|
+
tag: 'core-email-settings',
|
|
15
|
+
},
|
|
16
|
+
mocks: defaultMocks,
|
|
17
|
+
})
|
|
18
|
+
expect(wrapper.vm).toBeTruthy()
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
test('can add an email', () => {
|
|
22
|
+
const wrapper = shallowMount(EmailSettings, {
|
|
23
|
+
propsData: {
|
|
24
|
+
tag: 'core-email-settings',
|
|
25
|
+
},
|
|
26
|
+
mocks: defaultMocks,
|
|
27
|
+
})
|
|
28
|
+
wrapper.vm.onAddElement()
|
|
29
|
+
expect(wrapper.vm.$data.block.metadata.config.emails).toEqual([
|
|
30
|
+
{ from: '', to: '', cc: '', body: '', expand: false },
|
|
31
|
+
{ from: '', to: '', cc: '', body: '', expand: false },
|
|
32
|
+
])
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
test('can remove an email', () => {
|
|
36
|
+
const wrapper = shallowMount(EmailSettings, {
|
|
37
|
+
propsData: {
|
|
38
|
+
tag: 'core-email-settings',
|
|
39
|
+
},
|
|
40
|
+
mocks: defaultMocks,
|
|
41
|
+
})
|
|
42
|
+
wrapper.vm.onRemoveElement(0)
|
|
43
|
+
expect(wrapper.vm.$data.block.metadata.config.emails).toEqual([])
|
|
44
|
+
})
|
|
45
|
+
})
|
|
@@ -77,6 +77,9 @@ jest.mock(
|
|
|
77
77
|
props: {},
|
|
78
78
|
computed: {},
|
|
79
79
|
methods: {},
|
|
80
|
+
data() {
|
|
81
|
+
return { validation: {} }
|
|
82
|
+
},
|
|
80
83
|
}
|
|
81
84
|
},
|
|
82
85
|
{ virtual: true }
|
|
@@ -89,6 +92,9 @@ jest.mock(
|
|
|
89
92
|
props: {},
|
|
90
93
|
computed: {},
|
|
91
94
|
methods: {},
|
|
95
|
+
data() {
|
|
96
|
+
return { validation: {} }
|
|
97
|
+
},
|
|
92
98
|
}
|
|
93
99
|
},
|
|
94
100
|
{ virtual: true }
|