atst/js/components/__tests__/confirmation_popover.test.js
Patrick Smith fd6b0f9b24 Add vue component for confirmation popover
Have the confirmation popover in a separate Vue component fixes a bug in
IE that was causing the `form` element in the popover to be ignored.

Since `form`s cannot be nested, the `form` element in the popover was
being discarded by IE and the revoke/resend invitation buttons did
nothing.

Breaking the functionality into a Vue component moves the `form` into a
separate template. When the popover is displayed, the component is added
to the DOM at the end, so the `form` is properly not-nested.
2018-11-27 10:22:02 -05:00

23 lines
547 B
JavaScript

import { shallowMount } from '@vue/test-utils'
import ConfirmationPopover from '../confirmation_popover'
describe('ConfirmationPopover', () => {
it('matches snapshot', () => {
const wrapper = shallowMount(ConfirmationPopover, {
propsData: {
action: '/some-url',
btn_text: 'Do something dangerous',
cancel_btn_text: 'Cancel',
confirm_btn_text: 'Confirm',
confirm_msg: 'Are you sure you want to do that?',
csrf_token: '42'
}
})
expect(wrapper).toMatchSnapshot()
})
})