import { GlModal } from '@gitlab/ui'; import { stubComponent } from 'helpers/stub_component'; import { TEST_HOST } from 'helpers/test_constants'; import { mountExtended } from 'helpers/vue_test_utils_helper'; import DeleteLabelModal from '~/labels/components/delete_label_modal.vue'; describe('~/labels/components/delete_label_modal', () => { let wrapper; const mountComponent = () => { const button = document.createElement('button'); button.classList.add('js-test-btn'); button.dataset.destroyPath = `${TEST_HOST}/1`; button.dataset.labelName = 'label 1'; button.dataset.subjectName = 'GitLab Org'; document.body.append(button); wrapper = mountExtended(DeleteLabelModal, { propsData: { selector: '.js-test-btn', }, stubs: { GlModal: stubComponent(GlModal, { template: '