Skip to content

Commit

Permalink
Kick out unit test code
Browse files Browse the repository at this point in the history
  • Loading branch information
kulmann committed Nov 16, 2021
1 parent 96103b5 commit 4793e41
Showing 1 changed file with 1 addition and 43 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { shallowMount, createLocalVue } from '@vue/test-utils'
import { createLocalVue } from '@vue/test-utils'
import Vuex from 'vuex'
import DesignSystem from 'owncloud-design-system'
import stubs from 'tests/unit/stubs'
import BatchActions from '../../../../../src/components/AppBar/SelectedResources/BatchActions.vue'
const permissionsHelper = '../../../../../src/helpers/permissions'

jest.mock(permissionsHelper, () => ({
Expand All @@ -14,19 +12,6 @@ const localVue = createLocalVue()
localVue.use(Vuex)
localVue.use(DesignSystem)

const files = [
{
path: '/Folder'
},
{
path: '/lorem.txt'
}
]
const componentStubs = { ...stubs, translate: true }
const elSelector = {
ocButtonStub: 'oc-button-stub'
}

describe('Batch Actions component', () => {
afterEach(() => {
jest.clearAllMocks()
Expand All @@ -36,30 +21,3 @@ describe('Batch Actions component', () => {
it.todo('renders an empty list if there are no batch actions available')
it.todo('renders a button for each available batch action')
})

function createShallowMountWrapper(options = {}) {
return shallowMount(BatchActions, {
localVue,
stubs: componentStubs,
...options
})
}

function createStore(state = { selected: [], currentFolder: {} }) {
return new Vuex.Store({
modules: {
Files: {
state: {
currentFolder: { path: '' },
...state
},
namespaced: true,
getters: {
selectedFiles: () => state.selected,
currentFolder: () => state.currentFolder,
activeFilesCurrentPage: () => files
}
}
}
})
}

0 comments on commit 4793e41

Please sign in to comment.