diff --git a/kolibri/core/assets/test/download-button.spec.js b/kolibri/core/assets/test/download-button.spec.js index bef855ed373..11265f3bd38 100644 --- a/kolibri/core/assets/test/download-button.spec.js +++ b/kolibri/core/assets/test/download-button.spec.js @@ -1,5 +1,4 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import DownloadButton from '../src/views/ContentRenderer/DownloadButton'; jest.mock('kolibri.urls'); @@ -27,7 +26,6 @@ describe('download-button Component', function() { propsData: { files: samplesFiles, }, - store, }); expect(wrapper.vm.fileOptions.length).toEqual(samplesFiles.length); }); diff --git a/kolibri/core/assets/test/progress-bar.spec.js b/kolibri/core/assets/test/progress-bar.spec.js index 52d2b16ce43..85c9d5e41f5 100644 --- a/kolibri/core/assets/test/progress-bar.spec.js +++ b/kolibri/core/assets/test/progress-bar.spec.js @@ -1,5 +1,4 @@ import { shallowMount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import ProgressBar from '../src/views/ProgressBar'; function testProgressBar(wrapper, expected) { @@ -14,7 +13,6 @@ describe('ProgressBar Component', () => { propsData: { progress: -0.0000001, }, - store, }); // The negative still shows up... testProgressBar(wrapper, { text: '-0%', width: '0%' }); @@ -25,7 +23,6 @@ describe('ProgressBar Component', () => { propsData: { progress: 0.1, }, - store, }); testProgressBar(wrapper, { text: '10%', width: '10%' }); }); @@ -35,7 +32,6 @@ describe('ProgressBar Component', () => { propsData: { progress: 1.0, }, - store, }); testProgressBar(wrapper, { text: '100%', width: '100%' }); }); @@ -45,7 +41,6 @@ describe('ProgressBar Component', () => { propsData: { progress: 1.0000001, }, - store, }); testProgressBar(wrapper, { text: '100%', width: '100%' }); }); diff --git a/kolibri/core/assets/test/progress-icon.spec.js b/kolibri/core/assets/test/progress-icon.spec.js index 79313ad3ca5..cfaa5ef37db 100644 --- a/kolibri/core/assets/test/progress-icon.spec.js +++ b/kolibri/core/assets/test/progress-icon.spec.js @@ -1,5 +1,4 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import UiIcon from 'kolibri-design-system/lib/keen/UiIcon'; import ProgressIcon from '../src/views/ProgressIcon'; @@ -19,7 +18,6 @@ describe('ProgressIcon Component', () => { // Causes a validation error progress: -1.0, }, - store, }); await wrapper.vm.$nextTick(); const tooltip = wrapper.findComponent({ name: 'KTooltip' }); @@ -33,7 +31,6 @@ describe('ProgressIcon Component', () => { propsData: { progress: 0.1, }, - store, }); await wrapper.vm.$nextTick(); testIcon(wrapper, 'In progress'); @@ -44,7 +41,6 @@ describe('ProgressIcon Component', () => { propsData: { progress: 1.0, }, - store, }); await wrapper.vm.$nextTick(); testIcon(wrapper, 'Completed'); @@ -55,7 +51,6 @@ describe('ProgressIcon Component', () => { propsData: { progress: 2.0, }, - store, }); await wrapper.vm.$nextTick(); testIcon(wrapper, 'Completed'); diff --git a/kolibri/core/assets/test/views/KTooltip.spec.js b/kolibri/core/assets/test/views/KTooltip.spec.js index 8bacbb86ef3..d4b117e65c9 100644 --- a/kolibri/core/assets/test/views/KTooltip.spec.js +++ b/kolibri/core/assets/test/views/KTooltip.spec.js @@ -1,5 +1,4 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import KTooltipExample from './KTooltipExample'; const DEFAULT_PROPS = { @@ -14,7 +13,6 @@ function makeWrapper(kTooltipProps = DEFAULT_PROPS, slot = 'Sample tooltip conte slots: { default: slot, }, - store, }); } describe('KTooltip component', () => { diff --git a/kolibri/plugins/coach/assets/test/views/AssignmentDeleteModal.spec.js b/kolibri/plugins/coach/assets/test/views/AssignmentDeleteModal.spec.js index 7346fad50cd..6d54918dde8 100644 --- a/kolibri/plugins/coach/assets/test/views/AssignmentDeleteModal.spec.js +++ b/kolibri/plugins/coach/assets/test/views/AssignmentDeleteModal.spec.js @@ -1,5 +1,4 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import AssignmentDeleteModal from '../../src/views/plan/assignments/AssignmentDeleteModal'; const defaultProps = { @@ -21,7 +20,6 @@ describe('AssignmentDeleteModal', () => { const submitListener = jest.fn(); const { els } = makeWrapper({ propsData: { ...defaultProps }, - store, listeners: { submit: submitListener, }, @@ -34,7 +32,6 @@ describe('AssignmentDeleteModal', () => { const cancelListener = jest.fn(); const { els } = makeWrapper({ propsData: { ...defaultProps }, - store, listeners: { cancel: cancelListener, }, diff --git a/kolibri/plugins/coach/assets/test/views/AssignmentDetailsModal.spec.js b/kolibri/plugins/coach/assets/test/views/AssignmentDetailsModal.spec.js index c85c4de3114..5513b0d4c7a 100644 --- a/kolibri/plugins/coach/assets/test/views/AssignmentDetailsModal.spec.js +++ b/kolibri/plugins/coach/assets/test/views/AssignmentDetailsModal.spec.js @@ -1,5 +1,4 @@ import { mount } from '@vue/test-utils'; -//import store from 'kolibri.coreVue.vuex.store'; import makeStore from '../makeStore'; import AssignmentDetailsModal from '../../src/views/plan/assignments/AssignmentDetailsModal'; diff --git a/kolibri/plugins/device/assets/test/views/ChannelTokenModal.spec.js b/kolibri/plugins/device/assets/test/views/ChannelTokenModal.spec.js index f9c28d71a5e..3383e05d3a0 100644 --- a/kolibri/plugins/device/assets/test/views/ChannelTokenModal.spec.js +++ b/kolibri/plugins/device/assets/test/views/ChannelTokenModal.spec.js @@ -1,9 +1,8 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import ChannelTokenModal from '../../src/views/AvailableChannelsPage/ChannelTokenModal'; function makeWrapper(options = {}) { - return mount(ChannelTokenModal, { store, ...options, attrs: { disabled: false } }); + return mount(ChannelTokenModal, { ...options, attrs: { disabled: false } }); } function getElements(wrapper) { diff --git a/kolibri/plugins/device/assets/test/views/ContentNodeRow.spec.js b/kolibri/plugins/device/assets/test/views/ContentNodeRow.spec.js index 136021509a8..95365b44f55 100644 --- a/kolibri/plugins/device/assets/test/views/ContentNodeRow.spec.js +++ b/kolibri/plugins/device/assets/test/views/ContentNodeRow.spec.js @@ -1,5 +1,4 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import ContentNodeRow from '../../src/views/SelectContentPage/ContentNodeRow'; import { makeNode } from '../utils/data'; import router from './testRouter'; @@ -25,7 +24,6 @@ const defaultProps = { function makeWrapper(props = {}) { return mount(ContentNodeRow, { propsData: { ...defaultProps, ...props }, - store, ...router, }); } @@ -73,7 +71,7 @@ describe('contentNodeRow component', () => { }); it('topic links have the correct route', () => { - const wrapper = makeWrapper({ store }); + const wrapper = makeWrapper(); const { goToTopicButton } = getElements(wrapper); expect(goToTopicButton().props().to).toMatchObject({ name: 'SELECT_CONTENT', diff --git a/kolibri/plugins/epub_viewer/assets/tests/BottomBar.spec.js b/kolibri/plugins/epub_viewer/assets/tests/BottomBar.spec.js index 73b68b131c0..f0754f398d4 100644 --- a/kolibri/plugins/epub_viewer/assets/tests/BottomBar.spec.js +++ b/kolibri/plugins/epub_viewer/assets/tests/BottomBar.spec.js @@ -1,5 +1,4 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import BottomBar from '../src/views/BottomBar'; function createWrapper({ @@ -15,7 +14,6 @@ function createWrapper({ sliderStep, locationsAreReady, }, - store, }); } diff --git a/kolibri/plugins/epub_viewer/assets/tests/NextButton.spec.js b/kolibri/plugins/epub_viewer/assets/tests/NextButton.spec.js index 3a9e9a3d092..4e8161b4d93 100644 --- a/kolibri/plugins/epub_viewer/assets/tests/NextButton.spec.js +++ b/kolibri/plugins/epub_viewer/assets/tests/NextButton.spec.js @@ -1,9 +1,8 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import NextButton from '../src/views/NextButton'; function createWrapper() { - return mount(NextButton, { store }); + return mount(NextButton); } describe('Next button', () => { diff --git a/kolibri/plugins/epub_viewer/assets/tests/PreviousButton.spec.js b/kolibri/plugins/epub_viewer/assets/tests/PreviousButton.spec.js index 4fe123f2a16..7cc08a54455 100644 --- a/kolibri/plugins/epub_viewer/assets/tests/PreviousButton.spec.js +++ b/kolibri/plugins/epub_viewer/assets/tests/PreviousButton.spec.js @@ -1,9 +1,8 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import PreviousButton from '../src/views/PreviousButton'; function createWrapper() { - return mount(PreviousButton, { store }); + return mount(PreviousButton); } describe('Previous button', () => { diff --git a/kolibri/plugins/epub_viewer/assets/tests/SearchButton.spec.js b/kolibri/plugins/epub_viewer/assets/tests/SearchButton.spec.js index 4f5a559bf29..28ea7d6ed15 100644 --- a/kolibri/plugins/epub_viewer/assets/tests/SearchButton.spec.js +++ b/kolibri/plugins/epub_viewer/assets/tests/SearchButton.spec.js @@ -1,9 +1,8 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import SearchButton from '../src/views/SearchButton'; function createWrapper() { - return mount(SearchButton, { store }); + return mount(SearchButton); } describe('Search button', () => { diff --git a/kolibri/plugins/epub_viewer/assets/tests/SearchSideBar.spec.js b/kolibri/plugins/epub_viewer/assets/tests/SearchSideBar.spec.js index 8f17d7cb1e4..7db99c478c1 100644 --- a/kolibri/plugins/epub_viewer/assets/tests/SearchSideBar.spec.js +++ b/kolibri/plugins/epub_viewer/assets/tests/SearchSideBar.spec.js @@ -1,5 +1,4 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import SearchSideBar from '../src/views/SearchSideBar'; function createWrapper() { @@ -9,7 +8,6 @@ function createWrapper() { propsData: { book: {}, }, - store, attachTo: node, }); } diff --git a/kolibri/plugins/epub_viewer/assets/tests/SettingsButton.spec.js b/kolibri/plugins/epub_viewer/assets/tests/SettingsButton.spec.js index 1367e57aa3a..50657c2238c 100644 --- a/kolibri/plugins/epub_viewer/assets/tests/SettingsButton.spec.js +++ b/kolibri/plugins/epub_viewer/assets/tests/SettingsButton.spec.js @@ -1,9 +1,8 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import SettingsButton from '../src/views/SettingsButton'; function createWrapper() { - return mount(SettingsButton, { store }); + return mount(SettingsButton); } describe('Settings button', () => { diff --git a/kolibri/plugins/epub_viewer/assets/tests/SettingsSideBar.spec.js b/kolibri/plugins/epub_viewer/assets/tests/SettingsSideBar.spec.js index e8ad596cfb4..fe996925358 100644 --- a/kolibri/plugins/epub_viewer/assets/tests/SettingsSideBar.spec.js +++ b/kolibri/plugins/epub_viewer/assets/tests/SettingsSideBar.spec.js @@ -1,5 +1,4 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import SettingsSideBar from '../src/views/SettingsSideBar'; import { THEMES } from '../src/views/EpubConstants'; @@ -8,7 +7,6 @@ function createWrapper({ theme = THEMES.BEIGE } = {}) { propsData: { theme, }, - store, }); } diff --git a/kolibri/plugins/epub_viewer/assets/tests/TableOfContentsSection.spec.js b/kolibri/plugins/epub_viewer/assets/tests/TableOfContentsSection.spec.js index 7e941392a06..a36fae5db67 100644 --- a/kolibri/plugins/epub_viewer/assets/tests/TableOfContentsSection.spec.js +++ b/kolibri/plugins/epub_viewer/assets/tests/TableOfContentsSection.spec.js @@ -1,5 +1,4 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import TableOfContentsSection from '../src/views/TableOfContentsSection'; const section = { @@ -35,7 +34,6 @@ function createWrapper({ section, depth, currentSection } = {}) { depth, currentSection, }, - store, }); } diff --git a/kolibri/plugins/epub_viewer/assets/tests/TableOfContentsSectionSideBar.spec.js b/kolibri/plugins/epub_viewer/assets/tests/TableOfContentsSectionSideBar.spec.js index af2fbbd8133..32086e82071 100644 --- a/kolibri/plugins/epub_viewer/assets/tests/TableOfContentsSectionSideBar.spec.js +++ b/kolibri/plugins/epub_viewer/assets/tests/TableOfContentsSectionSideBar.spec.js @@ -1,5 +1,4 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import TableOfContentsSideBar from '../src/views/TableOfContentsSideBar'; const toc = [ @@ -31,7 +30,6 @@ function createWrapper({ toc, currentSection } = {}) { toc, currentSection, }, - store, }); } diff --git a/kolibri/plugins/epub_viewer/assets/tests/TocButton.spec.js b/kolibri/plugins/epub_viewer/assets/tests/TocButton.spec.js index d8f56474feb..53dcb8d8383 100644 --- a/kolibri/plugins/epub_viewer/assets/tests/TocButton.spec.js +++ b/kolibri/plugins/epub_viewer/assets/tests/TocButton.spec.js @@ -1,9 +1,8 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import TocButton from '../src/views/TocButton'; function createWrapper() { - return mount(TocButton, { store }); + return mount(TocButton); } describe('Table of contents button', () => { diff --git a/kolibri/plugins/epub_viewer/assets/tests/TopBar.spec.js b/kolibri/plugins/epub_viewer/assets/tests/TopBar.spec.js index e83a9fca975..836a5091aa2 100644 --- a/kolibri/plugins/epub_viewer/assets/tests/TopBar.spec.js +++ b/kolibri/plugins/epub_viewer/assets/tests/TopBar.spec.js @@ -1,5 +1,4 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import TopBar from '../src/views/TopBar'; function createWrapper({ title, isInFullscreen = false } = {}) { @@ -10,7 +9,6 @@ function createWrapper({ title, isInFullscreen = false } = {}) { title, isInFullscreen, }, - store, attachTo: node, }); } diff --git a/kolibri/plugins/setup_wizard/assets/test/views/PersonalDataConsentForm.spec.js b/kolibri/plugins/setup_wizard/assets/test/views/PersonalDataConsentForm.spec.js index 9faeee1a0bc..af539852514 100644 --- a/kolibri/plugins/setup_wizard/assets/test/views/PersonalDataConsentForm.spec.js +++ b/kolibri/plugins/setup_wizard/assets/test/views/PersonalDataConsentForm.spec.js @@ -1,9 +1,8 @@ import { mount } from '@vue/test-utils'; -import store from 'kolibri.coreVue.vuex.store'; import PersonalDataConsentForm from '../../src/views/onboarding-forms/PersonalDataConsentForm'; function makeWrapper() { - const wrapper = mount(PersonalDataConsentForm, { store }); + const wrapper = mount(PersonalDataConsentForm); return { wrapper }; }