From 9bf06ad5e2452b258b46ca59c453d42f5a50fc44 Mon Sep 17 00:00:00 2001 From: George Drummond Date: Tue, 18 Jun 2019 14:36:36 -0400 Subject: [PATCH] Delete RequiredLabel --- .../confirmation_popover.test.js.snap | 8 ----- .../__tests__/confirmation_popover.test.js | 31 ------------------- js/components/forms/edit_officer_form.js | 2 -- js/index.js | 2 -- templates/components/required_label.html | 5 --- 5 files changed, 48 deletions(-) delete mode 100644 js/components/__tests__/__snapshots__/confirmation_popover.test.js.snap delete mode 100644 js/components/__tests__/confirmation_popover.test.js delete mode 100644 templates/components/required_label.html diff --git a/js/components/__tests__/__snapshots__/confirmation_popover.test.js.snap b/js/components/__tests__/__snapshots__/confirmation_popover.test.js.snap deleted file mode 100644 index 2e4be27b..00000000 --- a/js/components/__tests__/__snapshots__/confirmation_popover.test.js.snap +++ /dev/null @@ -1,8 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ConfirmationPopover matches snapshot 1`] = ` - -`; diff --git a/js/components/__tests__/confirmation_popover.test.js b/js/components/__tests__/confirmation_popover.test.js deleted file mode 100644 index bfbb06fe..00000000 --- a/js/components/__tests__/confirmation_popover.test.js +++ /dev/null @@ -1,31 +0,0 @@ -import { createLocalVue, shallowMount } from '@vue/test-utils' -import VTooltip from 'v-tooltip' - -import ConfirmationPopover from '../confirmation_popover' - -const localVue = createLocalVue() -localVue.use(VTooltip) - -describe('ConfirmationPopover', () => { - const wrapper = shallowMount(ConfirmationPopover, { - localVue, - 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', - }, - }) - - it('matches snapshot', () => { - expect(wrapper).toMatchSnapshot() - }) - - it('renders form with hidden csrf input', () => { - const input = wrapper.find('input[type=hidden]') - expect(input.exists()).toBe(true) - expect(input.attributes('value')).toBe('42') - }) -}) diff --git a/js/components/forms/edit_officer_form.js b/js/components/forms/edit_officer_form.js index dccf4327..016187bc 100644 --- a/js/components/forms/edit_officer_form.js +++ b/js/components/forms/edit_officer_form.js @@ -1,7 +1,6 @@ import FormMixin from '../../mixins/form' import checkboxinput from '../checkbox_input' import textinput from '../text_input' -import ConfirmationPopover from '../confirmation_popover' export default { name: 'edit-officer-form', @@ -11,7 +10,6 @@ export default { components: { checkboxinput, textinput, - ConfirmationPopover, }, props: { diff --git a/js/index.js b/js/index.js index 91706a2f..6472d5b5 100644 --- a/js/index.js +++ b/js/index.js @@ -31,7 +31,6 @@ import SpendTable from './components/tables/spend_table' import EnvironmentsTable from './components/tables/application_environments' import TaskOrderList from './components/tables/task_order_list.js' import LocalDatetime from './components/local_datetime' -import ConfirmationPopover from './components/confirmation_popover' import { isNotInVerticalViewport } from './lib/viewport' import DateSelector from './components/date_selector' import SidenavToggler from './components/sidenav_toggler' @@ -73,7 +72,6 @@ const app = new Vue({ EditEnvironmentRole, EditApplicationRoles, MultiStepModalForm, - ConfirmationPopover, funding, uploadinput, DateSelector, diff --git a/templates/components/required_label.html b/templates/components/required_label.html deleted file mode 100644 index 8425f9d1..00000000 --- a/templates/components/required_label.html +++ /dev/null @@ -1,5 +0,0 @@ -{% macro RequiredLabel() -%} - {{ "common.response_label" | translate }} -{%- endmacro %} - -