@windward/integrations 0.0.5 → 0.0.7

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.
Files changed (36) hide show
  1. package/components/Content/Blocks/ExternalIntegration/LtiConsumer.vue +205 -0
  2. package/components/ExternalIntegration/Driver/Lti1p1/ManageConsumer.vue +284 -3
  3. package/components/ExternalIntegration/Driver/Lti1p1/ManageConsumers.vue +199 -3
  4. package/components/ExternalIntegration/Driver/Lti1p1/ManageProvider.vue +36 -6
  5. package/components/ExternalIntegration/Driver/Lti1p1/ManageProviders.vue +36 -17
  6. package/components/ExternalIntegration/Driver/ManageLti1p1.vue +5 -5
  7. package/components/ExternalIntegration/ProviderTargetPicker.vue +234 -0
  8. package/components/ExternalIntegration/ProviderTargetViewer.vue +50 -0
  9. package/components/Integration/Driver/ManageBase.vue +3 -1
  10. package/components/Integration/JobTable.vue +2 -1
  11. package/components/SecretField.vue +1 -1
  12. package/components/Settings/ExternalIntegration/LtiConsumerSettings.vue +105 -0
  13. package/i18n/en-US/components/content/blocks/external_integration/index.ts +5 -0
  14. package/i18n/en-US/components/content/blocks/external_integration/lti_consumer.ts +8 -0
  15. package/i18n/en-US/components/content/blocks/index.ts +5 -0
  16. package/i18n/en-US/components/content/index.ts +5 -0
  17. package/i18n/en-US/components/external_integration/driver/lti1p1.ts +11 -2
  18. package/i18n/en-US/components/external_integration/index.ts +2 -1
  19. package/i18n/en-US/components/external_integration/provider_target.ts +9 -0
  20. package/i18n/en-US/components/index.ts +4 -0
  21. package/i18n/en-US/components/settings/external_integration/index.ts +5 -0
  22. package/i18n/en-US/components/settings/external_integration/lti_consumer.ts +7 -0
  23. package/i18n/en-US/components/settings/index.ts +5 -0
  24. package/i18n/en-US/shared/content_blocks.ts +8 -0
  25. package/i18n/en-US/shared/index.ts +2 -0
  26. package/i18n/en-US/shared/settings.ts +5 -1
  27. package/package.json +1 -1
  28. package/pages/admin/importCourse.vue +3 -0
  29. package/pages/admin/vendors.vue +2 -1
  30. package/plugin.js +27 -1
  31. package/test/Components/Content/Blocks/ExternalIntegration/LtiConsumer.spec.js +26 -0
  32. package/test/Components/ExternalIntegration/ProviderTargetPicker.spec.js +22 -0
  33. package/test/Components/ExternalIntegration/ProviderTargetViewer.spec.js +22 -0
  34. package/test/__mocks__/componentsMock.js +12 -0
  35. package/test/__mocks__/modelMock.js +1 -1
  36. package/test/mocks.js +1 -0
@@ -0,0 +1,26 @@
1
+ import { shallowMount } from '@vue/test-utils'
2
+
3
+ import Vue from 'vue'
4
+ import Vuetify from 'vuetify'
5
+ import { defaultMocks } from '@/test/mocks'
6
+
7
+ import LtiConsumer from '@/components/Content/Blocks/ExternalIntegration/LtiConsumer.vue'
8
+
9
+ Vue.use(Vuetify)
10
+
11
+ describe('LtiConsumer', () => {
12
+ test('LtiConsumer is a Vue instance', () => {
13
+ const wrapper = shallowMount(LtiConsumer, {
14
+ vuetify: new Vuetify(),
15
+ mocks: defaultMocks,
16
+ propsData: {
17
+ value: {
18
+ id: '00000000-0000-0000-0000-000000000000',
19
+ body: 'lti-integration',
20
+ metadata: {},
21
+ },
22
+ },
23
+ })
24
+ expect(wrapper.vm).toBeTruthy()
25
+ })
26
+ })
@@ -0,0 +1,22 @@
1
+ import { shallowMount } from '@vue/test-utils'
2
+
3
+ import Vue from 'vue'
4
+ import Vuetify from 'vuetify'
5
+ import { defaultMocks } from '@/test/mocks'
6
+
7
+ import ProviderTargetPicker from '@/components/ExternalIntegration/ProviderTargetPicker.vue'
8
+
9
+ Vue.use(Vuetify)
10
+
11
+ describe('ProviderTargetPicker', () => {
12
+ test('ProviderTargetPicker is a Vue instance', () => {
13
+ const wrapper = shallowMount(ProviderTargetPicker, {
14
+ vuetify: new Vuetify(),
15
+ mocks: defaultMocks,
16
+ propsData: {
17
+ metadata: {},
18
+ },
19
+ })
20
+ expect(wrapper.vm).toBeTruthy()
21
+ })
22
+ })
@@ -0,0 +1,22 @@
1
+ import { shallowMount } from '@vue/test-utils'
2
+
3
+ import Vue from 'vue'
4
+ import Vuetify from 'vuetify'
5
+ import { defaultMocks } from '@/test/mocks'
6
+
7
+ import ProviderTargetViewer from '@/components/ExternalIntegration/ProviderTargetViewer.vue'
8
+
9
+ Vue.use(Vuetify)
10
+
11
+ describe('ProviderTargetViewer', () => {
12
+ test('ProviderTargetViewer is a Vue instance', () => {
13
+ const wrapper = shallowMount(ProviderTargetViewer, {
14
+ vuetify: new Vuetify(),
15
+ mocks: defaultMocks,
16
+ propsData: {
17
+ target: '',
18
+ },
19
+ })
20
+ expect(wrapper.vm).toBeTruthy()
21
+ })
22
+ })
@@ -0,0 +1,12 @@
1
+ // TODO find better way for jest to recognize utils imports
2
+ jest.mock(
3
+ '~/components/Form.vue',
4
+ () => {
5
+ return {
6
+ data() {
7
+ return { validation: {} }
8
+ },
9
+ }
10
+ },
11
+ { virtual: true }
12
+ )
@@ -44,7 +44,7 @@ class mockBaseModel extends mockModel {
44
44
  return 'http://windwardapi.local'
45
45
  }
46
46
 
47
- request(config) {
47
+ request(_config) {
48
48
  return new Promise((resolve) => {
49
49
  resolve({ data: {} })
50
50
  })
package/test/mocks.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { defaultMocks as mocks } from '@windward/core/test/mocks'
2
2
 
3
3
  require('./__mocks__/modelMock')
4
+ require('./__mocks__/componentsMock')
4
5
 
5
6
  mocks.$Integration = {
6
7
  async load() {