@windward/integrations 0.0.6 → 0.0.8

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 (26) hide show
  1. package/components/Content/Blocks/ExternalIntegration/LtiConsumer.vue +37 -23
  2. package/components/ExternalIntegration/Driver/Lti1p1/ManageConsumer.vue +12 -14
  3. package/components/ExternalIntegration/Driver/Lti1p1/ManageConsumers.vue +22 -25
  4. package/components/ExternalIntegration/Driver/Lti1p1/ManageProvider.vue +53 -19
  5. package/components/ExternalIntegration/Driver/Lti1p1/ManageProviders.vue +53 -21
  6. package/components/ExternalIntegration/Driver/ManageLti1p1.vue +2 -2
  7. package/components/ExternalIntegration/ProviderTargetPicker.vue +218 -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 +16 -19
  13. package/i18n/en-US/components/content/blocks/external_integration/lti_consumer.ts +2 -0
  14. package/i18n/en-US/components/external_integration/driver/lti1p1.ts +0 -20
  15. package/i18n/en-US/components/external_integration/index.ts +26 -1
  16. package/i18n/en-US/components/external_integration/provider_target.ts +9 -0
  17. package/i18n/en-US/pages/login/lti.ts +1 -1
  18. package/package.json +1 -1
  19. package/pages/admin/importCourse.vue +3 -0
  20. package/pages/admin/vendors.vue +2 -1
  21. package/plugin.js +1 -1
  22. package/test/Components/ExternalIntegration/ProviderTargetPicker.spec.js +22 -0
  23. package/test/Components/ExternalIntegration/ProviderTargetViewer.spec.js +22 -0
  24. package/test/__mocks__/componentsMock.js +12 -0
  25. package/test/__mocks__/modelMock.js +1 -1
  26. package/test/mocks.js +1 -0
@@ -287,6 +287,7 @@ export default {
287
287
  .get()
288
288
  } catch (e) {
289
289
  if (e.response.status === 404) {
290
+ // eslint-disable-next-line no-console
290
291
  console.error(e)
291
292
  this.$dialog.error(
292
293
  this.$t(
@@ -329,6 +330,7 @@ export default {
329
330
  .get()
330
331
  } catch (e) {
331
332
  if (e.response.status === 404) {
333
+ // eslint-disable-next-line no-console
332
334
  console.error(e)
333
335
  this.$dialog.error(
334
336
  this.$t(
@@ -374,6 +376,7 @@ export default {
374
376
  }
375
377
  } catch (e) {
376
378
  if (e.response.status === 404) {
379
+ // eslint-disable-next-line no-console
377
380
  console.error(e)
378
381
  this.$dialog.error(
379
382
  this.$t(
@@ -151,9 +151,9 @@
151
151
  import _ from 'lodash'
152
152
  import { mapGetters } from 'vuex'
153
153
 
154
+ import Dialog from '~/components/Dialog.vue'
154
155
  import Organization from '../../models/Organization'
155
156
  import IntegrationJobTable from '../../components/Integration/JobTable.vue'
156
- import Dialog from '~/components/Dialog.vue'
157
157
 
158
158
  export default {
159
159
  name: 'PluginIntegrationsAdminVendorsPage',
@@ -216,6 +216,7 @@ export default {
216
216
  .integrations()
217
217
  .get()
218
218
  } catch (e) {
219
+ // eslint-disable-next-line no-console
219
220
  console.error('Could not load organization integrations', e)
220
221
  }
221
222
  },
package/plugin.js CHANGED
@@ -18,7 +18,7 @@ export default {
18
18
  beforeDestroy: () => {},
19
19
  beforeNavigate: () => {},
20
20
  onNavigate: () => {},
21
- onLoad: (page) => {},
21
+ onLoad: (_page) => {},
22
22
  onContent: () => {},
23
23
  },
24
24
  i18n: {
@@ -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
+ value: {},
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() {