Последняя версия с сервера прошлого разработчика
This commit is contained in:
30
nova/resources/js/__tests__/ActionSelector.spec.js
vendored
Executable file
30
nova/resources/js/__tests__/ActionSelector.spec.js
vendored
Executable file
@@ -0,0 +1,30 @@
|
||||
import { mount, shallowMount, createLocalVue } from '@vue/test-utils'
|
||||
import PortalVue from 'portal-vue'
|
||||
import ActionSelector from '@/components/ActionSelector'
|
||||
import flushPromises from 'flush-promises'
|
||||
|
||||
const localVue = createLocalVue()
|
||||
localVue.use(PortalVue)
|
||||
|
||||
describe('ActionSelector', () => {
|
||||
test('it renders correctly with actions and pivot action', () => {
|
||||
const wrapper = mount(ActionSelector, {
|
||||
localVue,
|
||||
propsData: {
|
||||
selectedResources: [1, 2, 3],
|
||||
resourceName: 'posts',
|
||||
actions: [
|
||||
{ uriKey: 'action-1', name: 'Action 1' },
|
||||
{ uriKey: 'action-2', name: 'Action 2' },
|
||||
],
|
||||
pivotActions: [
|
||||
{ uriKey: 'action-3', name: 'Action 3' },
|
||||
{ uriKey: 'action-4', name: 'Action 4' },
|
||||
],
|
||||
pivotName: 'Pivot',
|
||||
},
|
||||
})
|
||||
|
||||
expect(wrapper).toMatchSnapshot()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user