@windward/integrations 0.0.8 → 0.0.9

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 (25) hide show
  1. package/components/ExternalIntegration/Driver/Lti1p1/ManageProvider.vue +9 -6
  2. package/components/ExternalIntegration/Driver/Lti1p1/ManageProviders.vue +6 -5
  3. package/components/ExternalIntegration/Driver/Lti1p3/ManageProvider.vue +445 -0
  4. package/components/ExternalIntegration/Driver/Lti1p3/ManageProviders.vue +259 -0
  5. package/components/ExternalIntegration/Driver/ManageLti1p3.vue +45 -0
  6. package/components/Integration/Driver/ManageAtutor.vue +15 -0
  7. package/components/Integration/JobLog.vue +98 -0
  8. package/components/Integration/JobTable.vue +15 -1
  9. package/i18n/en-US/components/external_integration/driver/lti1p3.ts +13 -0
  10. package/i18n/en-US/components/external_integration/index.ts +2 -1
  11. package/i18n/en-US/components/integration/driver.ts +1 -0
  12. package/i18n/en-US/components/integration/job.ts +3 -0
  13. package/models/ExternalIntegration/{Lti1p1Provider.ts → LtiProvider.ts} +2 -2
  14. package/package.json +1 -1
  15. package/pages/admin/importCourse.vue +1 -1
  16. package/pages/admin/vendors.vue +3 -2
  17. package/pages/course/externalIntegration/index.vue +4 -3
  18. package/plugin.js +48 -1
  19. package/test/Components/ExternalIntegration/Lti1p3/ManageProvider.spec.js +19 -0
  20. package/test/Components/ExternalIntegration/Lti1p3/ManageProviders.spec.js +19 -0
  21. package/test/Components/ExternalIntegration/ManageLti1p3.spec.js +19 -0
  22. package/test/Components/Integration/JobLog.spec.js +22 -0
  23. package/test/Components/Integration/JobTable.spec.js +23 -0
  24. package/test/__mocks__/componentsMock.js +12 -0
  25. package/test/mocks.js +12 -0
package/plugin.js CHANGED
@@ -68,7 +68,7 @@ export default {
68
68
  ref_page: 'admin',
69
69
  children: [
70
70
  {
71
- i18n: 'windward.integrations.components.navigation.integrations.manage_integrations',
71
+ i18n: 'windward.integrations.components.navigation.integrations.title',
72
72
  path: '/admin/integrations/vendors',
73
73
  context: ['home'],
74
74
  permissions: {
@@ -133,6 +133,53 @@ export default {
133
133
  */
134
134
  ],
135
135
  },
136
+ {
137
+ ref_page: 'course_settings',
138
+ children: [
139
+ {
140
+ i18n: 'windward.integrations.components.navigation.integrations.manage_integrations',
141
+ path: '/admin/integrations/vendors',
142
+ context: ['home'],
143
+ permissions: {
144
+ 'plugin.windward.integrations.organization.integration':
145
+ {
146
+ writable: true,
147
+ },
148
+ },
149
+ },
150
+ {
151
+ i18n: 'windward.integrations.components.navigation.integrations.import_course',
152
+ path: '/admin/integrations/import-course',
153
+ context: ['home'],
154
+ permissions: {
155
+ 'plugin.windward.integrations.course': {
156
+ writable: true,
157
+ },
158
+ },
159
+ },
160
+ {
161
+ i18n: 'windward.integrations.components.navigation.integrations.import_content',
162
+ path: '/course/{course.id}/integrations/import-content',
163
+ context: ['course'],
164
+ permissions: {
165
+ 'plugin.windward.integrations.course': {
166
+ writable: true,
167
+ },
168
+ },
169
+ },
170
+ {
171
+ i18n: 'windward.integrations.pages.course.external_integration.title',
172
+ path: '/course/{course.id}/integrations/external',
173
+ context: ['course'],
174
+ permissions: {
175
+ 'plugin.windward.integrations.course.externalIntegration':
176
+ {
177
+ readable: true,
178
+ },
179
+ },
180
+ },
181
+ ],
182
+ },
136
183
  ],
137
184
  contentBlock: [
138
185
  {
@@ -0,0 +1,19 @@
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 ManageProvider from '@/components/ExternalIntegration/Driver/Lti1p3/ManageProvider.vue'
8
+
9
+ Vue.use(Vuetify)
10
+
11
+ describe('ManageProvider', () => {
12
+ test('ManageProvider is a Vue instance', () => {
13
+ const wrapper = shallowMount(ManageProvider, {
14
+ vuetify: new Vuetify(),
15
+ mocks: defaultMocks,
16
+ })
17
+ expect(wrapper.vm).toBeTruthy()
18
+ })
19
+ })
@@ -0,0 +1,19 @@
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 ManageProviders from '@/components/ExternalIntegration/Driver/Lti1p3/ManageProviders.vue'
8
+
9
+ Vue.use(Vuetify)
10
+
11
+ describe('ManageProviders', () => {
12
+ test('ManageProviders is a Vue instance', () => {
13
+ const wrapper = shallowMount(ManageProviders, {
14
+ vuetify: new Vuetify(),
15
+ mocks: defaultMocks,
16
+ })
17
+ expect(wrapper.vm).toBeTruthy()
18
+ })
19
+ })
@@ -0,0 +1,19 @@
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 ManageLti1p1 from '@/components/ExternalIntegration/Driver/ManageLti1p3.vue'
8
+
9
+ Vue.use(Vuetify)
10
+
11
+ describe('ManageLti1p3', () => {
12
+ test('ManageLti1p3 is a Vue instance', () => {
13
+ const wrapper = shallowMount(ManageLti1p1, {
14
+ vuetify: new Vuetify(),
15
+ mocks: defaultMocks,
16
+ })
17
+ expect(wrapper.vm).toBeTruthy()
18
+ })
19
+ })
@@ -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 JobLog from '@/components/Integration/JobLog.vue'
8
+
9
+ Vue.use(Vuetify)
10
+
11
+ describe('JobLog', () => {
12
+ test('JobLog is a Vue instance', () => {
13
+ const wrapper = shallowMount(JobLog, {
14
+ vuetify: new Vuetify(),
15
+ propsData: {
16
+ id: '',
17
+ },
18
+ mocks: defaultMocks,
19
+ })
20
+ expect(wrapper.vm).toBeTruthy()
21
+ })
22
+ })
@@ -0,0 +1,23 @@
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 JobTable from '@/components/Integration/JobTable.vue'
8
+
9
+ Vue.use(Vuetify)
10
+
11
+ describe('JobTable', () => {
12
+ test('JobTable is a Vue instance', () => {
13
+ const wrapper = shallowMount(JobTable, {
14
+ vuetify: new Vuetify(),
15
+ propsData: {
16
+ channel: '',
17
+ event: '',
18
+ },
19
+ mocks: defaultMocks,
20
+ })
21
+ expect(wrapper.vm).toBeTruthy()
22
+ })
23
+ })
@@ -10,3 +10,15 @@ jest.mock(
10
10
  },
11
11
  { virtual: true }
12
12
  )
13
+
14
+ jest.mock(
15
+ '~/components/SearchField.vue',
16
+ () => {
17
+ return {
18
+ props: {},
19
+ computed: {},
20
+ methods: {},
21
+ }
22
+ },
23
+ { virtual: true }
24
+ )
package/test/mocks.js CHANGED
@@ -14,6 +14,18 @@ mocks.$Integration = {
14
14
  resolve([])
15
15
  })
16
16
  },
17
+ getSocket() {
18
+ return {
19
+ leave: jest.fn(),
20
+ public: () => {
21
+ return { listen: jest.fn() }
22
+ },
23
+ private: () => {
24
+ return { listen: jest.fn() }
25
+ },
26
+ connector: { pusher: { connection: { bind: jest.fn() } } },
27
+ }
28
+ },
17
29
  }
18
30
  mocks.$PermissionService = { userHasAccessTo: () => true }
19
31