Delete unused Vue components and remove references to them.

This commit is contained in:
dandds
2019-09-25 06:14:12 -04:00
parent 494978fabd
commit 6dc1e10e77
15 changed files with 2 additions and 654 deletions

View File

@@ -1,43 +0,0 @@
import { shallowMount } from '@vue/test-utils'
import EditOfficerForm from '../edit_officer_form'
describe('EditOfficerForm', () => {
it('defaults to not editing', () => {
const wrapper = shallowMount(EditOfficerForm)
expect(wrapper.vm.$data.editing).toEqual(false)
})
it('does not start in editing mode when no errors', () => {
const wrapper = shallowMount(EditOfficerForm, {
propsData: { hasErrors: false },
})
expect(wrapper.vm.$data.editing).toEqual(false)
})
it('does start in editing mode when the form has errors', () => {
const wrapper = shallowMount(EditOfficerForm, {
propsData: { hasErrors: true },
})
expect(wrapper.vm.$data.editing).toEqual(true)
})
it('does start in editing mode when the form has changes', () => {
const wrapper = shallowMount(EditOfficerForm, {
propsData: { hasChanges: true },
})
expect(wrapper.vm.$data.editing).toEqual(true)
})
it('starts editing when edit method called', () => {
const wrapper = shallowMount(EditOfficerForm)
wrapper.vm.edit({ preventDefault: () => null })
expect(wrapper.vm.$data.editing).toEqual(true)
})
it('stops editing when cancel method called', () => {
const wrapper = shallowMount(EditOfficerForm)
wrapper.vm.cancel()
expect(wrapper.vm.$data.editing).toEqual(false)
})
})