diff options
Diffstat (limited to 'spec/frontend')
1241 files changed, 65 insertions, 4692 deletions
diff --git a/spec/frontend/.eslintrc.yml b/spec/frontend/.eslintrc.yml index 45639f4c948..200f539fb3e 100644 --- a/spec/frontend/.eslintrc.yml +++ b/spec/frontend/.eslintrc.yml @@ -12,6 +12,7 @@ settings: jest: jestConfigFile: 'jest.config.js' rules: + '@gitlab/vtu-no-explicit-wrapper-destroy': error jest/expect-expect: - off - assertFunctionNames: diff --git a/spec/frontend/__helpers__/keep_alive_component_helper_spec.js b/spec/frontend/__helpers__/keep_alive_component_helper_spec.js index 54d397d0997..8b6cdedfd9f 100644 --- a/spec/frontend/__helpers__/keep_alive_component_helper_spec.js +++ b/spec/frontend/__helpers__/keep_alive_component_helper_spec.js @@ -12,10 +12,6 @@ describe('keepAlive', () => { wrapper = mount(keepAlive(component)); }); - afterEach(() => { - wrapper.destroy(); - }); - it('converts a component to a keep-alive component', async () => { const { element } = wrapper.findComponent(component); diff --git a/spec/frontend/abuse_reports/components/abuse_category_selector_spec.js b/spec/frontend/abuse_reports/components/abuse_category_selector_spec.js index ec20088c443..5de5f495f01 100644 --- a/spec/frontend/abuse_reports/components/abuse_category_selector_spec.js +++ b/spec/frontend/abuse_reports/components/abuse_category_selector_spec.js @@ -33,10 +33,6 @@ describe('AbuseCategorySelector', () => { createComponent({ showDrawer: true }); }); - afterEach(() => { - wrapper.destroy(); - }); - const findDrawer = () => wrapper.findComponent(GlDrawer); const findTitle = () => wrapper.findByTestId('category-drawer-title'); diff --git a/spec/frontend/access_tokens/components/expires_at_field_spec.js b/spec/frontend/access_tokens/components/expires_at_field_spec.js index 491d2a0e323..6605faadc17 100644 --- a/spec/frontend/access_tokens/components/expires_at_field_spec.js +++ b/spec/frontend/access_tokens/components/expires_at_field_spec.js @@ -25,10 +25,6 @@ describe('~/access_tokens/components/expires_at_field', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('should render datepicker with input info', () => { createComponent(); diff --git a/spec/frontend/access_tokens/components/new_access_token_app_spec.js b/spec/frontend/access_tokens/components/new_access_token_app_spec.js index 753e693cc85..fb92cc34ce9 100644 --- a/spec/frontend/access_tokens/components/new_access_token_app_spec.js +++ b/spec/frontend/access_tokens/components/new_access_token_app_spec.js @@ -52,7 +52,6 @@ describe('~/access_tokens/components/new_access_token_app', () => { afterEach(() => { resetHTMLFixture(); - wrapper.destroy(); createAlert.mockClear(); }); diff --git a/spec/frontend/access_tokens/components/token_spec.js b/spec/frontend/access_tokens/components/token_spec.js index 1af21aaa8cd..f62f7d72e3b 100644 --- a/spec/frontend/access_tokens/components/token_spec.js +++ b/spec/frontend/access_tokens/components/token_spec.js @@ -23,10 +23,6 @@ describe('Token', () => { wrapper = mountExtended(Token, { propsData: defaultPropsData, slots: defaultSlots }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders title slot', () => { createComponent(); diff --git a/spec/frontend/access_tokens/components/tokens_app_spec.js b/spec/frontend/access_tokens/components/tokens_app_spec.js index d7acfbb47eb..6e7dee6a2cc 100644 --- a/spec/frontend/access_tokens/components/tokens_app_spec.js +++ b/spec/frontend/access_tokens/components/tokens_app_spec.js @@ -54,10 +54,6 @@ describe('TokensApp', () => { expect(container.props()).toMatchObject(expectedProps); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders all enabled tokens', () => { createComponent(); diff --git a/spec/frontend/add_context_commits_modal/components/add_context_commits_modal_spec.js b/spec/frontend/add_context_commits_modal/components/add_context_commits_modal_spec.js index 1d57473943b..5e96da9af7e 100644 --- a/spec/frontend/add_context_commits_modal/components/add_context_commits_modal_spec.js +++ b/spec/frontend/add_context_commits_modal/components/add_context_commits_modal_spec.js @@ -55,10 +55,6 @@ describe('AddContextCommitsModal', () => { wrapper = createWrapper(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders modal with 2 tabs', () => { expect(wrapper.element).toMatchSnapshot(); }); diff --git a/spec/frontend/add_context_commits_modal/components/review_tab_container_spec.js b/spec/frontend/add_context_commits_modal/components/review_tab_container_spec.js index f679576182f..975f115c4bb 100644 --- a/spec/frontend/add_context_commits_modal/components/review_tab_container_spec.js +++ b/spec/frontend/add_context_commits_modal/components/review_tab_container_spec.js @@ -26,10 +26,6 @@ describe('ReviewTabContainer', () => { createWrapper(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('shows loading icon when commits are being loaded', () => { createWrapper({ isLoading: true }); expect(wrapper.findComponent(GlLoadingIcon).exists()).toBe(true); diff --git a/spec/frontend/admin/analytics/devops_score/components/devops_score_callout_spec.js b/spec/frontend/admin/analytics/devops_score/components/devops_score_callout_spec.js index c9a899ab78b..06f9ffeffcd 100644 --- a/spec/frontend/admin/analytics/devops_score/components/devops_score_callout_spec.js +++ b/spec/frontend/admin/analytics/devops_score/components/devops_score_callout_spec.js @@ -19,10 +19,6 @@ describe('DevopsScoreCallout', () => { const findBanner = () => wrapper.findComponent(GlBanner); - afterEach(() => { - wrapper.destroy(); - }); - describe('with no cookie set', () => { beforeEach(() => { utils.setCookie = jest.fn(); diff --git a/spec/frontend/admin/application_settings/inactive_project_deletion/components/form_spec.js b/spec/frontend/admin/application_settings/inactive_project_deletion/components/form_spec.js index 2db997942a7..969844f981c 100644 --- a/spec/frontend/admin/application_settings/inactive_project_deletion/components/form_spec.js +++ b/spec/frontend/admin/application_settings/inactive_project_deletion/components/form_spec.js @@ -29,10 +29,6 @@ describe('Form component', () => { wrapper = mountFn(SettingsForm, { propsData }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('Enable inactive project deletion', () => { it('has the checkbox', () => { createComponent(); diff --git a/spec/frontend/admin/applications/components/delete_application_spec.js b/spec/frontend/admin/applications/components/delete_application_spec.js index 1a400a101b5..315c38a2bbc 100644 --- a/spec/frontend/admin/applications/components/delete_application_spec.js +++ b/spec/frontend/admin/applications/components/delete_application_spec.js @@ -31,7 +31,6 @@ describe('DeleteApplication', () => { }); afterEach(() => { - wrapper.destroy(); resetHTMLFixture(); }); diff --git a/spec/frontend/admin/background_migrations/components/database_listbox_spec.js b/spec/frontend/admin/background_migrations/components/database_listbox_spec.js index 212f4c0842c..d7b319a3d5e 100644 --- a/spec/frontend/admin/background_migrations/components/database_listbox_spec.js +++ b/spec/frontend/admin/background_migrations/components/database_listbox_spec.js @@ -26,10 +26,6 @@ describe('BackgroundMigrationsDatabaseListbox', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findGlCollapsibleListbox = () => wrapper.findComponent(GlCollapsibleListbox); describe('template always', () => { diff --git a/spec/frontend/admin/broadcast_messages/components/base_spec.js b/spec/frontend/admin/broadcast_messages/components/base_spec.js index 13619f536c8..50d8eeb563d 100644 --- a/spec/frontend/admin/broadcast_messages/components/base_spec.js +++ b/spec/frontend/admin/broadcast_messages/components/base_spec.js @@ -41,7 +41,6 @@ describe('BroadcastMessagesBase', () => { afterEach(() => { axiosMock.restore(); - wrapper.destroy(); }); it('renders the table and pagination when there are existing messages', () => { diff --git a/spec/frontend/admin/broadcast_messages/components/messages_table_spec.js b/spec/frontend/admin/broadcast_messages/components/messages_table_spec.js index 349fab03853..432bfefeb18 100644 --- a/spec/frontend/admin/broadcast_messages/components/messages_table_spec.js +++ b/spec/frontend/admin/broadcast_messages/components/messages_table_spec.js @@ -21,10 +21,6 @@ describe('MessagesTable', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - it('renders a table row for each message', () => { createComponent(); diff --git a/spec/frontend/admin/deploy_keys/components/table_spec.js b/spec/frontend/admin/deploy_keys/components/table_spec.js index ef5796f634b..a05654a1d25 100644 --- a/spec/frontend/admin/deploy_keys/components/table_spec.js +++ b/spec/frontend/admin/deploy_keys/components/table_spec.js @@ -91,10 +91,6 @@ describe('DeployKeysTable', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders page title', () => { createComponent(); diff --git a/spec/frontend/admin/signup_restrictions/components/signup_checkbox_spec.js b/spec/frontend/admin/signup_restrictions/components/signup_checkbox_spec.js index eecc21e206b..9e55716cc30 100644 --- a/spec/frontend/admin/signup_restrictions/components/signup_checkbox_spec.js +++ b/spec/frontend/admin/signup_restrictions/components/signup_checkbox_spec.js @@ -28,10 +28,6 @@ describe('Signup Form', () => { const findCheckboxLabel = () => findByTestId('label'); const findHelpText = () => findByTestId('helpText'); - afterEach(() => { - wrapper.destroy(); - }); - describe('Signup Checkbox', () => { beforeEach(() => { mountComponent(); diff --git a/spec/frontend/admin/signup_restrictions/components/signup_form_spec.js b/spec/frontend/admin/signup_restrictions/components/signup_form_spec.js index f2a951bcc76..9192fc12401 100644 --- a/spec/frontend/admin/signup_restrictions/components/signup_form_spec.js +++ b/spec/frontend/admin/signup_restrictions/components/signup_form_spec.js @@ -40,8 +40,6 @@ describe('Signup Form', () => { const findModal = () => wrapper.findComponent(GlModal); afterEach(() => { - wrapper.destroy(); - formSubmitSpy = null; }); diff --git a/spec/frontend/admin/statistics_panel/components/app_spec.js b/spec/frontend/admin/statistics_panel/components/app_spec.js index 4c362a31068..60e46cddd7e 100644 --- a/spec/frontend/admin/statistics_panel/components/app_spec.js +++ b/spec/frontend/admin/statistics_panel/components/app_spec.js @@ -30,10 +30,6 @@ describe('Admin statistics app', () => { store = createStore(); }); - afterEach(() => { - wrapper.destroy(); - }); - const findStats = (idx) => wrapper.findAll('.js-stats').at(idx); describe('template', () => { diff --git a/spec/frontend/admin/topics/components/remove_avatar_spec.js b/spec/frontend/admin/topics/components/remove_avatar_spec.js index f058eef3a3a..c069203d046 100644 --- a/spec/frontend/admin/topics/components/remove_avatar_spec.js +++ b/spec/frontend/admin/topics/components/remove_avatar_spec.js @@ -36,10 +36,6 @@ describe('RemoveAvatar', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('the button component', () => { it('displays the remove button', () => { const button = findButton(); diff --git a/spec/frontend/admin/topics/components/topic_select_spec.js b/spec/frontend/admin/topics/components/topic_select_spec.js index 738cbd88c4c..113a0e3d404 100644 --- a/spec/frontend/admin/topics/components/topic_select_spec.js +++ b/spec/frontend/admin/topics/components/topic_select_spec.js @@ -59,7 +59,6 @@ describe('TopicSelect', () => { } afterEach(() => { - wrapper.destroy(); jest.clearAllMocks(); }); diff --git a/spec/frontend/admin/users/components/actions/actions_spec.js b/spec/frontend/admin/users/components/actions/actions_spec.js index 8e9652332c1..4aeaa5356b4 100644 --- a/spec/frontend/admin/users/components/actions/actions_spec.js +++ b/spec/frontend/admin/users/components/actions/actions_spec.js @@ -22,11 +22,6 @@ describe('Action components', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('CONFIRMATION_ACTIONS', () => { it.each(CONFIRMATION_ACTIONS)('renders a dropdown item for "%s"', (action) => { initComponent({ diff --git a/spec/frontend/admin/users/components/app_spec.js b/spec/frontend/admin/users/components/app_spec.js index 913732aae42..d40089edc82 100644 --- a/spec/frontend/admin/users/components/app_spec.js +++ b/spec/frontend/admin/users/components/app_spec.js @@ -17,11 +17,6 @@ describe('AdminUsersApp component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when initialized', () => { beforeEach(() => { initComponent(); diff --git a/spec/frontend/admin/users/components/modals/delete_user_modal_spec.js b/spec/frontend/admin/users/components/modals/delete_user_modal_spec.js index 2e892e292d7..efb951f4ad2 100644 --- a/spec/frontend/admin/users/components/modals/delete_user_modal_spec.js +++ b/spec/frontend/admin/users/components/modals/delete_user_modal_spec.js @@ -73,11 +73,6 @@ describe('Delete user modal', () => { formSubmitSpy = jest.spyOn(HTMLFormElement.prototype, 'submit').mockImplementation(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders modal with form included', () => { createComponent(); expect(findForm().element).toMatchSnapshot(); diff --git a/spec/frontend/admin/users/components/user_actions_spec.js b/spec/frontend/admin/users/components/user_actions_spec.js index 84966998e82..1a2cc3e5c34 100644 --- a/spec/frontend/admin/users/components/user_actions_spec.js +++ b/spec/frontend/admin/users/components/user_actions_spec.js @@ -37,11 +37,6 @@ describe('AdminUserActions component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('edit button', () => { describe('when the user has an edit action attached', () => { beforeEach(() => { diff --git a/spec/frontend/admin/users/components/user_avatar_spec.js b/spec/frontend/admin/users/components/user_avatar_spec.js index dc1770daee5..02e648d2b77 100644 --- a/spec/frontend/admin/users/components/user_avatar_spec.js +++ b/spec/frontend/admin/users/components/user_avatar_spec.js @@ -34,11 +34,6 @@ describe('AdminUserAvatar component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when initialized', () => { beforeEach(() => { initComponent(); diff --git a/spec/frontend/admin/users/components/user_date_spec.js b/spec/frontend/admin/users/components/user_date_spec.js index 73be33d5a9d..19c1cd38a50 100644 --- a/spec/frontend/admin/users/components/user_date_spec.js +++ b/spec/frontend/admin/users/components/user_date_spec.js @@ -17,11 +17,6 @@ describe('FormatDate component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it.each` date | dateFormat | output ${mockDate} | ${undefined} | ${'Nov 13, 2020'} diff --git a/spec/frontend/admin/users/components/users_table_spec.js b/spec/frontend/admin/users/components/users_table_spec.js index 3d3cdadb382..6f658fd2e59 100644 --- a/spec/frontend/admin/users/components/users_table_spec.js +++ b/spec/frontend/admin/users/components/users_table_spec.js @@ -57,11 +57,6 @@ describe('AdminUsersTable component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when there are users', () => { beforeEach(() => { initComponent(); diff --git a/spec/frontend/admin/users/index_spec.js b/spec/frontend/admin/users/index_spec.js index b51858d5129..d8a94ee5e1d 100644 --- a/spec/frontend/admin/users/index_spec.js +++ b/spec/frontend/admin/users/index_spec.js @@ -19,8 +19,6 @@ describe('initAdminUsersApp', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; el = null; }); @@ -47,8 +45,6 @@ describe('initAdminUserActions', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; el = null; }); diff --git a/spec/frontend/alerts_settings/components/alerts_settings_wrapper_spec.js b/spec/frontend/alerts_settings/components/alerts_settings_wrapper_spec.js index 11a16ade9ed..67d8619f157 100644 --- a/spec/frontend/alerts_settings/components/alerts_settings_wrapper_spec.js +++ b/spec/frontend/alerts_settings/components/alerts_settings_wrapper_spec.js @@ -128,10 +128,6 @@ describe('AlertsSettingsWrapper', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/analytics/components/activity_chart_spec.js b/spec/frontend/analytics/components/activity_chart_spec.js index c26407f5c1d..4f8126aaacf 100644 --- a/spec/frontend/analytics/components/activity_chart_spec.js +++ b/spec/frontend/analytics/components/activity_chart_spec.js @@ -13,11 +13,6 @@ describe('Activity Chart Bundle', () => { }); } - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findChart = () => wrapper.findComponent(GlColumnChart); const findNoData = () => wrapper.find('[data-testid="noActivityChartData"]'); diff --git a/spec/frontend/analytics/cycle_analytics/base_spec.js b/spec/frontend/analytics/cycle_analytics/base_spec.js index 978970d1526..685135947ec 100644 --- a/spec/frontend/analytics/cycle_analytics/base_spec.js +++ b/spec/frontend/analytics/cycle_analytics/base_spec.js @@ -94,11 +94,6 @@ describe('Value stream analytics component', () => { wrapper = createComponent({ initialState: { selectedStage, selectedStageEvents, pagination } }); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders the path navigation component', () => { expect(findPathNavigation().exists()).toBe(true); }); diff --git a/spec/frontend/analytics/cycle_analytics/filter_bar_spec.js b/spec/frontend/analytics/cycle_analytics/filter_bar_spec.js index 2b26b202882..da7824adbf9 100644 --- a/spec/frontend/analytics/cycle_analytics/filter_bar_spec.js +++ b/spec/frontend/analytics/cycle_analytics/filter_bar_spec.js @@ -98,7 +98,6 @@ describe('Filter bar', () => { }); afterEach(() => { - wrapper.destroy(); mock.restore(); }); diff --git a/spec/frontend/analytics/cycle_analytics/formatted_stage_count_spec.js b/spec/frontend/analytics/cycle_analytics/formatted_stage_count_spec.js index 9be92bb92bc..6dd7e2e6223 100644 --- a/spec/frontend/analytics/cycle_analytics/formatted_stage_count_spec.js +++ b/spec/frontend/analytics/cycle_analytics/formatted_stage_count_spec.js @@ -16,10 +16,6 @@ describe('Formatted Stage Count', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it.each` stageCount | expectedOutput ${null} | ${'-'} diff --git a/spec/frontend/analytics/cycle_analytics/path_navigation_spec.js b/spec/frontend/analytics/cycle_analytics/path_navigation_spec.js index 107e62035c3..9a598ee0ad1 100644 --- a/spec/frontend/analytics/cycle_analytics/path_navigation_spec.js +++ b/spec/frontend/analytics/cycle_analytics/path_navigation_spec.js @@ -50,8 +50,6 @@ describe('Project PathNavigation', () => { afterEach(() => { unmockTracking(); - wrapper.destroy(); - wrapper = null; }); describe('displays correctly', () => { diff --git a/spec/frontend/analytics/cycle_analytics/stage_table_spec.js b/spec/frontend/analytics/cycle_analytics/stage_table_spec.js index cfccce7eae9..fbc63a80de8 100644 --- a/spec/frontend/analytics/cycle_analytics/stage_table_spec.js +++ b/spec/frontend/analytics/cycle_analytics/stage_table_spec.js @@ -51,10 +51,6 @@ function createComponent(props = {}, shallow = false) { } describe('StageTable', () => { - afterEach(() => { - wrapper.destroy(); - }); - describe('is loaded with data', () => { beforeEach(() => { wrapper = createComponent(); @@ -258,7 +254,6 @@ describe('StageTable', () => { afterEach(() => { unmockTracking(); - wrapper.destroy(); }); it('will display the pagination component', () => { @@ -305,7 +300,6 @@ describe('StageTable', () => { afterEach(() => { unmockTracking(); - wrapper.destroy(); }); it('can sort the end event or duration', () => { diff --git a/spec/frontend/analytics/cycle_analytics/total_time_spec.js b/spec/frontend/analytics/cycle_analytics/total_time_spec.js index 47ee7aad8c4..6597b6fa3d5 100644 --- a/spec/frontend/analytics/cycle_analytics/total_time_spec.js +++ b/spec/frontend/analytics/cycle_analytics/total_time_spec.js @@ -10,10 +10,6 @@ describe('TotalTime', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('with a valid time object', () => { it.each` time diff --git a/spec/frontend/analytics/cycle_analytics/value_stream_filters_spec.js b/spec/frontend/analytics/cycle_analytics/value_stream_filters_spec.js index 4f333e95d89..160f6ce0563 100644 --- a/spec/frontend/analytics/cycle_analytics/value_stream_filters_spec.js +++ b/spec/frontend/analytics/cycle_analytics/value_stream_filters_spec.js @@ -34,11 +34,6 @@ describe('ValueStreamFilters', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('will render the filter bar', () => { expect(findFilterBar().exists()).toBe(true); }); diff --git a/spec/frontend/analytics/cycle_analytics/value_stream_metrics_spec.js b/spec/frontend/analytics/cycle_analytics/value_stream_metrics_spec.js index b96580eeb2d..ca722dbcb72 100644 --- a/spec/frontend/analytics/cycle_analytics/value_stream_metrics_spec.js +++ b/spec/frontend/analytics/cycle_analytics/value_stream_metrics_spec.js @@ -50,10 +50,6 @@ describe('ValueStreamMetrics', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('with successful requests', () => { beforeEach(() => { mockGetValueStreamSummaryMetrics = jest.fn().mockResolvedValue({ data: metricsData }); diff --git a/spec/frontend/analytics/devops_reports/components/service_ping_disabled_spec.js b/spec/frontend/analytics/devops_reports/components/service_ping_disabled_spec.js index c62bfb11f7b..70bfce41c82 100644 --- a/spec/frontend/analytics/devops_reports/components/service_ping_disabled_spec.js +++ b/spec/frontend/analytics/devops_reports/components/service_ping_disabled_spec.js @@ -6,10 +6,6 @@ import ServicePingDisabled from '~/analytics/devops_reports/components/service_p describe('~/analytics/devops_reports/components/service_ping_disabled.vue', () => { let wrapper; - afterEach(() => { - wrapper.destroy(); - }); - const createWrapper = ({ isAdmin = false } = {}) => { wrapper = mountExtended(ServicePingDisabled, { provide: { diff --git a/spec/frontend/analytics/shared/components/daterange_spec.js b/spec/frontend/analytics/shared/components/daterange_spec.js index 562e86529ee..8e4b60efa67 100644 --- a/spec/frontend/analytics/shared/components/daterange_spec.js +++ b/spec/frontend/analytics/shared/components/daterange_spec.js @@ -22,10 +22,6 @@ describe('Daterange component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findDaterangePicker = () => wrapper.findComponent(GlDaterangePicker); const findDateRangeIndicator = () => wrapper.findByTestId('daterange-picker-indicator'); diff --git a/spec/frontend/analytics/shared/components/metric_popover_spec.js b/spec/frontend/analytics/shared/components/metric_popover_spec.js index e0bfff3e664..d7e6606cdc6 100644 --- a/spec/frontend/analytics/shared/components/metric_popover_spec.js +++ b/spec/frontend/analytics/shared/components/metric_popover_spec.js @@ -34,10 +34,6 @@ describe('MetricPopover', () => { const findMetricDocsLinkIcon = () => findMetricDocsLink().findComponent(GlIcon); const findMetricDetailsIcon = () => findMetricLink().findComponent(GlIcon); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the metric label', () => { wrapper = createComponent({ metric: MOCK_METRIC }); expect(findMetricLabel().text()).toBe(MOCK_METRIC.label); diff --git a/spec/frontend/analytics/shared/components/metric_tile_spec.js b/spec/frontend/analytics/shared/components/metric_tile_spec.js index 980dfad9eb0..00e82cff0f0 100644 --- a/spec/frontend/analytics/shared/components/metric_tile_spec.js +++ b/spec/frontend/analytics/shared/components/metric_tile_spec.js @@ -21,10 +21,6 @@ describe('MetricTile', () => { const findSingleStat = () => wrapper.findComponent(GlSingleStat); const findPopover = () => wrapper.findComponent(MetricPopover); - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { describe('links', () => { it('when the metric has links, it redirects the user on click', () => { diff --git a/spec/frontend/analytics/shared/components/projects_dropdown_filter_spec.js b/spec/frontend/analytics/shared/components/projects_dropdown_filter_spec.js index 3871fd530d8..d2cbe0d39e4 100644 --- a/spec/frontend/analytics/shared/components/projects_dropdown_filter_spec.js +++ b/spec/frontend/analytics/shared/components/projects_dropdown_filter_spec.js @@ -70,10 +70,6 @@ describe('ProjectsDropdownFilter component', () => { return waitForPromises(); }; - afterEach(() => { - wrapper.destroy(); - }); - const findHighlightedItems = () => wrapper.findByTestId('vsa-highlighted-items'); const findUnhighlightedItems = () => wrapper.findByTestId('vsa-default-items'); const findClearAllButton = () => wrapper.findByText('Clear all'); diff --git a/spec/frontend/analytics/usage_trends/components/app_spec.js b/spec/frontend/analytics/usage_trends/components/app_spec.js index c732dc22322..f9338661ebf 100644 --- a/spec/frontend/analytics/usage_trends/components/app_spec.js +++ b/spec/frontend/analytics/usage_trends/components/app_spec.js @@ -15,11 +15,6 @@ describe('UsageTrendsApp', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('displays the usage counts component', () => { expect(wrapper.findComponent(UsageCounts).exists()).toBe(true); }); diff --git a/spec/frontend/analytics/usage_trends/components/usage_counts_spec.js b/spec/frontend/analytics/usage_trends/components/usage_counts_spec.js index f4cbc56be5c..a71ce090955 100644 --- a/spec/frontend/analytics/usage_trends/components/usage_counts_spec.js +++ b/spec/frontend/analytics/usage_trends/components/usage_counts_spec.js @@ -26,10 +26,6 @@ describe('UsageCounts', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findSkeletonLoader = () => wrapper.findComponent(GlSkeletonLoader); const findAllSingleStats = () => wrapper.findAllComponents(GlSingleStat); diff --git a/spec/frontend/analytics/usage_trends/components/usage_trends_count_chart_spec.js b/spec/frontend/analytics/usage_trends/components/usage_trends_count_chart_spec.js index ad6089f74b5..322d05e663a 100644 --- a/spec/frontend/analytics/usage_trends/components/usage_trends_count_chart_spec.js +++ b/spec/frontend/analytics/usage_trends/components/usage_trends_count_chart_spec.js @@ -45,11 +45,6 @@ describe('UsageTrendsCountChart', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findLoader = () => wrapper.findComponent(ChartSkeletonLoader); const findChart = () => wrapper.findComponent(GlLineChart); const findAlert = () => wrapper.findComponent(GlAlert); diff --git a/spec/frontend/analytics/usage_trends/components/users_chart_spec.js b/spec/frontend/analytics/usage_trends/components/users_chart_spec.js index e7abd4d4323..20836d7cc70 100644 --- a/spec/frontend/analytics/usage_trends/components/users_chart_spec.js +++ b/spec/frontend/analytics/usage_trends/components/users_chart_spec.js @@ -42,11 +42,6 @@ describe('UsersChart', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findLoader = () => wrapper.findComponent(ChartSkeletonLoader); const findAlert = () => wrapper.findComponent(GlAlert); const findChart = () => wrapper.findComponent(GlAreaChart); diff --git a/spec/frontend/artifacts_settings/components/keep_latest_artifact_checkbox_spec.js b/spec/frontend/artifacts_settings/components/keep_latest_artifact_checkbox_spec.js index ca94acfa444..efdebe5f3b0 100644 --- a/spec/frontend/artifacts_settings/components/keep_latest_artifact_checkbox_spec.js +++ b/spec/frontend/artifacts_settings/components/keep_latest_artifact_checkbox_spec.js @@ -78,8 +78,6 @@ describe('Keep latest artifact checkbox', () => { }; afterEach(() => { - wrapper.destroy(); - wrapper = null; apolloProvider = null; }); diff --git a/spec/frontend/badges/components/badge_form_spec.js b/spec/frontend/badges/components/badge_form_spec.js index 0a736df7075..d7519f1f80d 100644 --- a/spec/frontend/badges/components/badge_form_spec.js +++ b/spec/frontend/badges/components/badge_form_spec.js @@ -43,7 +43,6 @@ describe('BadgeForm component', () => { }); afterEach(() => { - wrapper.destroy(); axiosMock.restore(); }); diff --git a/spec/frontend/badges/components/badge_list_row_spec.js b/spec/frontend/badges/components/badge_list_row_spec.js index ee7ccac974a..cbbeb36ff33 100644 --- a/spec/frontend/badges/components/badge_list_row_spec.js +++ b/spec/frontend/badges/components/badge_list_row_spec.js @@ -43,7 +43,6 @@ describe('BadgeListRow component', () => { }; afterEach(() => { - wrapper.destroy(); resetHTMLFixture(); }); diff --git a/spec/frontend/badges/components/badge_list_spec.js b/spec/frontend/badges/components/badge_list_spec.js index 606b1bc9cce..374b7b50af4 100644 --- a/spec/frontend/badges/components/badge_list_spec.js +++ b/spec/frontend/badges/components/badge_list_spec.js @@ -38,10 +38,6 @@ describe('BadgeList component', () => { wrapper = mount(BadgeList, { store }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('for project badges', () => { it('renders a header with the badge count', () => { createComponent({ diff --git a/spec/frontend/badges/components/badge_settings_spec.js b/spec/frontend/badges/components/badge_settings_spec.js index bddb6d3801c..7ad2c99869c 100644 --- a/spec/frontend/badges/components/badge_settings_spec.js +++ b/spec/frontend/badges/components/badge_settings_spec.js @@ -32,10 +32,6 @@ describe('BadgeSettings component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('displays modal if button for deleting a badge is clicked', async () => { const button = wrapper.find('[data-testid="delete-badge"]'); diff --git a/spec/frontend/badges/components/badge_spec.js b/spec/frontend/badges/components/badge_spec.js index b468e38f19e..c933c1b5434 100644 --- a/spec/frontend/badges/components/badge_spec.js +++ b/spec/frontend/badges/components/badge_spec.js @@ -24,10 +24,6 @@ describe('Badge component', () => { wrapper = mount(Badge, { propsData }); }; - afterEach(() => { - wrapper.destroy(); - }); - beforeEach(() => { return createComponent({ ...dummyProps }, '#dummy-element'); }); diff --git a/spec/frontend/batch_comments/components/diff_file_drafts_spec.js b/spec/frontend/batch_comments/components/diff_file_drafts_spec.js index c922d6a9809..f667ebc0fcb 100644 --- a/spec/frontend/batch_comments/components/diff_file_drafts_spec.js +++ b/spec/frontend/batch_comments/components/diff_file_drafts_spec.js @@ -28,10 +28,6 @@ describe('Batch comments diff file drafts component', () => { }); } - afterEach(() => { - vm.destroy(); - }); - it('renders list of draft notes', () => { factory(); diff --git a/spec/frontend/batch_comments/components/draft_note_spec.js b/spec/frontend/batch_comments/components/draft_note_spec.js index 924d88866ee..159e36c1364 100644 --- a/spec/frontend/batch_comments/components/draft_note_spec.js +++ b/spec/frontend/batch_comments/components/draft_note_spec.js @@ -49,10 +49,6 @@ describe('Batch comments draft note component', () => { draft = createDraft(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders template', () => { createComponent(); expect(wrapper.findComponent(GlBadge).exists()).toBe(true); diff --git a/spec/frontend/batch_comments/components/drafts_count_spec.js b/spec/frontend/batch_comments/components/drafts_count_spec.js index c3a7946c85c..850a7efb4ed 100644 --- a/spec/frontend/batch_comments/components/drafts_count_spec.js +++ b/spec/frontend/batch_comments/components/drafts_count_spec.js @@ -15,10 +15,6 @@ describe('Batch comments drafts count component', () => { wrapper = mount(DraftsCount, { store }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders count', () => { expect(wrapper.text()).toContain('1'); }); diff --git a/spec/frontend/batch_comments/components/preview_item_spec.js b/spec/frontend/batch_comments/components/preview_item_spec.js index 6a99294f855..a19a72af813 100644 --- a/spec/frontend/batch_comments/components/preview_item_spec.js +++ b/spec/frontend/batch_comments/components/preview_item_spec.js @@ -26,10 +26,6 @@ describe('Batch comments draft preview item component', () => { wrapper = mount(PreviewItem, { store, propsData: { draft, isLast } }); } - afterEach(() => { - wrapper.destroy(); - }); - it('renders text content', () => { createComponent(false, { note_html: '<img src="" /><p>Hello world</p>' }); diff --git a/spec/frontend/batch_comments/components/review_bar_spec.js b/spec/frontend/batch_comments/components/review_bar_spec.js index 0a4c9ff62e4..923e86a7e64 100644 --- a/spec/frontend/batch_comments/components/review_bar_spec.js +++ b/spec/frontend/batch_comments/components/review_bar_spec.js @@ -20,10 +20,6 @@ describe('Batch comments review bar component', () => { document.body.className = ''; }); - afterEach(() => { - wrapper.destroy(); - }); - it('adds review-bar-visible class to body when review bar is mounted', async () => { expect(document.body.classList.contains(REVIEW_BAR_VISIBLE_CLASS_NAME)).toBe(false); diff --git a/spec/frontend/batch_comments/components/submit_dropdown_spec.js b/spec/frontend/batch_comments/components/submit_dropdown_spec.js index 003a6d86371..ac6198ec8b5 100644 --- a/spec/frontend/batch_comments/components/submit_dropdown_spec.js +++ b/spec/frontend/batch_comments/components/submit_dropdown_spec.js @@ -47,7 +47,6 @@ const findForm = () => wrapper.findByTestId('submit-gl-form'); describe('Batch comments submit dropdown', () => { afterEach(() => { - wrapper.destroy(); window.mrTabs = null; }); diff --git a/spec/frontend/behaviors/components/diagram_performance_warning_spec.js b/spec/frontend/behaviors/components/diagram_performance_warning_spec.js index c58c2bc55a9..7e6b20da4d4 100644 --- a/spec/frontend/behaviors/components/diagram_performance_warning_spec.js +++ b/spec/frontend/behaviors/components/diagram_performance_warning_spec.js @@ -11,10 +11,6 @@ describe('DiagramPerformanceWarning component', () => { wrapper = shallowMount(DiagramPerformanceWarning); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders warning alert with button', () => { expect(findAlert().props()).toMatchObject({ primaryButtonText: DiagramPerformanceWarning.i18n.buttonText, diff --git a/spec/frontend/behaviors/components/json_table_spec.js b/spec/frontend/behaviors/components/json_table_spec.js index 42b4a051d4d..a82310873ed 100644 --- a/spec/frontend/behaviors/components/json_table_spec.js +++ b/spec/frontend/behaviors/components/json_table_spec.js @@ -59,10 +59,6 @@ describe('behaviors/components/json_table', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findTable = () => wrapper.findComponent(GlTable); const findTableCaption = () => wrapper.findByTestId('slot-table-caption'); const findFilterInput = () => wrapper.findComponent(GlFormInput); diff --git a/spec/frontend/blob/components/blob_content_error_spec.js b/spec/frontend/blob/components/blob_content_error_spec.js index 0f5885c2acf..203fab94a5c 100644 --- a/spec/frontend/blob/components/blob_content_error_spec.js +++ b/spec/frontend/blob/components/blob_content_error_spec.js @@ -18,10 +18,6 @@ describe('Blob Content Error component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - describe('collapsed and too large blobs', () => { it.each` error | reason | options diff --git a/spec/frontend/blob/components/blob_content_spec.js b/spec/frontend/blob/components/blob_content_spec.js index f7b819b6e94..91af5f7bfed 100644 --- a/spec/frontend/blob/components/blob_content_spec.js +++ b/spec/frontend/blob/components/blob_content_spec.js @@ -29,10 +29,6 @@ describe('Blob Content component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - describe('rendering', () => { it('renders loader if `loading: true`', () => { createComponent({ loading: true }); diff --git a/spec/frontend/blob/components/blob_edit_header_spec.js b/spec/frontend/blob/components/blob_edit_header_spec.js index c84b5896348..2b1bd1ac4ad 100644 --- a/spec/frontend/blob/components/blob_edit_header_spec.js +++ b/spec/frontend/blob/components/blob_edit_header_spec.js @@ -22,10 +22,6 @@ describe('Blob Header Editing', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('rendering', () => { it('matches the snapshot', () => { expect(wrapper.element).toMatchSnapshot(); diff --git a/spec/frontend/blob/components/blob_header_default_actions_spec.js b/spec/frontend/blob/components/blob_header_default_actions_spec.js index 0f015715dc2..e12021a48d2 100644 --- a/spec/frontend/blob/components/blob_header_default_actions_spec.js +++ b/spec/frontend/blob/components/blob_header_default_actions_spec.js @@ -34,10 +34,6 @@ describe('Blob Header Default Actions', () => { buttons = wrapper.findAllComponents(GlButton); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('renders', () => { const findCopyButton = () => wrapper.findByTestId('copyContentsButton'); const findViewRawButton = () => wrapper.findByTestId('viewRawButton'); diff --git a/spec/frontend/blob/components/blob_header_filepath_spec.js b/spec/frontend/blob/components/blob_header_filepath_spec.js index 8c32cba1ba4..be49146ff8a 100644 --- a/spec/frontend/blob/components/blob_header_filepath_spec.js +++ b/spec/frontend/blob/components/blob_header_filepath_spec.js @@ -21,10 +21,6 @@ describe('Blob Header Filepath', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - const findBadge = () => wrapper.findComponent(GlBadge); describe('rendering', () => { diff --git a/spec/frontend/blob/components/table_contents_spec.js b/spec/frontend/blob/components/table_contents_spec.js index 6af9cdcae7d..acfcef9704c 100644 --- a/spec/frontend/blob/components/table_contents_spec.js +++ b/spec/frontend/blob/components/table_contents_spec.js @@ -31,7 +31,6 @@ describe('Markdown table of contents component', () => { }); afterEach(() => { - wrapper.destroy(); resetHTMLFixture(); }); diff --git a/spec/frontend/blob/csv/csv_viewer_spec.js b/spec/frontend/blob/csv/csv_viewer_spec.js index 9364f76da5e..8f105f04aa7 100644 --- a/spec/frontend/blob/csv/csv_viewer_spec.js +++ b/spec/frontend/blob/csv/csv_viewer_spec.js @@ -29,10 +29,6 @@ describe('app/assets/javascripts/blob/csv/csv_viewer.vue', () => { const findLoadingIcon = () => wrapper.findComponent(GlLoadingIcon); const findAlert = () => wrapper.findComponent(PapaParseAlert); - afterEach(() => { - wrapper.destroy(); - }); - it('should render loading spinner', () => { createComponent(); diff --git a/spec/frontend/blob/notebook/notebook_viever_spec.js b/spec/frontend/blob/notebook/notebook_viever_spec.js index 2e7eadc912d..97b32a42afe 100644 --- a/spec/frontend/blob/notebook/notebook_viever_spec.js +++ b/spec/frontend/blob/notebook/notebook_viever_spec.js @@ -42,8 +42,6 @@ describe('iPython notebook renderer', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; mock.restore(); }); diff --git a/spec/frontend/blob/pdf/pdf_viewer_spec.js b/spec/frontend/blob/pdf/pdf_viewer_spec.js index 23227df6357..19d404f504b 100644 --- a/spec/frontend/blob/pdf/pdf_viewer_spec.js +++ b/spec/frontend/blob/pdf/pdf_viewer_spec.js @@ -26,11 +26,6 @@ describe('PDF renderer', () => { mountComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('shows loading icon', () => { expect(findLoading().exists()).toBe(true); }); diff --git a/spec/frontend/blob/pipeline_tour_success_modal_spec.js b/spec/frontend/blob/pipeline_tour_success_modal_spec.js index 81b38cfc278..84efa6041e4 100644 --- a/spec/frontend/blob/pipeline_tour_success_modal_spec.js +++ b/spec/frontend/blob/pipeline_tour_success_modal_spec.js @@ -38,7 +38,6 @@ describe('PipelineTourSuccessModal', () => { }); afterEach(() => { - wrapper.destroy(); unmockTracking(); Cookies.remove(modalProps.commitCookie); }); diff --git a/spec/frontend/blob/suggest_gitlab_ci_yml/components/popover_spec.js b/spec/frontend/blob/suggest_gitlab_ci_yml/components/popover_spec.js index 6b329dc078a..b30b0287a34 100644 --- a/spec/frontend/blob/suggest_gitlab_ci_yml/components/popover_spec.js +++ b/spec/frontend/blob/suggest_gitlab_ci_yml/components/popover_spec.js @@ -36,11 +36,6 @@ describe('Suggest gitlab-ci.yml Popover', () => { }); } - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when no dismiss cookie is set', () => { beforeEach(() => { createWrapper(defaultTrackLabel); diff --git a/spec/frontend/boards/board_card_inner_spec.js b/spec/frontend/boards/board_card_inner_spec.js index a9342af0c96..9e544bade5b 100644 --- a/spec/frontend/boards/board_card_inner_spec.js +++ b/spec/frontend/boards/board_card_inner_spec.js @@ -110,8 +110,6 @@ describe('Board card component', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; store = null; jest.clearAllMocks(); }); diff --git a/spec/frontend/boards/board_list_spec.js b/spec/frontend/boards/board_list_spec.js index fc8dbf8dc3a..9ec43c6e892 100644 --- a/spec/frontend/boards/board_list_spec.js +++ b/spec/frontend/boards/board_list_spec.js @@ -36,10 +36,6 @@ describe('Board list component', () => { useFakeRequestAnimationFrame(); - afterEach(() => { - wrapper.destroy(); - }); - describe('When Expanded', () => { beforeEach(() => { wrapper = createComponent({ issuesCount: 1 }); diff --git a/spec/frontend/boards/components/board_add_new_column_form_spec.js b/spec/frontend/boards/components/board_add_new_column_form_spec.js index 0b3c6cb24c4..6e96c4d01d7 100644 --- a/spec/frontend/boards/components/board_add_new_column_form_spec.js +++ b/spec/frontend/boards/components/board_add_new_column_form_spec.js @@ -55,10 +55,6 @@ describe('Board card layout', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - const formTitle = () => wrapper.findByTestId('board-add-column-form-title').text(); const findSearchInput = () => wrapper.findComponent(GlSearchBoxByType); const findSearchLabelFormGroup = () => wrapper.findComponent(GlFormGroup); diff --git a/spec/frontend/boards/components/board_add_new_column_spec.js b/spec/frontend/boards/components/board_add_new_column_spec.js index a3b2988ce75..e8d44af2716 100644 --- a/spec/frontend/boards/components/board_add_new_column_spec.js +++ b/spec/frontend/boards/components/board_add_new_column_spec.js @@ -68,10 +68,6 @@ describe('Board card layout', () => { } }; - afterEach(() => { - wrapper.destroy(); - }); - describe('Add list button', () => { it('calls addList', async () => { const getListByLabelId = jest.fn().mockReturnValue(null); diff --git a/spec/frontend/boards/components/board_add_new_column_trigger_spec.js b/spec/frontend/boards/components/board_add_new_column_trigger_spec.js index f42b1325548..d8b93e1f3b6 100644 --- a/spec/frontend/boards/components/board_add_new_column_trigger_spec.js +++ b/spec/frontend/boards/components/board_add_new_column_trigger_spec.js @@ -27,10 +27,6 @@ describe('BoardAddNewColumnTrigger', () => { mountComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('when button is active', () => { it('does not show the tooltip', () => { const tooltip = findTooltipText(); diff --git a/spec/frontend/boards/components/board_app_spec.js b/spec/frontend/boards/components/board_app_spec.js index cecfbb51a72..148e696b57b 100644 --- a/spec/frontend/boards/components/board_app_spec.js +++ b/spec/frontend/boards/components/board_app_spec.js @@ -34,8 +34,6 @@ describe('BoardApp', () => { }; afterEach(() => { - wrapper.destroy(); - wrapper = null; store = null; }); diff --git a/spec/frontend/boards/components/board_card_spec.js b/spec/frontend/boards/components/board_card_spec.js index 84e6318d98e..46116bed4cf 100644 --- a/spec/frontend/boards/components/board_card_spec.js +++ b/spec/frontend/boards/components/board_card_spec.js @@ -82,8 +82,6 @@ describe('Board card', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; store = null; }); diff --git a/spec/frontend/boards/components/board_column_spec.js b/spec/frontend/boards/components/board_column_spec.js index 612cf3bedb3..011665eee68 100644 --- a/spec/frontend/boards/components/board_column_spec.js +++ b/spec/frontend/boards/components/board_column_spec.js @@ -10,11 +10,6 @@ describe('Board Column Component', () => { let wrapper; let store; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const initStore = () => { store = createStore(); }; diff --git a/spec/frontend/boards/components/board_configuration_options_spec.js b/spec/frontend/boards/components/board_configuration_options_spec.js index 6f0971a9458..d2948daf121 100644 --- a/spec/frontend/boards/components/board_configuration_options_spec.js +++ b/spec/frontend/boards/components/board_configuration_options_spec.js @@ -16,10 +16,6 @@ describe('BoardConfigurationOptions', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const backlogListCheckbox = () => wrapper.find('[data-testid="backlog-list-checkbox"]'); const closedListCheckbox = () => wrapper.find('[data-testid="closed-list-checkbox"]'); diff --git a/spec/frontend/boards/components/board_content_sidebar_spec.js b/spec/frontend/boards/components/board_content_sidebar_spec.js index 955267a415c..90376a4a553 100644 --- a/spec/frontend/boards/components/board_content_sidebar_spec.js +++ b/spec/frontend/boards/components/board_content_sidebar_spec.js @@ -89,10 +89,6 @@ describe('BoardContentSidebar', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('confirms we render GlDrawer', () => { expect(wrapper.findComponent(GlDrawer).exists()).toBe(true); }); diff --git a/spec/frontend/boards/components/board_content_spec.js b/spec/frontend/boards/components/board_content_spec.js index 1bc2a41481d..f67296be87b 100644 --- a/spec/frontend/boards/components/board_content_spec.js +++ b/spec/frontend/boards/components/board_content_spec.js @@ -105,7 +105,6 @@ describe('BoardContent', () => { }); afterEach(() => { - wrapper.destroy(); fakeApollo = null; }); diff --git a/spec/frontend/boards/components/board_filtered_search_spec.js b/spec/frontend/boards/components/board_filtered_search_spec.js index f940012d44f..d8bc7f95f18 100644 --- a/spec/frontend/boards/components/board_filtered_search_spec.js +++ b/spec/frontend/boards/components/board_filtered_search_spec.js @@ -69,10 +69,6 @@ describe('BoardFilteredSearch', () => { const findFilteredSearch = () => wrapper.findComponent(FilteredSearchBarRoot); - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/boards/components/board_form_spec.js b/spec/frontend/boards/components/board_form_spec.js index 984d15210fa..7f881a92964 100644 --- a/spec/frontend/boards/components/board_form_spec.js +++ b/spec/frontend/boards/components/board_form_spec.js @@ -81,8 +81,6 @@ describe('BoardForm', () => { }; afterEach(() => { - wrapper.destroy(); - wrapper = null; mutate = null; }); diff --git a/spec/frontend/boards/components/board_list_header_spec.js b/spec/frontend/boards/components/board_list_header_spec.js index 43a74a6308b..466321cf1cc 100644 --- a/spec/frontend/boards/components/board_list_header_spec.js +++ b/spec/frontend/boards/components/board_list_header_spec.js @@ -21,8 +21,6 @@ describe('Board List Header Component', () => { const toggleListCollapsedSpy = jest.fn(); afterEach(() => { - wrapper.destroy(); - wrapper = null; fakeApollo = null; localStorage.clear(); diff --git a/spec/frontend/boards/components/board_new_issue_spec.js b/spec/frontend/boards/components/board_new_issue_spec.js index c3e69ba0e40..651d1daee52 100644 --- a/spec/frontend/boards/components/board_new_issue_spec.js +++ b/spec/frontend/boards/components/board_new_issue_spec.js @@ -51,10 +51,6 @@ describe('Issue boards new issue form', () => { await nextTick(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders board-new-item component', () => { const boardNewItem = findBoardNewItem(); expect(boardNewItem.exists()).toBe(true); diff --git a/spec/frontend/boards/components/board_new_item_spec.js b/spec/frontend/boards/components/board_new_item_spec.js index f4e9901aad2..f11eb2baca7 100644 --- a/spec/frontend/boards/components/board_new_item_spec.js +++ b/spec/frontend/boards/components/board_new_item_spec.js @@ -35,10 +35,6 @@ describe('BoardNewItem', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { describe('when the user provides a valid input', () => { it('finds an enabled create button', async () => { diff --git a/spec/frontend/boards/components/board_settings_sidebar_spec.js b/spec/frontend/boards/components/board_settings_sidebar_spec.js index f4ecbbbed1c..d0928485caf 100644 --- a/spec/frontend/boards/components/board_settings_sidebar_spec.js +++ b/spec/frontend/boards/components/board_settings_sidebar_spec.js @@ -65,8 +65,6 @@ describe('BoardSettingsSidebar', () => { afterEach(() => { jest.restoreAllMocks(); - wrapper.destroy(); - wrapper = null; }); it('finds a MountingPortal component', () => { diff --git a/spec/frontend/boards/components/board_top_bar_spec.js b/spec/frontend/boards/components/board_top_bar_spec.js index 002e4034e70..821c1963c8c 100644 --- a/spec/frontend/boards/components/board_top_bar_spec.js +++ b/spec/frontend/boards/components/board_top_bar_spec.js @@ -64,7 +64,6 @@ describe('BoardTopBar', () => { }; afterEach(() => { - wrapper.destroy(); mockApollo = null; }); diff --git a/spec/frontend/boards/components/boards_selector_spec.js b/spec/frontend/boards/components/boards_selector_spec.js index afa304a66ff..aa146eb4609 100644 --- a/spec/frontend/boards/components/boards_selector_spec.js +++ b/spec/frontend/boards/components/boards_selector_spec.js @@ -116,7 +116,6 @@ describe('BoardsSelector', () => { }; afterEach(() => { - wrapper.destroy(); fakeApollo = null; }); diff --git a/spec/frontend/boards/components/config_toggle_spec.js b/spec/frontend/boards/components/config_toggle_spec.js index 47d4692453d..5330721451e 100644 --- a/spec/frontend/boards/components/config_toggle_spec.js +++ b/spec/frontend/boards/components/config_toggle_spec.js @@ -23,10 +23,6 @@ describe('ConfigToggle', () => { const findButton = () => wrapper.findComponent(GlButton); - afterEach(() => { - wrapper.destroy(); - }); - it('renders a button with label `View scope` when `canAdminList` is `false`', () => { wrapper = createComponent({ canAdminList: false }); expect(findButton().text()).toBe('View scope'); diff --git a/spec/frontend/boards/components/issue_board_filtered_search_spec.js b/spec/frontend/boards/components/issue_board_filtered_search_spec.js index 3a8ce1319b2..5b5b68d5dbe 100644 --- a/spec/frontend/boards/components/issue_board_filtered_search_spec.js +++ b/spec/frontend/boards/components/issue_board_filtered_search_spec.js @@ -38,10 +38,6 @@ describe('IssueBoardFilter', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/boards/components/issue_due_date_spec.js b/spec/frontend/boards/components/issue_due_date_spec.js index 45fa10bf03a..dee8febfe4d 100644 --- a/spec/frontend/boards/components/issue_due_date_spec.js +++ b/spec/frontend/boards/components/issue_due_date_spec.js @@ -20,10 +20,6 @@ describe('Issue Due Date component', () => { date = new Date(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should render "Today" if the due date is today', () => { wrapper = createComponent(); diff --git a/spec/frontend/boards/components/issue_time_estimate_spec.js b/spec/frontend/boards/components/issue_time_estimate_spec.js index 948a7a20f7f..42507ef560b 100644 --- a/spec/frontend/boards/components/issue_time_estimate_spec.js +++ b/spec/frontend/boards/components/issue_time_estimate_spec.js @@ -7,10 +7,6 @@ describe('Issue Time Estimate component', () => { const findIssueTimeEstimate = () => wrapper.find('[data-testid="issue-time-estimate"]'); - afterEach(() => { - wrapper.destroy(); - }); - describe('when limitToHours is false', () => { beforeEach(() => { wrapper = shallowMount(IssueTimeEstimate, { diff --git a/spec/frontend/boards/components/item_count_spec.js b/spec/frontend/boards/components/item_count_spec.js index 0c0c7f66933..f2cc8eb1167 100644 --- a/spec/frontend/boards/components/item_count_spec.js +++ b/spec/frontend/boards/components/item_count_spec.js @@ -41,10 +41,6 @@ describe('IssueCount', () => { createComponent({ maxIssueCount, itemsSize }); }); - afterEach(() => { - vm.destroy(); - }); - it('contains issueSize in the template', () => { expect(vm.find('[data-testid="board-items-count"]').text()).toEqual(String(itemsSize)); }); @@ -66,10 +62,6 @@ describe('IssueCount', () => { createComponent({ maxIssueCount, itemsSize }); }); - afterEach(() => { - vm.destroy(); - }); - it('contains issueSize in the template', () => { expect(vm.find('[data-testid="board-items-count"]').text()).toEqual(String(itemsSize)); }); diff --git a/spec/frontend/boards/components/sidebar/board_editable_item_spec.js b/spec/frontend/boards/components/sidebar/board_editable_item_spec.js index 5e2222ac3d7..6dbeac3864f 100644 --- a/spec/frontend/boards/components/sidebar/board_editable_item_spec.js +++ b/spec/frontend/boards/components/sidebar/board_editable_item_spec.js @@ -21,11 +21,6 @@ describe('boards sidebar remove issue', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('template', () => { it('renders title', () => { const title = 'Sidebar item title'; diff --git a/spec/frontend/boards/components/sidebar/board_sidebar_time_tracker_spec.js b/spec/frontend/boards/components/sidebar/board_sidebar_time_tracker_spec.js index e2e4baefad0..b01ee01120e 100644 --- a/spec/frontend/boards/components/sidebar/board_sidebar_time_tracker_spec.js +++ b/spec/frontend/boards/components/sidebar/board_sidebar_time_tracker_spec.js @@ -37,11 +37,6 @@ describe('BoardSidebarTimeTracker', () => { store.state.activeId = '1'; }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it.each` timeTrackingLimitToHours | canUpdate ${true} | ${false} diff --git a/spec/frontend/boards/components/sidebar/board_sidebar_title_spec.js b/spec/frontend/boards/components/sidebar/board_sidebar_title_spec.js index bc66a0515aa..a20884baf3b 100644 --- a/spec/frontend/boards/components/sidebar/board_sidebar_title_spec.js +++ b/spec/frontend/boards/components/sidebar/board_sidebar_title_spec.js @@ -27,9 +27,7 @@ describe('~/boards/components/sidebar/board_sidebar_title.vue', () => { afterEach(() => { localStorage.clear(); - wrapper.destroy(); store = null; - wrapper = null; }); const createWrapper = (item = TEST_ISSUE_A) => { diff --git a/spec/frontend/boards/components/toggle_focus_spec.js b/spec/frontend/boards/components/toggle_focus_spec.js index a3d58fa05fd..cad287954d7 100644 --- a/spec/frontend/boards/components/toggle_focus_spec.js +++ b/spec/frontend/boards/components/toggle_focus_spec.js @@ -18,10 +18,6 @@ describe('ToggleFocus', () => { const findButton = () => wrapper.findComponent(GlButton); - afterEach(() => { - wrapper.destroy(); - }); - it('renders a button with `maximize` icon', () => { createComponent(); diff --git a/spec/frontend/boards/project_select_spec.js b/spec/frontend/boards/project_select_spec.js index 4324e7068e0..74ce4b6b786 100644 --- a/spec/frontend/boards/project_select_spec.js +++ b/spec/frontend/boards/project_select_spec.js @@ -71,11 +71,6 @@ describe('ProjectSelect component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('displays a header title', () => { createWrapper(); diff --git a/spec/frontend/branches/components/delete_branch_button_spec.js b/spec/frontend/branches/components/delete_branch_button_spec.js index b029f34c3d7..5b2ec443c59 100644 --- a/spec/frontend/branches/components/delete_branch_button_spec.js +++ b/spec/frontend/branches/components/delete_branch_button_spec.js @@ -25,10 +25,6 @@ describe('Delete branch button', () => { eventHubSpy = jest.spyOn(eventHub, '$emit'); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the button with default tooltip, style, and icon', () => { createComponent(); diff --git a/spec/frontend/branches/components/delete_branch_modal_spec.js b/spec/frontend/branches/components/delete_branch_modal_spec.js index c977868ca93..dd5b7fca564 100644 --- a/spec/frontend/branches/components/delete_branch_modal_spec.js +++ b/spec/frontend/branches/components/delete_branch_modal_spec.js @@ -52,10 +52,6 @@ describe('Delete branch modal', () => { const expectedUnmergedWarning = "This branch hasn't been merged into default. To avoid data loss, consider merging this branch before deleting it."; - afterEach(() => { - wrapper.destroy(); - }); - describe('Deleting a regular branch', () => { const expectedTitle = 'Delete branch. Are you ABSOLUTELY SURE?'; const expectedWarning = "You're about to permanently delete the branch test_modal."; diff --git a/spec/frontend/branches/components/delete_merged_branches_spec.js b/spec/frontend/branches/components/delete_merged_branches_spec.js index 274962fd364..75a669c78f2 100644 --- a/spec/frontend/branches/components/delete_merged_branches_spec.js +++ b/spec/frontend/branches/components/delete_merged_branches_spec.js @@ -78,10 +78,6 @@ describe('Delete merged branches component', () => { createComponent(shallowMountExtended, stubsData); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders correct modal title and text', () => { const modalText = findModal().text(); expect(findModal().props('title')).toBe(i18n.modalTitle); diff --git a/spec/frontend/branches/components/divergence_graph_spec.js b/spec/frontend/branches/components/divergence_graph_spec.js index 9429a6e982c..66193c2ebf0 100644 --- a/spec/frontend/branches/components/divergence_graph_spec.js +++ b/spec/frontend/branches/components/divergence_graph_spec.js @@ -9,10 +9,6 @@ function factory(propsData = {}) { } describe('Branch divergence graph component', () => { - afterEach(() => { - vm.destroy(); - }); - it('renders ahead and behind count', () => { factory({ defaultBranch: 'main', diff --git a/spec/frontend/branches/components/graph_bar_spec.js b/spec/frontend/branches/components/graph_bar_spec.js index 61c051b49c6..585b376081b 100644 --- a/spec/frontend/branches/components/graph_bar_spec.js +++ b/spec/frontend/branches/components/graph_bar_spec.js @@ -8,10 +8,6 @@ function factory(propsData = {}) { } describe('Branch divergence graph bar component', () => { - afterEach(() => { - vm.destroy(); - }); - it.each` position | positionClass ${'left'} | ${'position-right-0'} diff --git a/spec/frontend/captcha/captcha_modal_spec.js b/spec/frontend/captcha/captcha_modal_spec.js index 20e69b5a834..efe4293190c 100644 --- a/spec/frontend/captcha/captcha_modal_spec.js +++ b/spec/frontend/captcha/captcha_modal_spec.js @@ -34,11 +34,6 @@ describe('Captcha Modal', () => { initRecaptchaScript.mockResolvedValue(grecaptcha); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findGlModal = () => { const glModal = wrapper.findComponent(GlModal); diff --git a/spec/frontend/ci/ci_lint/components/ci_lint_spec.js b/spec/frontend/ci/ci_lint/components/ci_lint_spec.js index d4f588a0e09..4b7ca36f331 100644 --- a/spec/frontend/ci/ci_lint/components/ci_lint_spec.js +++ b/spec/frontend/ci/ci_lint/components/ci_lint_spec.js @@ -48,7 +48,6 @@ describe('CI Lint', () => { afterEach(() => { mockMutate.mockClear(); - wrapper.destroy(); }); it('displays the editor', () => { diff --git a/spec/frontend/ci/ci_variable_list/components/ci_admin_variables_spec.js b/spec/frontend/ci/ci_variable_list/components/ci_admin_variables_spec.js index 5e0c35c9f90..8e012883f09 100644 --- a/spec/frontend/ci/ci_variable_list/components/ci_admin_variables_spec.js +++ b/spec/frontend/ci/ci_variable_list/components/ci_admin_variables_spec.js @@ -16,10 +16,6 @@ describe('Ci Project Variable wrapper', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('Passes down the correct props to ci_variable_shared', () => { expect(findCiShared().props()).toEqual({ areScopedVariablesAvailable: false, diff --git a/spec/frontend/ci/ci_variable_list/components/ci_environments_dropdown_spec.js b/spec/frontend/ci/ci_variable_list/components/ci_environments_dropdown_spec.js index 2fd395a1230..7181398c2a6 100644 --- a/spec/frontend/ci/ci_variable_list/components/ci_environments_dropdown_spec.js +++ b/spec/frontend/ci/ci_variable_list/components/ci_environments_dropdown_spec.js @@ -27,10 +27,6 @@ describe('Ci environments dropdown', () => { findListbox().vm.$emit('search', searchTerm); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('No environments found', () => { beforeEach(() => { createComponent({ searchTerm: 'stable' }); diff --git a/spec/frontend/ci/ci_variable_list/components/ci_group_variables_spec.js b/spec/frontend/ci/ci_variable_list/components/ci_group_variables_spec.js index c0fb133b9b1..77d90a7667d 100644 --- a/spec/frontend/ci/ci_variable_list/components/ci_group_variables_spec.js +++ b/spec/frontend/ci/ci_variable_list/components/ci_group_variables_spec.js @@ -24,10 +24,6 @@ describe('Ci Group Variable wrapper', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('Props', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/ci/ci_variable_list/components/ci_project_variables_spec.js b/spec/frontend/ci/ci_variable_list/components/ci_project_variables_spec.js index bd1e6b17d6b..ce5237a84f7 100644 --- a/spec/frontend/ci/ci_variable_list/components/ci_project_variables_spec.js +++ b/spec/frontend/ci/ci_variable_list/components/ci_project_variables_spec.js @@ -25,10 +25,6 @@ describe('Ci Project Variable wrapper', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('Passes down the correct props to ci_variable_shared', () => { expect(findCiShared().props()).toEqual({ id: convertToGraphQLId(TYPENAME_PROJECT, mockProvide.projectId), diff --git a/spec/frontend/ci/ci_variable_list/components/ci_variable_modal_spec.js b/spec/frontend/ci/ci_variable_list/components/ci_variable_modal_spec.js index 508af964ca3..8f3fccc2804 100644 --- a/spec/frontend/ci/ci_variable_list/components/ci_variable_modal_spec.js +++ b/spec/frontend/ci/ci_variable_list/components/ci_variable_modal_spec.js @@ -85,10 +85,6 @@ describe('Ci variable modal', () => { const findVariableTypeDropdown = () => wrapper.find('#ci-variable-type'); const findEnvironmentScopeText = () => wrapper.findByText('Environment scope'); - afterEach(() => { - wrapper.destroy(); - }); - describe('Adding a variable', () => { describe('when no key/value pair are present', () => { beforeEach(() => { diff --git a/spec/frontend/ci/ci_variable_list/components/ci_variable_settings_spec.js b/spec/frontend/ci/ci_variable_list/components/ci_variable_settings_spec.js index b4d77edf154..0141232a299 100644 --- a/spec/frontend/ci/ci_variable_list/components/ci_variable_settings_spec.js +++ b/spec/frontend/ci/ci_variable_list/components/ci_variable_settings_spec.js @@ -38,10 +38,6 @@ describe('Ci variable table', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('props passing', () => { it('passes props down correctly to the ci table', () => { createComponent(); diff --git a/spec/frontend/ci/pipeline_editor/components/code_snippet_alert/code_snippet_alert_spec.js b/spec/frontend/ci/pipeline_editor/components/code_snippet_alert/code_snippet_alert_spec.js index b00e1adab63..48a85eba433 100644 --- a/spec/frontend/ci/pipeline_editor/components/code_snippet_alert/code_snippet_alert_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/code_snippet_alert/code_snippet_alert_spec.js @@ -41,10 +41,6 @@ describe('EE - CodeSnippetAlert', () => { createWrapper(); }); - afterEach(() => { - wrapper.destroy(); - }); - it("provides a link to the feature's documentation", () => { const docsLink = findDocsLink(); diff --git a/spec/frontend/ci/pipeline_editor/components/commit/commit_form_spec.js b/spec/frontend/ci/pipeline_editor/components/commit/commit_form_spec.js index 8e1d8081dd8..b2dfa900b1d 100644 --- a/spec/frontend/ci/pipeline_editor/components/commit/commit_form_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/commit/commit_form_spec.js @@ -33,10 +33,6 @@ describe('Pipeline Editor | Commit Form', () => { const findSubmitBtn = () => wrapper.find('[type="submit"]'); const findCancelBtn = () => wrapper.find('[type="reset"]'); - afterEach(() => { - wrapper.destroy(); - }); - describe('when the form is displayed', () => { beforeEach(async () => { createComponent(); diff --git a/spec/frontend/ci/pipeline_editor/components/commit/commit_section_spec.js b/spec/frontend/ci/pipeline_editor/components/commit/commit_section_spec.js index f6e93c55bbb..f8be035d33c 100644 --- a/spec/frontend/ci/pipeline_editor/components/commit/commit_section_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/commit/commit_section_spec.js @@ -113,10 +113,6 @@ describe('Pipeline Editor | Commit section', () => { await waitForPromises(); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when the user commits a new file', () => { beforeEach(async () => { mockMutateCommitData.mockResolvedValue(mockCommitCreateResponse); diff --git a/spec/frontend/ci/pipeline_editor/components/drawer/cards/first_pipeline_card_spec.js b/spec/frontend/ci/pipeline_editor/components/drawer/cards/first_pipeline_card_spec.js index 137137ec657..0ecb77674d5 100644 --- a/spec/frontend/ci/pipeline_editor/components/drawer/cards/first_pipeline_card_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/drawer/cards/first_pipeline_card_spec.js @@ -21,10 +21,6 @@ describe('First pipeline card', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the title', () => { expect(wrapper.text()).toContain(wrapper.vm.$options.i18n.title); }); diff --git a/spec/frontend/ci/pipeline_editor/components/drawer/cards/getting_started_card_spec.js b/spec/frontend/ci/pipeline_editor/components/drawer/cards/getting_started_card_spec.js index cdce757ce7c..417597eaf1f 100644 --- a/spec/frontend/ci/pipeline_editor/components/drawer/cards/getting_started_card_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/drawer/cards/getting_started_card_spec.js @@ -12,10 +12,6 @@ describe('Getting started card', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the title', () => { expect(wrapper.text()).toContain(wrapper.vm.$options.i18n.title); }); diff --git a/spec/frontend/ci/pipeline_editor/components/drawer/cards/pipeline_config_reference_card_spec.js b/spec/frontend/ci/pipeline_editor/components/drawer/cards/pipeline_config_reference_card_spec.js index 6909916c3e6..5399924b462 100644 --- a/spec/frontend/ci/pipeline_editor/components/drawer/cards/pipeline_config_reference_card_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/drawer/cards/pipeline_config_reference_card_spec.js @@ -33,10 +33,6 @@ describe('Pipeline config reference card', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the title', () => { expect(wrapper.text()).toContain(wrapper.vm.$options.i18n.title); }); diff --git a/spec/frontend/ci/pipeline_editor/components/drawer/cards/visualize_and_lint_card_spec.js b/spec/frontend/ci/pipeline_editor/components/drawer/cards/visualize_and_lint_card_spec.js index 0c6879020de..547ba3cbd8b 100644 --- a/spec/frontend/ci/pipeline_editor/components/drawer/cards/visualize_and_lint_card_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/drawer/cards/visualize_and_lint_card_spec.js @@ -12,10 +12,6 @@ describe('Visual and Lint card', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the title', () => { expect(wrapper.text()).toContain(wrapper.vm.$options.i18n.title); }); diff --git a/spec/frontend/ci/pipeline_editor/components/drawer/pipeline_editor_drawer_spec.js b/spec/frontend/ci/pipeline_editor/components/drawer/pipeline_editor_drawer_spec.js index 42e372cc1db..b07d63dd5d9 100644 --- a/spec/frontend/ci/pipeline_editor/components/drawer/pipeline_editor_drawer_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/drawer/pipeline_editor_drawer_spec.js @@ -11,10 +11,6 @@ describe('Pipeline editor drawer', () => { wrapper = shallowMount(PipelineEditorDrawer); }; - afterEach(() => { - wrapper.destroy(); - }); - it('emits close event when closing the drawer', () => { createComponent(); diff --git a/spec/frontend/ci/pipeline_editor/components/drawer/ui/demo_job_pill_spec.js b/spec/frontend/ci/pipeline_editor/components/drawer/ui/demo_job_pill_spec.js index f510c61ee74..b0c889cfc9f 100644 --- a/spec/frontend/ci/pipeline_editor/components/drawer/ui/demo_job_pill_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/drawer/ui/demo_job_pill_spec.js @@ -17,10 +17,6 @@ describe('Demo job pill', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the jobName', () => { expect(wrapper.text()).toContain(jobName); }); diff --git a/spec/frontend/ci/pipeline_editor/components/editor/ci_config_merged_preview_spec.js b/spec/frontend/ci/pipeline_editor/components/editor/ci_config_merged_preview_spec.js index 2a2bc2547cc..2182b6e9cc6 100644 --- a/spec/frontend/ci/pipeline_editor/components/editor/ci_config_merged_preview_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/editor/ci_config_merged_preview_spec.js @@ -34,10 +34,6 @@ describe('Text editor component', () => { const findIcon = () => wrapper.findComponent(GlIcon); const findEditor = () => wrapper.findComponent(MockSourceEditor); - afterEach(() => { - wrapper.destroy(); - }); - describe('when status is valid', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/ci/pipeline_editor/components/editor/ci_editor_header_spec.js b/spec/frontend/ci/pipeline_editor/components/editor/ci_editor_header_spec.js index dc72694d26f..560e8840d57 100644 --- a/spec/frontend/ci/pipeline_editor/components/editor/ci_editor_header_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/editor/ci_editor_header_spec.js @@ -26,7 +26,6 @@ describe('CI Editor Header', () => { const findHelpBtn = () => wrapper.findByTestId('drawer-toggle'); afterEach(() => { - wrapper.destroy(); unmockTracking(); }); diff --git a/spec/frontend/ci/pipeline_editor/components/editor/text_editor_spec.js b/spec/frontend/ci/pipeline_editor/components/editor/text_editor_spec.js index ec987be8cb8..4b185a545b0 100644 --- a/spec/frontend/ci/pipeline_editor/components/editor/text_editor_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/editor/text_editor_spec.js @@ -67,8 +67,6 @@ describe('Pipeline Editor | Text editor component', () => { }); afterEach(() => { - wrapper.destroy(); - mockUse.mockClear(); mockRegisterCiSchema.mockClear(); }); diff --git a/spec/frontend/ci/pipeline_editor/components/file-nav/branch_switcher_spec.js b/spec/frontend/ci/pipeline_editor/components/file-nav/branch_switcher_spec.js index a26232df58f..bf14f4c4cd6 100644 --- a/spec/frontend/ci/pipeline_editor/components/file-nav/branch_switcher_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/file-nav/branch_switcher_spec.js @@ -133,10 +133,6 @@ describe('Pipeline editor branch switcher', () => { mockAvailableBranchQuery = jest.fn(); }); - afterEach(() => { - wrapper.destroy(); - }); - const testErrorHandling = () => { expect(wrapper.emitted('showError')).toBeDefined(); expect(wrapper.emitted('showError')[0]).toEqual([ diff --git a/spec/frontend/ci/pipeline_editor/components/file-nav/pipeline_editor_file_nav_spec.js b/spec/frontend/ci/pipeline_editor/components/file-nav/pipeline_editor_file_nav_spec.js index 907db16913c..19c113689c2 100644 --- a/spec/frontend/ci/pipeline_editor/components/file-nav/pipeline_editor_file_nav_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/file-nav/pipeline_editor_file_nav_spec.js @@ -48,10 +48,6 @@ describe('Pipeline editor file nav', () => { const findFileTreeBtn = () => wrapper.findByTestId('file-tree-toggle'); const findPopoverContainer = () => wrapper.findComponent(FileTreePopover); - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/ci/pipeline_editor/components/file-tree/container_spec.js b/spec/frontend/ci/pipeline_editor/components/file-tree/container_spec.js index e030412f2f5..306dd78d395 100644 --- a/spec/frontend/ci/pipeline_editor/components/file-tree/container_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/file-tree/container_spec.js @@ -35,7 +35,6 @@ describe('Pipeline editor file nav', () => { afterEach(() => { localStorage.clear(); - wrapper.destroy(); }); describe('template', () => { diff --git a/spec/frontend/ci/pipeline_editor/components/file-tree/file_item_spec.js b/spec/frontend/ci/pipeline_editor/components/file-tree/file_item_spec.js index bceb741f91c..80737e9a8ab 100644 --- a/spec/frontend/ci/pipeline_editor/components/file-tree/file_item_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/file-tree/file_item_spec.js @@ -18,10 +18,6 @@ describe('Pipeline editor file nav', () => { const fileIcon = () => wrapper.findComponent(FileIcon); const link = () => wrapper.findComponent(GlLink); - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/ci/pipeline_editor/components/header/pipeline_editor_header_spec.js b/spec/frontend/ci/pipeline_editor/components/header/pipeline_editor_header_spec.js index 555b9f29fbf..a651664851e 100644 --- a/spec/frontend/ci/pipeline_editor/components/header/pipeline_editor_header_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/header/pipeline_editor_header_spec.js @@ -26,11 +26,6 @@ describe('Pipeline editor header', () => { const findPipelineStatus = () => wrapper.findComponent(PipelineStatus); const findValidationSegment = () => wrapper.findComponent(ValidationSegment); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('template', () => { it('hides the pipeline status for new projects without a CI file', () => { createComponent({ props: { isNewCiConfigFile: true } }); diff --git a/spec/frontend/ci/pipeline_editor/components/header/pipeline_status_spec.js b/spec/frontend/ci/pipeline_editor/components/header/pipeline_status_spec.js index a62c51ffb59..3faa2890254 100644 --- a/spec/frontend/ci/pipeline_editor/components/header/pipeline_status_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/header/pipeline_status_spec.js @@ -48,7 +48,6 @@ describe('Pipeline Status', () => { afterEach(() => { mockPipelineQuery.mockReset(); - wrapper.destroy(); }); describe('loading icon', () => { diff --git a/spec/frontend/ci/pipeline_editor/components/lint/ci_lint_results_spec.js b/spec/frontend/ci/pipeline_editor/components/lint/ci_lint_results_spec.js index d43bdec3a33..cc9a77ae525 100644 --- a/spec/frontend/ci/pipeline_editor/components/lint/ci_lint_results_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/lint/ci_lint_results_spec.js @@ -40,10 +40,6 @@ describe('CI Lint Results', () => { const findAfterScripts = findAllByTestId('after-script'); const filterEmptyScripts = (property) => mockJobs.filter((job) => job[property].length !== 0); - afterEach(() => { - wrapper.destroy(); - }); - describe('Empty results', () => { it('renders with no jobs, errors or warnings defined', () => { createComponent({ jobs: undefined, errors: undefined, warnings: undefined }, shallowMount); diff --git a/spec/frontend/ci/pipeline_editor/components/lint/ci_lint_warnings_spec.js b/spec/frontend/ci/pipeline_editor/components/lint/ci_lint_warnings_spec.js index b5e3ea06c2c..d09e22898cd 100644 --- a/spec/frontend/ci/pipeline_editor/components/lint/ci_lint_warnings_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/lint/ci_lint_warnings_spec.js @@ -21,11 +21,6 @@ describe('CI lint warnings', () => { const findWarnings = () => wrapper.findAll('[data-testid="ci-lint-warning"]'); const findWarningMessage = () => trimText(wrapper.findComponent(GlSprintf).text()); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('displays the warning alert', () => { createComponent(); diff --git a/spec/frontend/ci/pipeline_editor/components/pipeline_editor_tabs_spec.js b/spec/frontend/ci/pipeline_editor/components/pipeline_editor_tabs_spec.js index f40db50aab7..52a543c7686 100644 --- a/spec/frontend/ci/pipeline_editor/components/pipeline_editor_tabs_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/pipeline_editor_tabs_spec.js @@ -119,6 +119,7 @@ describe('Pipeline editor tabs component', () => { }); afterEach(() => { + // eslint-disable-next-line @gitlab/vtu-no-explicit-wrapper-destroy wrapper.destroy(); }); diff --git a/spec/frontend/ci/pipeline_editor/components/popovers/file_tree_popover_spec.js b/spec/frontend/ci/pipeline_editor/components/popovers/file_tree_popover_spec.js index 63ebfc0559d..a9aabb103f2 100644 --- a/spec/frontend/ci/pipeline_editor/components/popovers/file_tree_popover_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/popovers/file_tree_popover_spec.js @@ -22,7 +22,6 @@ describe('FileTreePopover component', () => { afterEach(() => { localStorage.clear(); - wrapper.destroy(); }); describe('default', () => { diff --git a/spec/frontend/ci/pipeline_editor/components/popovers/validate_pipeline_popover_spec.js b/spec/frontend/ci/pipeline_editor/components/popovers/validate_pipeline_popover_spec.js index cf0b974081e..23f9c7a87ee 100644 --- a/spec/frontend/ci/pipeline_editor/components/popovers/validate_pipeline_popover_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/popovers/validate_pipeline_popover_spec.js @@ -19,10 +19,6 @@ describe('ValidatePopover component', () => { const findHelpLink = () => wrapper.findByTestId('help-link'); const findFeedbackLink = () => wrapper.findByTestId('feedback-link'); - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { beforeEach(async () => { createComponent({ diff --git a/spec/frontend/ci/pipeline_editor/components/popovers/walkthrough_popover_spec.js b/spec/frontend/ci/pipeline_editor/components/popovers/walkthrough_popover_spec.js index ca6033f2ff5..186fd803d47 100644 --- a/spec/frontend/ci/pipeline_editor/components/popovers/walkthrough_popover_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/popovers/walkthrough_popover_spec.js @@ -12,10 +12,6 @@ describe('WalkthroughPopover component', () => { return extendedWrapper(mountFn(WalkthroughPopover)); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('CTA button clicked', () => { beforeEach(async () => { wrapper = createComponent(mount); diff --git a/spec/frontend/ci/pipeline_editor/components/ui/confirm_unsaved_changes_dialog_spec.js b/spec/frontend/ci/pipeline_editor/components/ui/confirm_unsaved_changes_dialog_spec.js index b22c98e5544..8b8dd4d22c2 100644 --- a/spec/frontend/ci/pipeline_editor/components/ui/confirm_unsaved_changes_dialog_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/ui/confirm_unsaved_changes_dialog_spec.js @@ -4,10 +4,9 @@ import ConfirmDialog from '~/ci/pipeline_editor/components/ui/confirm_unsaved_ch describe('pipeline_editor/components/ui/confirm_unsaved_changes_dialog', () => { let beforeUnloadEvent; let setDialogContent; - let wrapper; const createComponent = (propsData = {}) => { - wrapper = shallowMount(ConfirmDialog, { + shallowMount(ConfirmDialog, { propsData, }); }; @@ -21,7 +20,6 @@ describe('pipeline_editor/components/ui/confirm_unsaved_changes_dialog', () => { afterEach(() => { beforeUnloadEvent.preventDefault.mockRestore(); setDialogContent.mockRestore(); - wrapper.destroy(); }); it('shows confirmation dialog when there are unsaved changes', () => { diff --git a/spec/frontend/ci/pipeline_editor/components/ui/pipeline_editor_empty_state_spec.js b/spec/frontend/ci/pipeline_editor/components/ui/pipeline_editor_empty_state_spec.js index 3c68f74af43..e636a89c6d9 100644 --- a/spec/frontend/ci/pipeline_editor/components/ui/pipeline_editor_empty_state_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/ui/pipeline_editor_empty_state_spec.js @@ -23,10 +23,6 @@ describe('Pipeline editor empty state', () => { const findConfirmButton = () => wrapper.findComponent(GlButton); const findDescription = () => wrapper.findComponent(GlSprintf); - afterEach(() => { - wrapper.destroy(); - }); - describe('when project uses an external CI config', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/ci/pipeline_editor/components/validate/ci_validate_spec.js b/spec/frontend/ci/pipeline_editor/components/validate/ci_validate_spec.js index ae25142b455..8874add6bb2 100644 --- a/spec/frontend/ci/pipeline_editor/components/validate/ci_validate_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/validate/ci_validate_spec.js @@ -99,10 +99,6 @@ describe('Pipeline Editor Validate Tab', () => { mockBlobContentData = jest.fn(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('while initial CI content is loading', () => { beforeEach(() => { createComponent({ isBlobLoading: true }); diff --git a/spec/frontend/ci/pipeline_editor/pipeline_editor_app_spec.js b/spec/frontend/ci/pipeline_editor/pipeline_editor_app_spec.js index eadf1f0a404..7a13bfbd1ab 100644 --- a/spec/frontend/ci/pipeline_editor/pipeline_editor_app_spec.js +++ b/spec/frontend/ci/pipeline_editor/pipeline_editor_app_spec.js @@ -165,10 +165,6 @@ describe('Pipeline editor app component', () => { mockPipelineQuery = jest.fn(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('loading state', () => { it('displays a loading icon if the blob query is loading', () => { createComponent({ blobLoading: true }); diff --git a/spec/frontend/ci/pipeline_editor/pipeline_editor_home_spec.js b/spec/frontend/ci/pipeline_editor/pipeline_editor_home_spec.js index 4f8f2112abe..7ec6d4c6a01 100644 --- a/spec/frontend/ci/pipeline_editor/pipeline_editor_home_spec.js +++ b/spec/frontend/ci/pipeline_editor/pipeline_editor_home_spec.js @@ -67,7 +67,6 @@ describe('Pipeline editor home wrapper', () => { afterEach(() => { localStorage.clear(); - wrapper.destroy(); }); describe('renders', () => { diff --git a/spec/frontend/ci/pipeline_new/components/pipeline_new_form_spec.js b/spec/frontend/ci/pipeline_new/components/pipeline_new_form_spec.js index bd1158a1c32..1349461d8bc 100644 --- a/spec/frontend/ci/pipeline_new/components/pipeline_new_form_spec.js +++ b/spec/frontend/ci/pipeline_new/components/pipeline_new_form_spec.js @@ -133,7 +133,6 @@ describe('Pipeline New Form', () => { afterEach(() => { mock.restore(); - wrapper.destroy(); }); describe('Form', () => { diff --git a/spec/frontend/ci/pipeline_schedules/components/delete_pipeline_schedule_modal_spec.js b/spec/frontend/ci/pipeline_schedules/components/delete_pipeline_schedule_modal_spec.js index ba948f12b33..c45267e5a47 100644 --- a/spec/frontend/ci/pipeline_schedules/components/delete_pipeline_schedule_modal_spec.js +++ b/spec/frontend/ci/pipeline_schedules/components/delete_pipeline_schedule_modal_spec.js @@ -20,10 +20,6 @@ describe('Delete pipeline schedule modal', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('emits the deleteSchedule event', async () => { findModal().vm.$emit('primary'); diff --git a/spec/frontend/ci/pipeline_schedules/components/pipeline_schedules_spec.js b/spec/frontend/ci/pipeline_schedules/components/pipeline_schedules_spec.js index 97d8f420bbf..50008cedd9c 100644 --- a/spec/frontend/ci/pipeline_schedules/components/pipeline_schedules_spec.js +++ b/spec/frontend/ci/pipeline_schedules/components/pipeline_schedules_spec.js @@ -80,10 +80,6 @@ describe('Pipeline schedules app', () => { const findSchedulesCharacteristics = () => wrapper.findByTestId('pipeline-schedules-characteristics'); - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_actions_spec.js b/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_actions_spec.js index 82ced866983..be0052fc7cf 100644 --- a/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_actions_spec.js +++ b/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_actions_spec.js @@ -29,10 +29,6 @@ describe('Pipeline schedule actions', () => { const findTakeOwnershipBtn = () => wrapper.findByTestId('take-ownership-pipeline-schedule-btn'); const findPlayScheduleBtn = () => wrapper.findByTestId('play-pipeline-schedule-btn'); - afterEach(() => { - wrapper.destroy(); - }); - it('displays buttons when user is the owner of schedule and has adminPipelineSchedule permissions', () => { createComponent(); diff --git a/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_last_pipeline_spec.js b/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_last_pipeline_spec.js index 0821c59c8a0..ae069145292 100644 --- a/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_last_pipeline_spec.js +++ b/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_last_pipeline_spec.js @@ -21,10 +21,6 @@ describe('Pipeline schedule last pipeline', () => { const findCIBadgeLink = () => wrapper.findComponent(CiBadgeLink); const findStatusText = () => wrapper.findByTestId('pipeline-schedule-status-text'); - afterEach(() => { - wrapper.destroy(); - }); - it('displays pipeline status', () => { createComponent(); diff --git a/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_next_run_spec.js b/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_next_run_spec.js index 1c06c411097..3bdbb371ddc 100644 --- a/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_next_run_spec.js +++ b/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_next_run_spec.js @@ -21,10 +21,6 @@ describe('Pipeline schedule next run', () => { const findTimeAgo = () => wrapper.findComponent(TimeAgoTooltip); const findInactive = () => wrapper.findByTestId('pipeline-schedule-inactive'); - afterEach(() => { - wrapper.destroy(); - }); - it('displays time ago', () => { createComponent(); diff --git a/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_owner_spec.js b/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_owner_spec.js index 6c1991cb4ac..849bef80f42 100644 --- a/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_owner_spec.js +++ b/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_owner_spec.js @@ -25,10 +25,6 @@ describe('Pipeline schedule owner', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('displays avatar', () => { expect(findAvatar().exists()).toBe(true); expect(findAvatar().props('src')).toBe(defaultProps.schedule.owner.avatarUrl); diff --git a/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_target_spec.js b/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_target_spec.js index f531f04a736..5cc3829efbd 100644 --- a/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_target_spec.js +++ b/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_target_spec.js @@ -25,10 +25,6 @@ describe('Pipeline schedule target', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('displays icon', () => { expect(findIcon().exists()).toBe(true); expect(findIcon().props('name')).toBe('fork'); diff --git a/spec/frontend/ci/pipeline_schedules/components/table/pipeline_schedules_table_spec.js b/spec/frontend/ci/pipeline_schedules/components/table/pipeline_schedules_table_spec.js index c777c4bc9cb..e488a36f3dc 100644 --- a/spec/frontend/ci/pipeline_schedules/components/table/pipeline_schedules_table_spec.js +++ b/spec/frontend/ci/pipeline_schedules/components/table/pipeline_schedules_table_spec.js @@ -26,10 +26,6 @@ describe('Pipeline schedules table', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('displays table', () => { expect(findTable().exists()).toBe(true); }); diff --git a/spec/frontend/ci/reports/codequality_report/components/codequality_issue_body_spec.js b/spec/frontend/ci/reports/codequality_report/components/codequality_issue_body_spec.js index 90ca2a07266..f7386cfec74 100644 --- a/spec/frontend/ci/reports/codequality_report/components/codequality_issue_body_spec.js +++ b/spec/frontend/ci/reports/codequality_report/components/codequality_issue_body_spec.js @@ -30,11 +30,6 @@ describe('code quality issue body issue body', () => { ); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('severity rating', () => { it.each` severity | iconClass | iconName diff --git a/spec/frontend/ci/reports/components/grouped_issues_list_spec.js b/spec/frontend/ci/reports/components/grouped_issues_list_spec.js index 3e4adfc7794..8beec220802 100644 --- a/spec/frontend/ci/reports/components/grouped_issues_list_spec.js +++ b/spec/frontend/ci/reports/components/grouped_issues_list_spec.js @@ -15,10 +15,6 @@ describe('Grouped Issues List', () => { const findHeading = (groupName) => wrapper.find(`[data-testid="${groupName}Heading"`); - afterEach(() => { - wrapper.destroy(); - }); - it('renders a smart virtual list with the correct props', () => { createComponent({ propsData: { diff --git a/spec/frontend/ci/reports/components/issue_status_icon_spec.js b/spec/frontend/ci/reports/components/issue_status_icon_spec.js index fb13d4407e2..82b655dd598 100644 --- a/spec/frontend/ci/reports/components/issue_status_icon_spec.js +++ b/spec/frontend/ci/reports/components/issue_status_icon_spec.js @@ -13,11 +13,6 @@ describe('IssueStatusIcon', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it.each([STATUS_SUCCESS, STATUS_NEUTRAL, STATUS_FAILED])( 'renders "%s" state correctly', (status) => { diff --git a/spec/frontend/ci/reports/components/report_link_spec.js b/spec/frontend/ci/reports/components/report_link_spec.js index ba541ba0303..4a97afd77df 100644 --- a/spec/frontend/ci/reports/components/report_link_spec.js +++ b/spec/frontend/ci/reports/components/report_link_spec.js @@ -4,10 +4,6 @@ import ReportLink from '~/ci/reports/components/report_link.vue'; describe('app/assets/javascripts/ci/reports/components/report_link.vue', () => { let wrapper; - afterEach(() => { - wrapper.destroy(); - }); - const defaultProps = { issue: {}, }; diff --git a/spec/frontend/ci/reports/components/report_section_spec.js b/spec/frontend/ci/reports/components/report_section_spec.js index f032b210184..f4012fe0215 100644 --- a/spec/frontend/ci/reports/components/report_section_spec.js +++ b/spec/frontend/ci/reports/components/report_section_spec.js @@ -49,10 +49,6 @@ describe('ReportSection component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('computed', () => { describe('isCollapsible', () => { const testMatrix = [ diff --git a/spec/frontend/ci/reports/components/summary_row_spec.js b/spec/frontend/ci/reports/components/summary_row_spec.js index fb2ae5371d5..b1ae9e26b5b 100644 --- a/spec/frontend/ci/reports/components/summary_row_spec.js +++ b/spec/frontend/ci/reports/components/summary_row_spec.js @@ -31,11 +31,6 @@ describe('Summary row', () => { const findStatusIcon = () => wrapper.findByTestId('summary-row-icon'); const findHelpPopover = () => wrapper.findComponent(HelpPopover); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders provided summary', () => { createComponent(); expect(findSummary().text()).toContain(summary); diff --git a/spec/frontend/ci/runner/admin_runner_show/admin_runner_show_app_spec.js b/spec/frontend/ci/runner/admin_runner_show/admin_runner_show_app_spec.js index 257c264aac1..9d9142f2c68 100644 --- a/spec/frontend/ci/runner/admin_runner_show/admin_runner_show_app_spec.js +++ b/spec/frontend/ci/runner/admin_runner_show/admin_runner_show_app_spec.js @@ -72,7 +72,6 @@ describe('AdminRunnerShowApp', () => { afterEach(() => { mockRunnerQuery.mockReset(); - wrapper.destroy(); }); describe('When showing runner details', () => { diff --git a/spec/frontend/ci/runner/admin_runners/admin_runners_app_spec.js b/spec/frontend/ci/runner/admin_runners/admin_runners_app_spec.js index 39ec24f38d5..0cf6241c24f 100644 --- a/spec/frontend/ci/runner/admin_runners/admin_runners_app_spec.js +++ b/spec/frontend/ci/runner/admin_runners/admin_runners_app_spec.js @@ -143,7 +143,6 @@ describe('AdminRunnersApp', () => { mockRunnersHandler.mockReset(); mockRunnersCountHandler.mockReset(); showToast.mockReset(); - wrapper.destroy(); }); it('shows the runner setup instructions', () => { diff --git a/spec/frontend/ci/runner/components/cells/runner_actions_cell_spec.js b/spec/frontend/ci/runner/components/cells/runner_actions_cell_spec.js index 82e262d1b73..8ac0c5a61f8 100644 --- a/spec/frontend/ci/runner/components/cells/runner_actions_cell_spec.js +++ b/spec/frontend/ci/runner/components/cells/runner_actions_cell_spec.js @@ -31,10 +31,6 @@ describe('RunnerActionsCell', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('Edit Action', () => { it('Displays the runner edit link with the correct href', () => { createComponent(); diff --git a/spec/frontend/ci/runner/components/cells/runner_owner_cell_spec.js b/spec/frontend/ci/runner/components/cells/runner_owner_cell_spec.js index 588d438b484..03f1ace3897 100644 --- a/spec/frontend/ci/runner/components/cells/runner_owner_cell_spec.js +++ b/spec/frontend/ci/runner/components/cells/runner_owner_cell_spec.js @@ -24,10 +24,6 @@ describe('RunnerOwnerCell', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('When its an instance runner', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/ci/runner/components/cells/runner_status_cell_spec.js b/spec/frontend/ci/runner/components/cells/runner_status_cell_spec.js index 1ff60ff1a9d..ec23d8415e8 100644 --- a/spec/frontend/ci/runner/components/cells/runner_status_cell_spec.js +++ b/spec/frontend/ci/runner/components/cells/runner_status_cell_spec.js @@ -34,10 +34,6 @@ describe('RunnerStatusCell', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('Displays online status', () => { createComponent(); diff --git a/spec/frontend/ci/runner/components/cells/runner_summary_cell_spec.js b/spec/frontend/ci/runner/components/cells/runner_summary_cell_spec.js index 1711df42491..585a03c0811 100644 --- a/spec/frontend/ci/runner/components/cells/runner_summary_cell_spec.js +++ b/spec/frontend/ci/runner/components/cells/runner_summary_cell_spec.js @@ -45,10 +45,6 @@ describe('RunnerTypeCell', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('Displays the runner name as id and short token', () => { expect(wrapper.text()).toContain( `#${getIdFromGraphQLId(mockRunner.id)} (${mockRunner.shortSha})`, diff --git a/spec/frontend/ci/runner/components/cells/runner_summary_field_spec.js b/spec/frontend/ci/runner/components/cells/runner_summary_field_spec.js index a5047e51f9f..7748890cf77 100644 --- a/spec/frontend/ci/runner/components/cells/runner_summary_field_spec.js +++ b/spec/frontend/ci/runner/components/cells/runner_summary_field_spec.js @@ -23,10 +23,6 @@ describe('RunnerSummaryField', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('shows content in slot', () => { createComponent({ slots: { default: 'content' }, diff --git a/spec/frontend/ci/runner/components/registration/registration_dropdown_spec.js b/spec/frontend/ci/runner/components/registration/registration_dropdown_spec.js index 0daaca9c4ff..9ed59b0a57d 100644 --- a/spec/frontend/ci/runner/components/registration/registration_dropdown_spec.js +++ b/spec/frontend/ci/runner/components/registration/registration_dropdown_spec.js @@ -116,10 +116,6 @@ describe('RegistrationDropdown', () => { await openModal(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('opens the modal with contents', () => { const modalText = findModalContent(); diff --git a/spec/frontend/ci/runner/components/registration/registration_token_reset_dropdown_item_spec.js b/spec/frontend/ci/runner/components/registration/registration_token_reset_dropdown_item_spec.js index f9e553c1a6e..ff69fd6d3d6 100644 --- a/spec/frontend/ci/runner/components/registration/registration_token_reset_dropdown_item_spec.js +++ b/spec/frontend/ci/runner/components/registration/registration_token_reset_dropdown_item_spec.js @@ -63,10 +63,6 @@ describe('RegistrationTokenResetDropdownItem', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('Displays reset button', () => { expect(findDropdownItem().exists()).toBe(true); }); diff --git a/spec/frontend/ci/runner/components/registration/registration_token_spec.js b/spec/frontend/ci/runner/components/registration/registration_token_spec.js index d2a51c0d910..4f44e6e10b2 100644 --- a/spec/frontend/ci/runner/components/registration/registration_token_spec.js +++ b/spec/frontend/ci/runner/components/registration/registration_token_spec.js @@ -27,10 +27,6 @@ describe('RegistrationToken', () => { showToast = wrapper.vm.$toast ? jest.spyOn(wrapper.vm.$toast, 'show') : null; }; - afterEach(() => { - wrapper.destroy(); - }); - it('Displays value and copy button', () => { createComponent(); diff --git a/spec/frontend/ci/runner/components/runner_assigned_item_spec.js b/spec/frontend/ci/runner/components/runner_assigned_item_spec.js index 5df2e04c340..a1fd9e4c1aa 100644 --- a/spec/frontend/ci/runner/components/runner_assigned_item_spec.js +++ b/spec/frontend/ci/runner/components/runner_assigned_item_spec.js @@ -33,10 +33,6 @@ describe('RunnerAssignedItem', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('Shows an avatar', () => { const avatar = findAvatar(); diff --git a/spec/frontend/ci/runner/components/runner_delete_button_spec.js b/spec/frontend/ci/runner/components/runner_delete_button_spec.js index 3cb664f92ae..f9bea318d84 100644 --- a/spec/frontend/ci/runner/components/runner_delete_button_spec.js +++ b/spec/frontend/ci/runner/components/runner_delete_button_spec.js @@ -83,10 +83,6 @@ describe('RunnerDeleteButton', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('Displays a delete button without an icon', () => { expect(findBtn().props()).toMatchObject({ loading: false, diff --git a/spec/frontend/ci/runner/components/runner_details_spec.js b/spec/frontend/ci/runner/components/runner_details_spec.js index 65a81973869..c2d9e86aa91 100644 --- a/spec/frontend/ci/runner/components/runner_details_spec.js +++ b/spec/frontend/ci/runner/components/runner_details_spec.js @@ -37,10 +37,6 @@ describe('RunnerDetails', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('Details tab', () => { describe.each` field | runner | expectedValue diff --git a/spec/frontend/ci/runner/components/runner_edit_button_spec.js b/spec/frontend/ci/runner/components/runner_edit_button_spec.js index 16586dc46d5..5cc1ee049f4 100644 --- a/spec/frontend/ci/runner/components/runner_edit_button_spec.js +++ b/spec/frontend/ci/runner/components/runner_edit_button_spec.js @@ -20,10 +20,6 @@ describe('RunnerEditButton', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('Displays Edit text', () => { expect(wrapper.attributes('aria-label')).toBe('Edit'); }); diff --git a/spec/frontend/ci/runner/components/runner_filtered_search_bar_spec.js b/spec/frontend/ci/runner/components/runner_filtered_search_bar_spec.js index 408750e646f..ac84c7898bf 100644 --- a/spec/frontend/ci/runner/components/runner_filtered_search_bar_spec.js +++ b/spec/frontend/ci/runner/components/runner_filtered_search_bar_spec.js @@ -65,10 +65,6 @@ describe('RunnerList', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('binds a namespace to the filtered search', () => { expect(findFilteredSearch().props('namespace')).toBe('runners'); }); diff --git a/spec/frontend/ci/runner/components/runner_groups_spec.js b/spec/frontend/ci/runner/components/runner_groups_spec.js index 0991feb2e55..e4f5f55ab4b 100644 --- a/spec/frontend/ci/runner/components/runner_groups_spec.js +++ b/spec/frontend/ci/runner/components/runner_groups_spec.js @@ -23,10 +23,6 @@ describe('RunnerGroups', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('Shows a heading', () => { createComponent(); diff --git a/spec/frontend/ci/runner/components/runner_header_spec.js b/spec/frontend/ci/runner/components/runner_header_spec.js index abe3b47767e..c851966431d 100644 --- a/spec/frontend/ci/runner/components/runner_header_spec.js +++ b/spec/frontend/ci/runner/components/runner_header_spec.js @@ -42,10 +42,6 @@ describe('RunnerHeader', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('displays the runner status', () => { createComponent({ mountFn: mountExtended, diff --git a/spec/frontend/ci/runner/components/runner_jobs_spec.js b/spec/frontend/ci/runner/components/runner_jobs_spec.js index b830774a967..365b0f1f5ba 100644 --- a/spec/frontend/ci/runner/components/runner_jobs_spec.js +++ b/spec/frontend/ci/runner/components/runner_jobs_spec.js @@ -47,7 +47,6 @@ describe('RunnerJobs', () => { afterEach(() => { mockRunnerJobsQuery.mockReset(); - wrapper.destroy(); }); it('Requests runner jobs', async () => { diff --git a/spec/frontend/ci/runner/components/runner_jobs_table_spec.js b/spec/frontend/ci/runner/components/runner_jobs_table_spec.js index 281aa1aeb77..694c5a6ed17 100644 --- a/spec/frontend/ci/runner/components/runner_jobs_table_spec.js +++ b/spec/frontend/ci/runner/components/runner_jobs_table_spec.js @@ -37,10 +37,6 @@ describe('RunnerJobsTable', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('Sets job id as a row key', () => { createComponent(); diff --git a/spec/frontend/ci/runner/components/runner_list_spec.js b/spec/frontend/ci/runner/components/runner_list_spec.js index 2e5d1dbd063..6f4913dca3e 100644 --- a/spec/frontend/ci/runner/components/runner_list_spec.js +++ b/spec/frontend/ci/runner/components/runner_list_spec.js @@ -57,10 +57,6 @@ describe('RunnerList', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('Displays headers', () => { createComponent( { diff --git a/spec/frontend/ci/runner/components/runner_membership_toggle_spec.js b/spec/frontend/ci/runner/components/runner_membership_toggle_spec.js index f089becd400..7ff3ec92042 100644 --- a/spec/frontend/ci/runner/components/runner_membership_toggle_spec.js +++ b/spec/frontend/ci/runner/components/runner_membership_toggle_spec.js @@ -18,10 +18,6 @@ describe('RunnerMembershipToggle', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('Displays text', () => { createComponent({ mountFn: mount }); diff --git a/spec/frontend/ci/runner/components/runner_pagination_spec.js b/spec/frontend/ci/runner/components/runner_pagination_spec.js index f835ee4514d..6d84eb810f8 100644 --- a/spec/frontend/ci/runner/components/runner_pagination_spec.js +++ b/spec/frontend/ci/runner/components/runner_pagination_spec.js @@ -16,10 +16,6 @@ describe('RunnerPagination', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('When in between pages', () => { const mockPageInfo = { startCursor: mockStartCursor, diff --git a/spec/frontend/ci/runner/components/runner_pause_button_spec.js b/spec/frontend/ci/runner/components/runner_pause_button_spec.js index 14d6881dd48..62e6cc902b7 100644 --- a/spec/frontend/ci/runner/components/runner_pause_button_spec.js +++ b/spec/frontend/ci/runner/components/runner_pause_button_spec.js @@ -74,10 +74,6 @@ describe('RunnerPauseButton', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('Pause/Resume action', () => { describe.each` runnerState | icon | content | tooltip | isActive | newActiveValue diff --git a/spec/frontend/ci/runner/components/runner_paused_badge_spec.js b/spec/frontend/ci/runner/components/runner_paused_badge_spec.js index 879597ce44d..54768ea50da 100644 --- a/spec/frontend/ci/runner/components/runner_paused_badge_spec.js +++ b/spec/frontend/ci/runner/components/runner_paused_badge_spec.js @@ -25,10 +25,6 @@ describe('RunnerTypeBadge', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders paused state', () => { expect(wrapper.text()).toBe(I18N_PAUSED); expect(findBadge().props('variant')).toBe('warning'); diff --git a/spec/frontend/ci/runner/components/runner_projects_spec.js b/spec/frontend/ci/runner/components/runner_projects_spec.js index e24084b8836..ccc1bc18675 100644 --- a/spec/frontend/ci/runner/components/runner_projects_spec.js +++ b/spec/frontend/ci/runner/components/runner_projects_spec.js @@ -56,7 +56,6 @@ describe('RunnerProjects', () => { afterEach(() => { mockRunnerProjectsQuery.mockReset(); - wrapper.destroy(); }); it('Requests runner projects', async () => { diff --git a/spec/frontend/ci/runner/components/runner_status_badge_spec.js b/spec/frontend/ci/runner/components/runner_status_badge_spec.js index 8cde6369d48..e1eb81f2d23 100644 --- a/spec/frontend/ci/runner/components/runner_status_badge_spec.js +++ b/spec/frontend/ci/runner/components/runner_status_badge_spec.js @@ -43,8 +43,6 @@ describe('RunnerTypeBadge', () => { afterEach(() => { jest.useFakeTimers({ legacyFakeTimers: true }); - - wrapper.destroy(); }); it('renders online state', () => { diff --git a/spec/frontend/ci/runner/components/runner_tag_spec.js b/spec/frontend/ci/runner/components/runner_tag_spec.js index 59bfe1585e9..e3d46e5d6df 100644 --- a/spec/frontend/ci/runner/components/runner_tag_spec.js +++ b/spec/frontend/ci/runner/components/runner_tag_spec.js @@ -39,10 +39,6 @@ describe('RunnerTag', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('Displays tag text', () => { expect(wrapper.text()).toBe(mockTag); }); diff --git a/spec/frontend/ci/runner/components/runner_tags_spec.js b/spec/frontend/ci/runner/components/runner_tags_spec.js index 96bec00302b..bcb1d1f9e13 100644 --- a/spec/frontend/ci/runner/components/runner_tags_spec.js +++ b/spec/frontend/ci/runner/components/runner_tags_spec.js @@ -21,10 +21,6 @@ describe('RunnerTags', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('Displays tags text', () => { expect(wrapper.text()).toMatchInterpolatedText('tag1 tag2'); diff --git a/spec/frontend/ci/runner/components/runner_type_badge_spec.js b/spec/frontend/ci/runner/components/runner_type_badge_spec.js index acf9486064f..7a0fb6f69ea 100644 --- a/spec/frontend/ci/runner/components/runner_type_badge_spec.js +++ b/spec/frontend/ci/runner/components/runner_type_badge_spec.js @@ -28,10 +28,6 @@ describe('RunnerTypeBadge', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe.each` type | text ${INSTANCE_TYPE} | ${I18N_INSTANCE_TYPE} diff --git a/spec/frontend/ci/runner/components/runner_type_tabs_spec.js b/spec/frontend/ci/runner/components/runner_type_tabs_spec.js index 3347c190083..6e15c84ad7e 100644 --- a/spec/frontend/ci/runner/components/runner_type_tabs_spec.js +++ b/spec/frontend/ci/runner/components/runner_type_tabs_spec.js @@ -63,10 +63,6 @@ describe('RunnerTypeTabs', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('Renders all options to filter runners by default', () => { createComponent(); diff --git a/spec/frontend/ci/runner/components/runner_update_form_spec.js b/spec/frontend/ci/runner/components/runner_update_form_spec.js index 0395d538d50..620e2f85890 100644 --- a/spec/frontend/ci/runner/components/runner_update_form_spec.js +++ b/spec/frontend/ci/runner/components/runner_update_form_spec.js @@ -107,10 +107,6 @@ describe('RunnerUpdateForm', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('Form has a submit button', () => { expect(findSubmit().exists()).toBe(true); }); diff --git a/spec/frontend/ci/runner/components/search_tokens/tag_token_spec.js b/spec/frontend/ci/runner/components/search_tokens/tag_token_spec.js index 7c6b00ee3ef..e9f2e888b9a 100644 --- a/spec/frontend/ci/runner/components/search_tokens/tag_token_spec.js +++ b/spec/frontend/ci/runner/components/search_tokens/tag_token_spec.js @@ -90,7 +90,6 @@ describe('TagToken', () => { afterEach(() => { getRecentlyUsedSuggestions.mockReset(); - wrapper.destroy(); }); describe('when the tags token is displayed', () => { diff --git a/spec/frontend/ci/runner/components/stat/runner_single_stat_spec.js b/spec/frontend/ci/runner/components/stat/runner_single_stat_spec.js index cad61f26012..f30b75ee614 100644 --- a/spec/frontend/ci/runner/components/stat/runner_single_stat_spec.js +++ b/spec/frontend/ci/runner/components/stat/runner_single_stat_spec.js @@ -32,10 +32,6 @@ describe('RunnerStats', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it.each` case | count | value ${'number'} | ${99} | ${'99'} diff --git a/spec/frontend/ci/runner/components/stat/runner_stats_spec.js b/spec/frontend/ci/runner/components/stat/runner_stats_spec.js index 3d45674d106..13366a788d5 100644 --- a/spec/frontend/ci/runner/components/stat/runner_stats_spec.js +++ b/spec/frontend/ci/runner/components/stat/runner_stats_spec.js @@ -47,10 +47,6 @@ describe('RunnerStats', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('Displays all the stats', () => { createComponent({ mountFn: mount, diff --git a/spec/frontend/ci/runner/group_runner_show/group_runner_show_app_spec.js b/spec/frontend/ci/runner/group_runner_show/group_runner_show_app_spec.js index b1290c25fce..fadc6e5ebc5 100644 --- a/spec/frontend/ci/runner/group_runner_show/group_runner_show_app_spec.js +++ b/spec/frontend/ci/runner/group_runner_show/group_runner_show_app_spec.js @@ -74,7 +74,6 @@ describe('GroupRunnerShowApp', () => { afterEach(() => { mockRunnerQuery.mockReset(); - wrapper.destroy(); }); describe('When showing runner details', () => { diff --git a/spec/frontend/ci/runner/group_runners/group_runners_app_spec.js b/spec/frontend/ci/runner/group_runners/group_runners_app_spec.js index 9f4ac68a4e9..00c7262e38b 100644 --- a/spec/frontend/ci/runner/group_runners/group_runners_app_spec.js +++ b/spec/frontend/ci/runner/group_runners/group_runners_app_spec.js @@ -138,7 +138,6 @@ describe('GroupRunnersApp', () => { afterEach(() => { mockGroupRunnersHandler.mockReset(); mockGroupRunnersCountHandler.mockReset(); - wrapper.destroy(); }); it('shows the runner tabs with a runner count for each type', async () => { diff --git a/spec/frontend/ci/runner/mock_data.js b/spec/frontend/ci/runner/mock_data.js index be5a5604d65..092a419c1fe 100644 --- a/spec/frontend/ci/runner/mock_data.js +++ b/spec/frontend/ci/runner/mock_data.js @@ -4,6 +4,7 @@ import runnerForRegistration from 'test_fixtures/graphql/ci/runner/register/runner_for_registration.query.graphql.json'; // Show runner queries +import runnerCreateResult from 'test_fixtures/graphql/ci/runner/new/runner_create.mutation.graphql.json'; import runnerData from 'test_fixtures/graphql/ci/runner/show/runner.query.graphql.json'; import runnerWithGroupData from 'test_fixtures/graphql/ci/runner/show/runner.query.graphql.with_group.json'; import runnerProjectsData from 'test_fixtures/graphql/ci/runner/show/runner_projects.query.graphql.json'; @@ -13,7 +14,6 @@ import runnerJobsData from 'test_fixtures/graphql/ci/runner/show/runner_jobs.que import runnerFormData from 'test_fixtures/graphql/ci/runner/edit/runner_form.query.graphql.json'; // New runner queries -import runnerCreateResult from 'test_fixtures/graphql/ci/runner/new/runner_create.mutation.graphql.json'; // List queries import allRunnersData from 'test_fixtures/graphql/ci/runner/list/all_runners.query.graphql.json'; diff --git a/spec/frontend/ci/runner/runner_edit/runner_edit_app_spec.js b/spec/frontend/ci/runner/runner_edit/runner_edit_app_spec.js index 477eb1a8fdf..79bbf95f8f0 100644 --- a/spec/frontend/ci/runner/runner_edit/runner_edit_app_spec.js +++ b/spec/frontend/ci/runner/runner_edit/runner_edit_app_spec.js @@ -51,7 +51,6 @@ describe('RunnerEditApp', () => { afterEach(() => { mockRunnerQuery.mockReset(); - wrapper.destroy(); }); it('expect GraphQL ID to be requested', async () => { diff --git a/spec/frontend/ci_secure_files/components/metadata/button_spec.js b/spec/frontend/ci_secure_files/components/metadata/button_spec.js index 4ac5b3325d4..5bd4bab25af 100644 --- a/spec/frontend/ci_secure_files/components/metadata/button_spec.js +++ b/spec/frontend/ci_secure_files/components/metadata/button_spec.js @@ -12,10 +12,6 @@ describe('Secure File Metadata Button', () => { const findButton = () => wrapper.findComponent(GlButton); - afterEach(() => { - wrapper.destroy(); - }); - const createWrapper = (secureFile = {}, admin = false) => { wrapper = mount(Button, { propsData: { diff --git a/spec/frontend/ci_secure_files/components/metadata/modal_spec.js b/spec/frontend/ci_secure_files/components/metadata/modal_spec.js index 230507d32d7..e181d15f2f9 100644 --- a/spec/frontend/ci_secure_files/components/metadata/modal_spec.js +++ b/spec/frontend/ci_secure_files/components/metadata/modal_spec.js @@ -37,7 +37,6 @@ describe('Secure File Metadata Modal', () => { afterEach(() => { unmockTracking(); - wrapper.destroy(); }); describe('when a .cer file is supplied', () => { diff --git a/spec/frontend/ci_secure_files/components/secure_files_list_spec.js b/spec/frontend/ci_secure_files/components/secure_files_list_spec.js index ab6200ca6f4..637f4989f84 100644 --- a/spec/frontend/ci_secure_files/components/secure_files_list_spec.js +++ b/spec/frontend/ci_secure_files/components/secure_files_list_spec.js @@ -34,7 +34,6 @@ describe('SecureFilesList', () => { }); afterEach(() => { - wrapper.destroy(); mock.restore(); unmockTracking(); window.gon = originalGon; diff --git a/spec/frontend/clusters/agents/components/activity_events_list_spec.js b/spec/frontend/clusters/agents/components/activity_events_list_spec.js index 6b374b6620d..770815a9403 100644 --- a/spec/frontend/clusters/agents/components/activity_events_list_spec.js +++ b/spec/frontend/clusters/agents/components/activity_events_list_spec.js @@ -44,10 +44,6 @@ describe('ActivityEvents', () => { const findAllActivityHistoryItems = () => wrapper.findAllComponents(ActivityHistoryItem); const findSectionTitle = (at) => wrapper.findAllByTestId('activity-section-title').at(at); - afterEach(() => { - wrapper.destroy(); - }); - describe('while the agentEvents query is loading', () => { it('displays a loading icon', async () => { createWrapper(); diff --git a/spec/frontend/clusters/agents/components/activity_history_item_spec.js b/spec/frontend/clusters/agents/components/activity_history_item_spec.js index 68f6f11aa8f..48460519c6c 100644 --- a/spec/frontend/clusters/agents/components/activity_history_item_spec.js +++ b/spec/frontend/clusters/agents/components/activity_history_item_spec.js @@ -25,10 +25,6 @@ describe('ActivityHistoryItem', () => { const findHistoryItem = () => wrapper.findComponent(HistoryItem); const findTimeAgo = () => wrapper.findComponent(TimeAgoTooltip); - afterEach(() => { - wrapper.destroy(); - }); - describe.each` kind | icon | title | lineNumber ${'token_created'} | ${EVENT_DETAILS.token_created.eventTypeIcon} | ${sprintf(EVENT_DETAILS.token_created.title, { tokenName: agentName })} | ${0} diff --git a/spec/frontend/clusters/agents/components/agent_integration_status_row_spec.js b/spec/frontend/clusters/agents/components/agent_integration_status_row_spec.js index db1219ccb41..ac0ce89f334 100644 --- a/spec/frontend/clusters/agents/components/agent_integration_status_row_spec.js +++ b/spec/frontend/clusters/agents/components/agent_integration_status_row_spec.js @@ -25,10 +25,6 @@ describe('IntegrationStatus', () => { const findIcon = () => wrapper.findComponent(GlIcon); const findBadge = () => wrapper.findComponent(GlBadge); - afterEach(() => { - wrapper.destroy(); - }); - describe('icon', () => { const icon = 'status-success'; const iconClass = 'gl-text-green-500'; diff --git a/spec/frontend/clusters/agents/components/create_token_button_spec.js b/spec/frontend/clusters/agents/components/create_token_button_spec.js index aadd11e9b5f..5a8906813cf 100644 --- a/spec/frontend/clusters/agents/components/create_token_button_spec.js +++ b/spec/frontend/clusters/agents/components/create_token_button_spec.js @@ -29,10 +29,6 @@ describe('CreateTokenButton', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when user can create token', () => { beforeEach(() => { createWrapper(); diff --git a/spec/frontend/clusters/agents/components/create_token_modal_spec.js b/spec/frontend/clusters/agents/components/create_token_modal_spec.js index 0d10801e80e..ff698952c6b 100644 --- a/spec/frontend/clusters/agents/components/create_token_modal_spec.js +++ b/spec/frontend/clusters/agents/components/create_token_modal_spec.js @@ -119,7 +119,6 @@ describe('CreateTokenModal', () => { }); afterEach(() => { - wrapper.destroy(); apolloProvider = null; createResponse = null; }); diff --git a/spec/frontend/clusters/agents/components/integration_status_spec.js b/spec/frontend/clusters/agents/components/integration_status_spec.js index 36f0e622452..28a59391578 100644 --- a/spec/frontend/clusters/agents/components/integration_status_spec.js +++ b/spec/frontend/clusters/agents/components/integration_status_spec.js @@ -27,10 +27,6 @@ describe('IntegrationStatus', () => { const findAgentStatus = () => wrapper.findByTestId('agent-status'); const findAgentIntegrationStatusRows = () => wrapper.findAllComponents(AgentIntegrationStatusRow); - afterEach(() => { - wrapper.destroy(); - }); - it.each` lastUsedAt | status | iconName ${null} | ${'Never connected'} | ${'status-neutral'} diff --git a/spec/frontend/clusters/agents/components/revoke_token_button_spec.js b/spec/frontend/clusters/agents/components/revoke_token_button_spec.js index 6521221cbd7..9199c76585f 100644 --- a/spec/frontend/clusters/agents/components/revoke_token_button_spec.js +++ b/spec/frontend/clusters/agents/components/revoke_token_button_spec.js @@ -105,7 +105,6 @@ describe('RevokeTokenButton', () => { }); afterEach(() => { - wrapper.destroy(); apolloProvider = null; revokeSpy = null; }); diff --git a/spec/frontend/clusters/agents/components/show_spec.js b/spec/frontend/clusters/agents/components/show_spec.js index efa85136b17..118a3af48e0 100644 --- a/spec/frontend/clusters/agents/components/show_spec.js +++ b/spec/frontend/clusters/agents/components/show_spec.js @@ -79,10 +79,6 @@ describe('ClusterAgentShow', () => { const findActivity = () => wrapper.findComponent(ActivityEvents); const findIntegrationStatus = () => wrapper.findComponent(IntegrationStatus); - afterEach(() => { - wrapper.destroy(); - }); - describe('default behaviour', () => { beforeEach(async () => { createWrapper({ clusterAgent: defaultClusterAgent }); diff --git a/spec/frontend/clusters/agents/components/token_table_spec.js b/spec/frontend/clusters/agents/components/token_table_spec.js index 334615f1818..1a6aeedb694 100644 --- a/spec/frontend/clusters/agents/components/token_table_spec.js +++ b/spec/frontend/clusters/agents/components/token_table_spec.js @@ -57,10 +57,6 @@ describe('ClusterAgentTokenTable', () => { return createComponent(defaultTokens); }); - afterEach(() => { - wrapper.destroy(); - }); - it('displays the create token button', () => { expect(findCreateTokenBtn().exists()).toBe(true); }); diff --git a/spec/frontend/clusters/components/new_cluster_spec.js b/spec/frontend/clusters/components/new_cluster_spec.js index ef39c90aaef..398b472a3a7 100644 --- a/spec/frontend/clusters/components/new_cluster_spec.js +++ b/spec/frontend/clusters/components/new_cluster_spec.js @@ -20,10 +20,6 @@ describe('NewCluster', () => { return createWrapper(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the cluster component correctly', () => { expect(wrapper.html()).toMatchSnapshot(); }); diff --git a/spec/frontend/clusters/components/remove_cluster_confirmation_spec.js b/spec/frontend/clusters/components/remove_cluster_confirmation_spec.js index 53683af893a..d9fa2200a29 100644 --- a/spec/frontend/clusters/components/remove_cluster_confirmation_spec.js +++ b/spec/frontend/clusters/components/remove_cluster_confirmation_spec.js @@ -18,11 +18,6 @@ describe('Remove cluster confirmation modal', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders buttons with modal included', () => { createComponent(); expect(wrapper.element).toMatchSnapshot(); diff --git a/spec/frontend/clusters_list/components/agent_token_spec.js b/spec/frontend/clusters_list/components/agent_token_spec.js index a92a03fedb6..edb8b22d79e 100644 --- a/spec/frontend/clusters_list/components/agent_token_spec.js +++ b/spec/frontend/clusters_list/components/agent_token_spec.js @@ -53,10 +53,6 @@ describe('InstallAgentModal', () => { createWrapper(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('initial state', () => { it('shows basic agent installation instructions', () => { expect(wrapper.text()).toContain(I18N_AGENT_TOKEN.basicInstallTitle); diff --git a/spec/frontend/clusters_list/components/agents_spec.js b/spec/frontend/clusters_list/components/agents_spec.js index 2372ab30300..d91245ba9b4 100644 --- a/spec/frontend/clusters_list/components/agents_spec.js +++ b/spec/frontend/clusters_list/components/agents_spec.js @@ -83,8 +83,6 @@ describe('Agents', () => { const findBanner = () => wrapper.findComponent(GlBanner); afterEach(() => { - wrapper.destroy(); - localStorage.removeItem(AGENT_FEEDBACK_KEY); }); diff --git a/spec/frontend/clusters_list/components/ancestor_notice_spec.js b/spec/frontend/clusters_list/components/ancestor_notice_spec.js index 758f6586e1a..4a2effa3463 100644 --- a/spec/frontend/clusters_list/components/ancestor_notice_spec.js +++ b/spec/frontend/clusters_list/components/ancestor_notice_spec.js @@ -18,10 +18,6 @@ describe('ClustersAncestorNotice', () => { return createWrapper(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('when cluster does not have ancestors', () => { beforeEach(async () => { store.state.hasAncestorClusters = false; diff --git a/spec/frontend/clusters_list/components/clusters_actions_spec.js b/spec/frontend/clusters_list/components/clusters_actions_spec.js index 7c0157c473b..e4e1986f705 100644 --- a/spec/frontend/clusters_list/components/clusters_actions_spec.js +++ b/spec/frontend/clusters_list/components/clusters_actions_spec.js @@ -44,9 +44,6 @@ describe('ClustersActionsComponent', () => { createWrapper(); }); - afterEach(() => { - wrapper.destroy(); - }); describe('when the certificate based clusters are enabled', () => { it('renders actions menu', () => { expect(findDropdown().exists()).toBe(true); diff --git a/spec/frontend/clusters_list/components/clusters_empty_state_spec.js b/spec/frontend/clusters_list/components/clusters_empty_state_spec.js index 2c3a224f3c8..5a5006d24c4 100644 --- a/spec/frontend/clusters_list/components/clusters_empty_state_spec.js +++ b/spec/frontend/clusters_list/components/clusters_empty_state_spec.js @@ -21,10 +21,6 @@ describe('ClustersEmptyStateComponent', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when the help text is not provided', () => { beforeEach(() => { createWrapper(); diff --git a/spec/frontend/clusters_list/components/clusters_main_view_spec.js b/spec/frontend/clusters_list/components/clusters_main_view_spec.js index 6f23ed47d2a..af8d3b59869 100644 --- a/spec/frontend/clusters_list/components/clusters_main_view_spec.js +++ b/spec/frontend/clusters_list/components/clusters_main_view_spec.js @@ -40,10 +40,6 @@ describe('ClustersMainViewComponent', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findTabs = () => wrapper.findComponent(GlTabs); const findAllTabs = () => wrapper.findAllComponents(GlTab); const findGlTabAtIndex = (index) => findAllTabs().at(index); diff --git a/spec/frontend/clusters_list/components/clusters_view_all_spec.js b/spec/frontend/clusters_list/components/clusters_view_all_spec.js index b4eb9242003..e81b242dd90 100644 --- a/spec/frontend/clusters_list/components/clusters_view_all_spec.js +++ b/spec/frontend/clusters_list/components/clusters_view_all_spec.js @@ -60,10 +60,6 @@ describe('ClustersViewAllComponent', () => { createWrapper(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('when agents and clusters are not loaded', () => { const initialState = { loadingClusters: true, diff --git a/spec/frontend/clusters_list/components/delete_agent_button_spec.js b/spec/frontend/clusters_list/components/delete_agent_button_spec.js index e8eff45135f..a0642996a20 100644 --- a/spec/frontend/clusters_list/components/delete_agent_button_spec.js +++ b/spec/frontend/clusters_list/components/delete_agent_button_spec.js @@ -108,7 +108,6 @@ describe('DeleteAgentButton', () => { }); afterEach(() => { - wrapper.destroy(); apolloProvider = null; deleteResponse = null; toast = null; diff --git a/spec/frontend/clusters_list/components/install_agent_modal_spec.js b/spec/frontend/clusters_list/components/install_agent_modal_spec.js index 10264d6a011..3156eaaecfc 100644 --- a/spec/frontend/clusters_list/components/install_agent_modal_spec.js +++ b/spec/frontend/clusters_list/components/install_agent_modal_spec.js @@ -139,7 +139,6 @@ describe('InstallAgentModal', () => { }); afterEach(() => { - wrapper.destroy(); apolloProvider = null; }); diff --git a/spec/frontend/clusters_list/components/node_error_help_text_spec.js b/spec/frontend/clusters_list/components/node_error_help_text_spec.js index 3211ba44eff..a3dfc848fc8 100644 --- a/spec/frontend/clusters_list/components/node_error_help_text_spec.js +++ b/spec/frontend/clusters_list/components/node_error_help_text_spec.js @@ -13,10 +13,6 @@ describe('NodeErrorHelpText', () => { const findPopover = () => wrapper.findComponent(GlPopover); - afterEach(() => { - wrapper.destroy(); - }); - it.each` errorType | wrapperText | popoverText ${'authentication_error'} | ${'Unable to Authenticate'} | ${'GitLab failed to authenticate'} diff --git a/spec/frontend/code_navigation/components/app_spec.js b/spec/frontend/code_navigation/components/app_spec.js index b9be262efd0..88861b0d08a 100644 --- a/spec/frontend/code_navigation/components/app_spec.js +++ b/spec/frontend/code_navigation/components/app_spec.js @@ -32,10 +32,6 @@ function factory(initialState = {}, props = {}) { } describe('Code navigation app component', () => { - afterEach(() => { - wrapper.destroy(); - }); - it('sets initial data on mount if the correct props are passed', () => { const codeNavigationPath = 'code/nav/path.js'; const path = 'blob/path.js'; diff --git a/spec/frontend/code_navigation/components/popover_spec.js b/spec/frontend/code_navigation/components/popover_spec.js index 874263e046a..1bfaf7e959e 100644 --- a/spec/frontend/code_navigation/components/popover_spec.js +++ b/spec/frontend/code_navigation/components/popover_spec.js @@ -61,10 +61,6 @@ function factory({ position, data, definitionPathPrefix, blobPath = 'index.js' } } describe('Code navigation popover component', () => { - afterEach(() => { - wrapper.destroy(); - }); - it('renders popover', () => { factory({ position: { x: 0, y: 0, height: 0 }, diff --git a/spec/frontend/commit/commit_box_pipeline_mini_graph_spec.js b/spec/frontend/commit/commit_box_pipeline_mini_graph_spec.js index c2a4e675e5e..64623968aa0 100644 --- a/spec/frontend/commit/commit_box_pipeline_mini_graph_spec.js +++ b/spec/frontend/commit/commit_box_pipeline_mini_graph_spec.js @@ -69,10 +69,6 @@ describe('Commit box pipeline mini graph', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('loading state', () => { it('should display loading state when loading', () => { createComponent(); diff --git a/spec/frontend/commit/commit_pipeline_status_component_spec.js b/spec/frontend/commit/commit_pipeline_status_component_spec.js index e75fb697a7b..c9ee25116f5 100644 --- a/spec/frontend/commit/commit_pipeline_status_component_spec.js +++ b/spec/frontend/commit/commit_pipeline_status_component_spec.js @@ -41,11 +41,6 @@ describe('Commit pipeline status component', () => { const findLink = () => wrapper.find('a'); const findCiIcon = () => findLink().findComponent(CiIcon); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('Visibility management', () => { describe('when component is hidden', () => { beforeEach(() => { diff --git a/spec/frontend/commit/components/commit_box_pipeline_status_spec.js b/spec/frontend/commit/components/commit_box_pipeline_status_spec.js index 8a46f8dedc1..9c7a41b3506 100644 --- a/spec/frontend/commit/components/commit_box_pipeline_status_spec.js +++ b/spec/frontend/commit/components/commit_box_pipeline_status_spec.js @@ -54,10 +54,6 @@ describe('Commit box pipeline status', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('loading state', () => { it('should display loading state when loading', () => { createComponent(); diff --git a/spec/frontend/confidential_merge_request/components/project_form_group_spec.js b/spec/frontend/confidential_merge_request/components/project_form_group_spec.js index d6f16f1a644..a7ae07a36d9 100644 --- a/spec/frontend/confidential_merge_request/components/project_form_group_spec.js +++ b/spec/frontend/confidential_merge_request/components/project_form_group_spec.js @@ -46,7 +46,6 @@ function factory(projects = mockData) { describe('Confidential merge request project form group component', () => { afterEach(() => { mock.restore(); - wrapper.destroy(); }); it('renders fork dropdown', async () => { diff --git a/spec/frontend/content_editor/components/bubble_menus/bubble_menu_spec.js b/spec/frontend/content_editor/components/bubble_menus/bubble_menu_spec.js index 0700cf5d529..271e63abf21 100644 --- a/spec/frontend/content_editor/components/bubble_menus/bubble_menu_spec.js +++ b/spec/frontend/content_editor/components/bubble_menus/bubble_menu_spec.js @@ -51,10 +51,6 @@ describe('content_editor/components/bubble_menus/bubble_menu', () => { setupMocks(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('initializes BubbleMenuPlugin', async () => { createWrapper({}); diff --git a/spec/frontend/content_editor/components/bubble_menus/code_block_bubble_menu_spec.js b/spec/frontend/content_editor/components/bubble_menus/code_block_bubble_menu_spec.js index 378b11f4ae9..085a6d3a28d 100644 --- a/spec/frontend/content_editor/components/bubble_menus/code_block_bubble_menu_spec.js +++ b/spec/frontend/content_editor/components/bubble_menus/code_block_bubble_menu_spec.js @@ -64,10 +64,6 @@ describe('content_editor/components/bubble_menus/code_block_bubble_menu', () => buildWrapper(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders bubble menu component', async () => { tiptapEditor.commands.insertContent(preTag()); bubbleMenu = wrapper.findComponent(BubbleMenu); diff --git a/spec/frontend/content_editor/components/bubble_menus/formatting_bubble_menu_spec.js b/spec/frontend/content_editor/components/bubble_menus/formatting_bubble_menu_spec.js index 98001858851..7bab473529f 100644 --- a/spec/frontend/content_editor/components/bubble_menus/formatting_bubble_menu_spec.js +++ b/spec/frontend/content_editor/components/bubble_menus/formatting_bubble_menu_spec.js @@ -37,10 +37,6 @@ describe('content_editor/components/bubble_menus/formatting_bubble_menu', () => buildEditor(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders bubble menu component', () => { buildWrapper(); const bubbleMenu = wrapper.findComponent(BubbleMenu); diff --git a/spec/frontend/content_editor/components/bubble_menus/link_bubble_menu_spec.js b/spec/frontend/content_editor/components/bubble_menus/link_bubble_menu_spec.js index 9aa9c6483f4..eb5a3b61591 100644 --- a/spec/frontend/content_editor/components/bubble_menus/link_bubble_menu_spec.js +++ b/spec/frontend/content_editor/components/bubble_menus/link_bubble_menu_spec.js @@ -71,10 +71,6 @@ describe('content_editor/components/bubble_menus/link_bubble_menu', () => { .run(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders bubble menu component', async () => { await buildWrapperAndDisplayMenu(); diff --git a/spec/frontend/content_editor/components/bubble_menus/media_bubble_menu_spec.js b/spec/frontend/content_editor/components/bubble_menus/media_bubble_menu_spec.js index 215fe02b805..c918f068c07 100644 --- a/spec/frontend/content_editor/components/bubble_menus/media_bubble_menu_spec.js +++ b/spec/frontend/content_editor/components/bubble_menus/media_bubble_menu_spec.js @@ -100,10 +100,6 @@ describe.each` bubbleMenu = wrapper.findComponent(BubbleMenu); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders bubble menu component', async () => { expect(bubbleMenu.classes()).toEqual(['gl-shadow', 'gl-rounded-base', 'gl-bg-white']); }); diff --git a/spec/frontend/content_editor/components/content_editor_alert_spec.js b/spec/frontend/content_editor/components/content_editor_alert_spec.js index ee9ead8f8a7..e62e2331d25 100644 --- a/spec/frontend/content_editor/components/content_editor_alert_spec.js +++ b/spec/frontend/content_editor/components/content_editor_alert_spec.js @@ -29,10 +29,6 @@ describe('content_editor/components/content_editor_alert', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it.each` variant | message ${'danger'} | ${'An error occurred'} diff --git a/spec/frontend/content_editor/components/content_editor_spec.js b/spec/frontend/content_editor/components/content_editor_spec.js index 1a3cd36a8bb..b338711f941 100644 --- a/spec/frontend/content_editor/components/content_editor_spec.js +++ b/spec/frontend/content_editor/components/content_editor_spec.js @@ -48,10 +48,6 @@ describe('ContentEditor', () => { renderMarkdown = jest.fn(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('triggers initialized event', () => { createWrapper(); diff --git a/spec/frontend/content_editor/components/editor_state_observer_spec.js b/spec/frontend/content_editor/components/editor_state_observer_spec.js index 9b42f61c98c..80fb20e5258 100644 --- a/spec/frontend/content_editor/components/editor_state_observer_spec.js +++ b/spec/frontend/content_editor/components/editor_state_observer_spec.js @@ -45,10 +45,6 @@ describe('content_editor/components/editor_state_observer', () => { buildEditor(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('when editor content changes', () => { it('emits update, selectionUpdate, and transaction events', () => { const content = '<p>My paragraph</p>'; diff --git a/spec/frontend/content_editor/components/formatting_toolbar_spec.js b/spec/frontend/content_editor/components/formatting_toolbar_spec.js index c4bf21ba813..e52f825fba0 100644 --- a/spec/frontend/content_editor/components/formatting_toolbar_spec.js +++ b/spec/frontend/content_editor/components/formatting_toolbar_spec.js @@ -18,10 +18,6 @@ describe('content_editor/components/top_toolbar', () => { trackingSpy = mockTracking(undefined, null, jest.spyOn); }); - afterEach(() => { - wrapper.destroy(); - }); - describe.each` testId | controlProps ${'text-styles'} | ${{}} diff --git a/spec/frontend/content_editor/components/loading_indicator_spec.js b/spec/frontend/content_editor/components/loading_indicator_spec.js index 0065103d01b..1b0ffaee6c6 100644 --- a/spec/frontend/content_editor/components/loading_indicator_spec.js +++ b/spec/frontend/content_editor/components/loading_indicator_spec.js @@ -11,10 +11,6 @@ describe('content_editor/components/loading_indicator', () => { wrapper = shallowMountExtended(LoadingIndicator); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when loading content', () => { beforeEach(() => { createWrapper(); diff --git a/spec/frontend/content_editor/components/toolbar_button_spec.js b/spec/frontend/content_editor/components/toolbar_button_spec.js index 1f1f7b338c6..1556f761682 100644 --- a/spec/frontend/content_editor/components/toolbar_button_spec.js +++ b/spec/frontend/content_editor/components/toolbar_button_spec.js @@ -42,10 +42,6 @@ describe('content_editor/components/toolbar_button', () => { buildEditor(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('displays tertiary, medium button with a provided label and icon', () => { buildWrapper(); diff --git a/spec/frontend/content_editor/components/toolbar_image_button_spec.js b/spec/frontend/content_editor/components/toolbar_image_button_spec.js index 5473d43f5a1..0ec950137fc 100644 --- a/spec/frontend/content_editor/components/toolbar_image_button_spec.js +++ b/spec/frontend/content_editor/components/toolbar_image_button_spec.js @@ -50,7 +50,6 @@ describe('content_editor/components/toolbar_image_button', () => { afterEach(() => { editor.destroy(); - wrapper.destroy(); }); it('sets the image to the value in the URL input when "Insert" button is clicked', async () => { diff --git a/spec/frontend/content_editor/components/toolbar_link_button_spec.js b/spec/frontend/content_editor/components/toolbar_link_button_spec.js index 40e859e96af..80090c0278f 100644 --- a/spec/frontend/content_editor/components/toolbar_link_button_spec.js +++ b/spec/frontend/content_editor/components/toolbar_link_button_spec.js @@ -43,7 +43,6 @@ describe('content_editor/components/toolbar_link_button', () => { afterEach(() => { editor.destroy(); - wrapper.destroy(); }); it('renders dropdown component', () => { diff --git a/spec/frontend/content_editor/components/toolbar_more_dropdown_spec.js b/spec/frontend/content_editor/components/toolbar_more_dropdown_spec.js index 5dc4288a169..40f05f66b5d 100644 --- a/spec/frontend/content_editor/components/toolbar_more_dropdown_spec.js +++ b/spec/frontend/content_editor/components/toolbar_more_dropdown_spec.js @@ -35,10 +35,6 @@ describe('content_editor/components/toolbar_more_dropdown', () => { buildWrapper(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe.each` name | contentType | command | params ${'Code block'} | ${'codeBlock'} | ${'setNode'} | ${['codeBlock']} diff --git a/spec/frontend/content_editor/components/toolbar_table_button_spec.js b/spec/frontend/content_editor/components/toolbar_table_button_spec.js index aa4604661e5..35741971488 100644 --- a/spec/frontend/content_editor/components/toolbar_table_button_spec.js +++ b/spec/frontend/content_editor/components/toolbar_table_button_spec.js @@ -30,7 +30,6 @@ describe('content_editor/components/toolbar_table_button', () => { afterEach(() => { editor.destroy(); - wrapper.destroy(); }); it('renders a grid of 5x5 buttons to create a table', () => { diff --git a/spec/frontend/content_editor/components/toolbar_text_style_dropdown_spec.js b/spec/frontend/content_editor/components/toolbar_text_style_dropdown_spec.js index 5a725ac1ca4..31ed13541e6 100644 --- a/spec/frontend/content_editor/components/toolbar_text_style_dropdown_spec.js +++ b/spec/frontend/content_editor/components/toolbar_text_style_dropdown_spec.js @@ -39,10 +39,6 @@ describe('content_editor/components/toolbar_text_style_dropdown', () => { buildEditor(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders all text styles as dropdown items', () => { buildWrapper(); diff --git a/spec/frontend/content_editor/components/wrappers/code_block_spec.js b/spec/frontend/content_editor/components/wrappers/code_block_spec.js index a5ef19fb8e8..057e50cd0e2 100644 --- a/spec/frontend/content_editor/components/wrappers/code_block_spec.js +++ b/spec/frontend/content_editor/components/wrappers/code_block_spec.js @@ -55,10 +55,6 @@ describe('content/components/wrappers/code_block', () => { codeBlockLanguageLoader.findOrCreateLanguageBySyntax.mockReturnValue({ syntax: language }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders a node-view-wrapper as a pre element', () => { createWrapper(); diff --git a/spec/frontend/content_editor/components/wrappers/details_spec.js b/spec/frontend/content_editor/components/wrappers/details_spec.js index d746b9fa2f1..232c1e9aede 100644 --- a/spec/frontend/content_editor/components/wrappers/details_spec.js +++ b/spec/frontend/content_editor/components/wrappers/details_spec.js @@ -13,10 +13,6 @@ describe('content/components/wrappers/details', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders a node-view-content as a ul element', () => { createWrapper(); diff --git a/spec/frontend/content_editor/components/wrappers/footnote_definition_spec.js b/spec/frontend/content_editor/components/wrappers/footnote_definition_spec.js index 1ff750eb2ac..91c6799478e 100644 --- a/spec/frontend/content_editor/components/wrappers/footnote_definition_spec.js +++ b/spec/frontend/content_editor/components/wrappers/footnote_definition_spec.js @@ -12,10 +12,6 @@ describe('content/components/wrappers/footnote_definition', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders footnote label as a readyonly element', () => { const label = 'footnote'; diff --git a/spec/frontend/content_editor/components/wrappers/label_spec.js b/spec/frontend/content_editor/components/wrappers/label_spec.js index 9e58669b0ea..fa32b746142 100644 --- a/spec/frontend/content_editor/components/wrappers/label_spec.js +++ b/spec/frontend/content_editor/components/wrappers/label_spec.js @@ -11,10 +11,6 @@ describe('content/components/wrappers/label', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it("renders a GlLabel with the node's text and color", () => { createWrapper({ attrs: { color: '#ff0000', text: 'foo bar', originalText: '~"foo bar"' } }); diff --git a/spec/frontend/content_editor/components/wrappers/table_cell_base_spec.js b/spec/frontend/content_editor/components/wrappers/table_cell_base_spec.js index 52af3264f33..d8f34565705 100644 --- a/spec/frontend/content_editor/components/wrappers/table_cell_base_spec.js +++ b/spec/frontend/content_editor/components/wrappers/table_cell_base_spec.js @@ -52,10 +52,6 @@ describe('content/components/wrappers/table_cell_base', () => { editor = createTestEditor({}); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders a td node-view-wrapper with relative position', () => { createWrapper(); expect(wrapper.findComponent(NodeViewWrapper).classes()).toContain('gl-relative'); diff --git a/spec/frontend/content_editor/components/wrappers/table_cell_body_spec.js b/spec/frontend/content_editor/components/wrappers/table_cell_body_spec.js index 2aefbc77545..506f442bcc7 100644 --- a/spec/frontend/content_editor/components/wrappers/table_cell_body_spec.js +++ b/spec/frontend/content_editor/components/wrappers/table_cell_body_spec.js @@ -22,10 +22,6 @@ describe('content/components/wrappers/table_cell_body', () => { editor = createTestEditor({}); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders a TableCellBase component', () => { createWrapper(); expect(wrapper.findComponent(TableCellBaseWrapper).props()).toEqual({ diff --git a/spec/frontend/content_editor/components/wrappers/table_cell_header_spec.js b/spec/frontend/content_editor/components/wrappers/table_cell_header_spec.js index e48df8734a6..bebe7fb4124 100644 --- a/spec/frontend/content_editor/components/wrappers/table_cell_header_spec.js +++ b/spec/frontend/content_editor/components/wrappers/table_cell_header_spec.js @@ -22,10 +22,6 @@ describe('content/components/wrappers/table_cell_header', () => { editor = createTestEditor({}); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders a TableCellBase component', () => { createWrapper(); expect(wrapper.findComponent(TableCellBaseWrapper).props()).toEqual({ diff --git a/spec/frontend/content_editor/components/wrappers/table_of_contents_spec.js b/spec/frontend/content_editor/components/wrappers/table_of_contents_spec.js index bfda89a8b09..4d5911dda0c 100644 --- a/spec/frontend/content_editor/components/wrappers/table_of_contents_spec.js +++ b/spec/frontend/content_editor/components/wrappers/table_of_contents_spec.js @@ -70,10 +70,6 @@ describe('content/components/wrappers/table_of_contents', () => { await nextTick(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders a node-view-wrapper as a ul element', () => { expect(wrapper.findComponent(NodeViewWrapper).props().as).toBe('ul'); }); diff --git a/spec/frontend/contributors/component/contributors_spec.js b/spec/frontend/contributors/component/contributors_spec.js index 9f5c7e11644..f915b834aff 100644 --- a/spec/frontend/contributors/component/contributors_spec.js +++ b/spec/frontend/contributors/component/contributors_spec.js @@ -59,7 +59,6 @@ describe('Contributors charts', () => { afterEach(() => { mock.restore(); - wrapper.destroy(); }); it('should fetch chart data when mounted', () => { diff --git a/spec/frontend/crm/contact_form_wrapper_spec.js b/spec/frontend/crm/contact_form_wrapper_spec.js index 50b432943fb..2fb6940a415 100644 --- a/spec/frontend/crm/contact_form_wrapper_spec.js +++ b/spec/frontend/crm/contact_form_wrapper_spec.js @@ -47,7 +47,6 @@ describe('Customer relations contact form wrapper', () => { }); afterEach(() => { - wrapper.destroy(); fakeApollo = null; }); diff --git a/spec/frontend/crm/contacts_root_spec.js b/spec/frontend/crm/contacts_root_spec.js index ec7172434bf..63b64a6c984 100644 --- a/spec/frontend/crm/contacts_root_spec.js +++ b/spec/frontend/crm/contacts_root_spec.js @@ -61,7 +61,6 @@ describe('Customer relations contacts root app', () => { }); afterEach(() => { - wrapper.destroy(); fakeApollo = null; router = null; }); diff --git a/spec/frontend/crm/crm_form_spec.js b/spec/frontend/crm/crm_form_spec.js index eabcf5b1b1b..fabf43ceb9d 100644 --- a/spec/frontend/crm/crm_form_spec.js +++ b/spec/frontend/crm/crm_form_spec.js @@ -188,10 +188,6 @@ describe('Reusable form component', () => { }; const asTestParams = (...keys) => keys.map((name) => [name, forms[name]]); - afterEach(() => { - wrapper.destroy(); - }); - describe.each(asTestParams(FORM_CREATE_CONTACT, FORM_UPDATE_CONTACT))( '%s form save button', (name, { mountFunction }) => { diff --git a/spec/frontend/crm/organization_form_wrapper_spec.js b/spec/frontend/crm/organization_form_wrapper_spec.js index d795c585622..8408c1920a9 100644 --- a/spec/frontend/crm/organization_form_wrapper_spec.js +++ b/spec/frontend/crm/organization_form_wrapper_spec.js @@ -40,10 +40,6 @@ describe('Customer relations organization form wrapper', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('in edit mode', () => { it('should render organization form with correct props', () => { mountComponent({ isEditMode: true }); diff --git a/spec/frontend/crm/organizations_root_spec.js b/spec/frontend/crm/organizations_root_spec.js index 1fcf6aa8f50..0b26a49a6b3 100644 --- a/spec/frontend/crm/organizations_root_spec.js +++ b/spec/frontend/crm/organizations_root_spec.js @@ -65,7 +65,6 @@ describe('Customer relations organizations root app', () => { }); afterEach(() => { - wrapper.destroy(); fakeApollo = null; router = null; }); diff --git a/spec/frontend/custom_metrics/components/custom_metrics_form_fields_spec.js b/spec/frontend/custom_metrics/components/custom_metrics_form_fields_spec.js index 7d9ae548c9a..12fef9d5ddf 100644 --- a/spec/frontend/custom_metrics/components/custom_metrics_form_fields_spec.js +++ b/spec/frontend/custom_metrics/components/custom_metrics_form_fields_spec.js @@ -42,7 +42,6 @@ describe('custom metrics form fields component', () => { }); afterEach(() => { - wrapper.destroy(); mockAxios.restore(); }); diff --git a/spec/frontend/custom_metrics/components/custom_metrics_form_spec.js b/spec/frontend/custom_metrics/components/custom_metrics_form_spec.js index af56b94f90b..c633583f2cb 100644 --- a/spec/frontend/custom_metrics/components/custom_metrics_form_spec.js +++ b/spec/frontend/custom_metrics/components/custom_metrics_form_spec.js @@ -26,10 +26,6 @@ describe('CustomMetricsForm', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - describe('Computed', () => { it('Form button and title text indicate the custom metric is being edited', () => { mountComponent({ metricPersisted: true }); diff --git a/spec/frontend/deploy_freeze/components/deploy_freeze_modal_spec.js b/spec/frontend/deploy_freeze/components/deploy_freeze_modal_spec.js index 113e0d8f60d..77118ae140a 100644 --- a/spec/frontend/deploy_freeze/components/deploy_freeze_modal_spec.js +++ b/spec/frontend/deploy_freeze/components/deploy_freeze_modal_spec.js @@ -46,11 +46,6 @@ describe('Deploy freeze modal', () => { wrapper.findComponent(TimezoneDropdown).trigger('input'); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('Basic interactions', () => { it('button is disabled when freeze period is invalid', () => { expect(submitDeployFreezeButton().attributes('disabled')).toBe('true'); diff --git a/spec/frontend/deploy_freeze/components/deploy_freeze_settings_spec.js b/spec/frontend/deploy_freeze/components/deploy_freeze_settings_spec.js index 27d8fea9d5e..883cc6a344a 100644 --- a/spec/frontend/deploy_freeze/components/deploy_freeze_settings_spec.js +++ b/spec/frontend/deploy_freeze/components/deploy_freeze_settings_spec.js @@ -24,11 +24,6 @@ describe('Deploy freeze settings', () => { }); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('Deploy freeze table contains components', () => { it('contains deploy freeze table', () => { expect(wrapper.findComponent(DeployFreezeTable).exists()).toBe(true); diff --git a/spec/frontend/deploy_freeze/components/deploy_freeze_table_spec.js b/spec/frontend/deploy_freeze/components/deploy_freeze_table_spec.js index c2d6eb399bc..6a9e482a184 100644 --- a/spec/frontend/deploy_freeze/components/deploy_freeze_table_spec.js +++ b/spec/frontend/deploy_freeze/components/deploy_freeze_table_spec.js @@ -37,11 +37,6 @@ describe('Deploy freeze table', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('dispatches fetchFreezePeriods when mounted', () => { expect(store.dispatch).toHaveBeenCalledWith('fetchFreezePeriods'); }); diff --git a/spec/frontend/deploy_keys/components/app_spec.js b/spec/frontend/deploy_keys/components/app_spec.js index d11ecf95de6..3dfb828b449 100644 --- a/spec/frontend/deploy_keys/components/app_spec.js +++ b/spec/frontend/deploy_keys/components/app_spec.js @@ -33,7 +33,6 @@ describe('Deploy keys app component', () => { }); afterEach(() => { - wrapper.destroy(); mock.restore(); }); diff --git a/spec/frontend/deploy_keys/components/key_spec.js b/spec/frontend/deploy_keys/components/key_spec.js index 8599c55c908..5f20d4ad542 100644 --- a/spec/frontend/deploy_keys/components/key_spec.js +++ b/spec/frontend/deploy_keys/components/key_spec.js @@ -26,11 +26,6 @@ describe('Deploy keys key', () => { store.keys = data; }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('enabled key', () => { const deployKey = data.enabled_keys[0]; diff --git a/spec/frontend/deploy_keys/components/keys_panel_spec.js b/spec/frontend/deploy_keys/components/keys_panel_spec.js index f5f76d5d493..e0f86aadad4 100644 --- a/spec/frontend/deploy_keys/components/keys_panel_spec.js +++ b/spec/frontend/deploy_keys/components/keys_panel_spec.js @@ -23,11 +23,6 @@ describe('Deploy keys panel', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders list of keys', () => { mountComponent(); expect(wrapper.findAll('.deploy-key').length).toBe(wrapper.vm.keys.length); diff --git a/spec/frontend/deploy_tokens/components/new_deploy_token_spec.js b/spec/frontend/deploy_tokens/components/new_deploy_token_spec.js index efd724116ab..a8c38b56f27 100644 --- a/spec/frontend/deploy_tokens/components/new_deploy_token_spec.js +++ b/spec/frontend/deploy_tokens/components/new_deploy_token_spec.js @@ -38,10 +38,6 @@ describe('New Deploy Token', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('without a container registry', () => { beforeEach(() => { wrapper = factory({ containerRegistryEnabled: false }); diff --git a/spec/frontend/deploy_tokens/components/revoke_button_spec.js b/spec/frontend/deploy_tokens/components/revoke_button_spec.js index fa2a7d9b155..6e81205d1c1 100644 --- a/spec/frontend/deploy_tokens/components/revoke_button_spec.js +++ b/spec/frontend/deploy_tokens/components/revoke_button_spec.js @@ -52,10 +52,6 @@ describe('RevokeButton', () => { ); } - afterEach(() => { - wrapper.destroy(); - }); - const findRevokeButton = () => wrapper.findByTestId('revoke-button'); const findModal = () => wrapper.findComponent(GlModal); const findPrimaryModalButton = () => wrapper.findByTestId('primary-revoke-btn'); diff --git a/spec/frontend/design_management/components/delete_button_spec.js b/spec/frontend/design_management/components/delete_button_spec.js index 426a61f5a47..81e3b21a910 100644 --- a/spec/frontend/design_management/components/delete_button_spec.js +++ b/spec/frontend/design_management/components/delete_button_spec.js @@ -21,10 +21,6 @@ describe('Batch delete button component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - it('renders non-disabled button by default', () => { createComponent(); diff --git a/spec/frontend/design_management/components/design_notes/design_discussion_spec.js b/spec/frontend/design_management/components/design_notes/design_discussion_spec.js index 58e074b5b2d..5483112f270 100644 --- a/spec/frontend/design_management/components/design_notes/design_discussion_spec.js +++ b/spec/frontend/design_management/components/design_notes/design_discussion_spec.js @@ -97,7 +97,6 @@ describe('Design discussions component', () => { }); afterEach(() => { - wrapper.destroy(); window.gon = originalGon; confirmAction.mockReset(); }); diff --git a/spec/frontend/design_management/components/design_notes/design_note_signed_out_spec.js b/spec/frontend/design_management/components/design_notes/design_note_signed_out_spec.js index e71bb5ab520..95b08b89809 100644 --- a/spec/frontend/design_management/components/design_notes/design_note_signed_out_spec.js +++ b/spec/frontend/design_management/components/design_notes/design_note_signed_out_spec.js @@ -18,10 +18,6 @@ function createComponent(isAddDiscussion = false) { describe('DesignNoteSignedOut', () => { let wrapper; - afterEach(() => { - wrapper.destroy(); - }); - it('renders message containing register and sign-in links while user wants to reply to a discussion', () => { wrapper = createComponent(); diff --git a/spec/frontend/design_management/components/design_notes/design_note_spec.js b/spec/frontend/design_management/components/design_notes/design_note_spec.js index eda231fc468..24db025e108 100644 --- a/spec/frontend/design_management/components/design_notes/design_note_spec.js +++ b/spec/frontend/design_management/components/design_notes/design_note_spec.js @@ -65,10 +65,6 @@ describe('Design note component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - it('should match the snapshot', () => { createComponent({ note, diff --git a/spec/frontend/design_management/components/design_notes/design_reply_form_spec.js b/spec/frontend/design_management/components/design_notes/design_reply_form_spec.js index a1da2ec1300..46ba9e8113c 100644 --- a/spec/frontend/design_management/components/design_notes/design_reply_form_spec.js +++ b/spec/frontend/design_management/components/design_notes/design_reply_form_spec.js @@ -69,7 +69,6 @@ describe('Design reply form component', () => { }); afterEach(() => { - wrapper.destroy(); window.gon = originalGon; confirmAction.mockReset(); }); diff --git a/spec/frontend/design_management/components/design_notes/toggle_replies_widget_spec.js b/spec/frontend/design_management/components/design_notes/toggle_replies_widget_spec.js index 41129e2b58d..eaa5a620fa6 100644 --- a/spec/frontend/design_management/components/design_notes/toggle_replies_widget_spec.js +++ b/spec/frontend/design_management/components/design_notes/toggle_replies_widget_spec.js @@ -23,10 +23,6 @@ describe('Toggle replies widget component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - describe('when replies are collapsed', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/design_management/components/design_presentation_spec.js b/spec/frontend/design_management/components/design_presentation_spec.js index 4a339899473..2f67d9e24d2 100644 --- a/spec/frontend/design_management/components/design_presentation_spec.js +++ b/spec/frontend/design_management/components/design_presentation_spec.js @@ -115,7 +115,6 @@ describe('Design management design presentation component', () => { }); afterEach(() => { - wrapper.destroy(); window.gon = originalGon; }); diff --git a/spec/frontend/design_management/components/design_scaler_spec.js b/spec/frontend/design_management/components/design_scaler_spec.js index e1a66cea329..62a26a8f5dd 100644 --- a/spec/frontend/design_management/components/design_scaler_spec.js +++ b/spec/frontend/design_management/components/design_scaler_spec.js @@ -25,11 +25,6 @@ describe('Design management design scaler component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when `scale` value is greater than 1', () => { beforeEach(async () => { setScale(1.6); diff --git a/spec/frontend/design_management/components/design_sidebar_spec.js b/spec/frontend/design_management/components/design_sidebar_spec.js index f6e62de5ff1..1416801f1a7 100644 --- a/spec/frontend/design_management/components/design_sidebar_spec.js +++ b/spec/frontend/design_management/components/design_sidebar_spec.js @@ -68,7 +68,6 @@ describe('Design management design sidebar component', () => { }); afterEach(() => { - wrapper.destroy(); window.gon = originalGon; }); diff --git a/spec/frontend/design_management/components/design_todo_button_spec.js b/spec/frontend/design_management/components/design_todo_button_spec.js index ac26873b692..f713203c0ee 100644 --- a/spec/frontend/design_management/components/design_todo_button_spec.js +++ b/spec/frontend/design_management/components/design_todo_button_spec.js @@ -51,8 +51,6 @@ describe('Design management design todo button', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; jest.clearAllMocks(); }); diff --git a/spec/frontend/design_management/components/image_spec.js b/spec/frontend/design_management/components/image_spec.js index 95d2ad504de..53abcc559d8 100644 --- a/spec/frontend/design_management/components/image_spec.js +++ b/spec/frontend/design_management/components/image_spec.js @@ -20,10 +20,6 @@ describe('Design management large image component', () => { stubPerformanceWebAPI(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders loading state', () => { createComponent({ isLoading: true, diff --git a/spec/frontend/design_management/components/list/item_spec.js b/spec/frontend/design_management/components/list/item_spec.js index e907e2e4ac5..4a0ad5a045b 100644 --- a/spec/frontend/design_management/components/list/item_spec.js +++ b/spec/frontend/design_management/components/list/item_spec.js @@ -54,10 +54,6 @@ describe('Design management list item component', () => { ); } - afterEach(() => { - wrapper.destroy(); - }); - describe('when item is not in view', () => { it('image is not rendered', () => { createComponent(); diff --git a/spec/frontend/design_management/components/toolbar/design_navigation_spec.js b/spec/frontend/design_management/components/toolbar/design_navigation_spec.js index 38a7fadee79..8427d83ceee 100644 --- a/spec/frontend/design_management/components/toolbar/design_navigation_spec.js +++ b/spec/frontend/design_management/components/toolbar/design_navigation_spec.js @@ -34,10 +34,6 @@ describe('Design management pagination component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('hides components when designs are empty', () => { expect(wrapper.element).toMatchSnapshot(); }); diff --git a/spec/frontend/design_management/components/upload/button_spec.js b/spec/frontend/design_management/components/upload/button_spec.js index 59821218ab8..ceae7920e0d 100644 --- a/spec/frontend/design_management/components/upload/button_spec.js +++ b/spec/frontend/design_management/components/upload/button_spec.js @@ -14,10 +14,6 @@ describe('Design management upload button component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - it('renders upload design button', () => { createComponent(); diff --git a/spec/frontend/design_management/components/upload/design_version_dropdown_spec.js b/spec/frontend/design_management/components/upload/design_version_dropdown_spec.js index 6ad10e707ab..cdfff61ba4f 100644 --- a/spec/frontend/design_management/components/upload/design_version_dropdown_spec.js +++ b/spec/frontend/design_management/components/upload/design_version_dropdown_spec.js @@ -42,10 +42,6 @@ describe('Design management design version dropdown component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - const findListbox = () => wrapper.findComponent(GlCollapsibleListbox); const findAllListboxItems = () => wrapper.findAllComponents(GlListboxItem); const findVersionLink = (index) => wrapper.findAllComponents(GlListboxItem).at(index); diff --git a/spec/frontend/design_management/pages/design/index_spec.js b/spec/frontend/design_management/pages/design/index_spec.js index cd92198839b..99200188e21 100644 --- a/spec/frontend/design_management/pages/design/index_spec.js +++ b/spec/frontend/design_management/pages/design/index_spec.js @@ -127,10 +127,6 @@ describe('Design management design index page', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - describe('when navigating to component', () => { it('applies fullscreen layout class', () => { jest.spyOn(utils, 'getPageLayoutElement').mockReturnValue(mockPageLayoutElement); diff --git a/spec/frontend/design_management/pages/index_spec.js b/spec/frontend/design_management/pages/index_spec.js index ce6a641c86d..1ddf757eb19 100644 --- a/spec/frontend/design_management/pages/index_spec.js +++ b/spec/frontend/design_management/pages/index_spec.js @@ -197,11 +197,6 @@ describe('Design management index page', () => { }); } - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('designs', () => { it('renders loading icon', () => { createComponent({ loading: true }); diff --git a/spec/frontend/diffs/components/app_spec.js b/spec/frontend/diffs/components/app_spec.js index 14c3ac8b8fe..06995706a2b 100644 --- a/spec/frontend/diffs/components/app_spec.js +++ b/spec/frontend/diffs/components/app_spec.js @@ -393,10 +393,6 @@ describe('diffs/components/app', () => { spy = jest.spyOn(store, 'dispatch'); }); - afterEach(() => { - wrapper.destroy(); - }); - it('jumps to next and previous files in the list', async () => { await nextTick(); diff --git a/spec/frontend/diffs/components/collapsed_files_warning_spec.js b/spec/frontend/diffs/components/collapsed_files_warning_spec.js index eca5b536a35..ae40f6c898d 100644 --- a/spec/frontend/diffs/components/collapsed_files_warning_spec.js +++ b/spec/frontend/diffs/components/collapsed_files_warning_spec.js @@ -45,10 +45,6 @@ describe('CollapsedFilesWarning', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when there is more than one file', () => { it.each` present | dismissed diff --git a/spec/frontend/diffs/components/commit_item_spec.js b/spec/frontend/diffs/components/commit_item_spec.js index 08be3fa2745..4b4b6351d3f 100644 --- a/spec/frontend/diffs/components/commit_item_spec.js +++ b/spec/frontend/diffs/components/commit_item_spec.js @@ -41,11 +41,6 @@ describe('diffs/components/commit_item', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('default state', () => { beforeEach(() => { mountComponent(); diff --git a/spec/frontend/diffs/components/compare_dropdown_layout_spec.js b/spec/frontend/diffs/components/compare_dropdown_layout_spec.js index 09128b04caa..785ff537777 100644 --- a/spec/frontend/diffs/components/compare_dropdown_layout_spec.js +++ b/spec/frontend/diffs/components/compare_dropdown_layout_spec.js @@ -38,11 +38,6 @@ describe('CompareDropdownLayout', () => { isActive: listItem.classes().includes('is-active'), })); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('with versions', () => { beforeEach(() => { const versions = [ diff --git a/spec/frontend/diffs/components/compare_versions_spec.js b/spec/frontend/diffs/components/compare_versions_spec.js index 21f3ee26bf8..23da1a3601b 100644 --- a/spec/frontend/diffs/components/compare_versions_spec.js +++ b/spec/frontend/diffs/components/compare_versions_spec.js @@ -58,11 +58,6 @@ describe('CompareVersions', () => { store.state.diffs.mergeRequestDiffs = diffsMockData; }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('template', () => { beforeEach(() => { createWrapper({}, {}, false); diff --git a/spec/frontend/diffs/components/diff_code_quality_spec.js b/spec/frontend/diffs/components/diff_code_quality_spec.js index 7bd9afab648..e5ca90eb7c8 100644 --- a/spec/frontend/diffs/components/diff_code_quality_spec.js +++ b/spec/frontend/diffs/components/diff_code_quality_spec.js @@ -11,10 +11,6 @@ const findIcon = () => wrapper.findComponent(GlIcon); const findHeading = () => wrapper.findByTestId(`diff-codequality-findings-heading`); describe('DiffCodeQuality', () => { - afterEach(() => { - wrapper.destroy(); - }); - const createWrapper = (codeQuality, mountFunction = mountExtended) => { return mountFunction(DiffCodeQuality, { propsData: { diff --git a/spec/frontend/diffs/components/diff_content_spec.js b/spec/frontend/diffs/components/diff_content_spec.js index 0bce6451ce4..3524973278c 100644 --- a/spec/frontend/diffs/components/diff_content_spec.js +++ b/spec/frontend/diffs/components/diff_content_spec.js @@ -93,11 +93,6 @@ describe('DiffContent', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('with text based files', () => { afterEach(() => { [isParallelViewGetterMock, isInlineViewGetterMock].forEach((m) => m.mockRestore()); diff --git a/spec/frontend/diffs/components/diff_discussion_reply_spec.js b/spec/frontend/diffs/components/diff_discussion_reply_spec.js index bf4a1a1c1f7..348439d6006 100644 --- a/spec/frontend/diffs/components/diff_discussion_reply_spec.js +++ b/spec/frontend/diffs/components/diff_discussion_reply_spec.js @@ -26,10 +26,6 @@ describe('DiffDiscussionReply', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('if user can reply', () => { beforeEach(() => { getters = { diff --git a/spec/frontend/diffs/components/diff_discussions_spec.js b/spec/frontend/diffs/components/diff_discussions_spec.js index 5092ae6ab6e..73d9f2d6d45 100644 --- a/spec/frontend/diffs/components/diff_discussions_spec.js +++ b/spec/frontend/diffs/components/diff_discussions_spec.js @@ -25,10 +25,6 @@ describe('DiffDiscussions', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { it('should have notes list', () => { createComponent(); diff --git a/spec/frontend/diffs/components/diff_file_header_spec.js b/spec/frontend/diffs/components/diff_file_header_spec.js index c23eb2f3d24..4515a8e8926 100644 --- a/spec/frontend/diffs/components/diff_file_header_spec.js +++ b/spec/frontend/diffs/components/diff_file_header_spec.js @@ -72,8 +72,6 @@ describe('DiffFileHeader component', () => { diffHasExpandedDiscussionsResultMock, ...Object.values(mockStoreConfig.modules.diffs.actions), ].forEach((mock) => mock.mockReset()); - - wrapper.destroy(); }); const findHeader = () => wrapper.findComponent({ ref: 'header' }); diff --git a/spec/frontend/diffs/components/diff_file_row_spec.js b/spec/frontend/diffs/components/diff_file_row_spec.js index c5b76551fcc..66ee4e955b8 100644 --- a/spec/frontend/diffs/components/diff_file_row_spec.js +++ b/spec/frontend/diffs/components/diff_file_row_spec.js @@ -13,10 +13,6 @@ describe('Diff File Row component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders file row component', () => { const sharedProps = { level: 4, diff --git a/spec/frontend/diffs/components/diff_file_spec.js b/spec/frontend/diffs/components/diff_file_spec.js index ccfc36f8f16..318427de1ae 100644 --- a/spec/frontend/diffs/components/diff_file_spec.js +++ b/spec/frontend/diffs/components/diff_file_spec.js @@ -129,8 +129,6 @@ describe('DiffFile', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; axiosMock.restore(); }); diff --git a/spec/frontend/diffs/components/diff_gutter_avatars_spec.js b/spec/frontend/diffs/components/diff_gutter_avatars_spec.js index f13988fc11f..5f2b1a81b91 100644 --- a/spec/frontend/diffs/components/diff_gutter_avatars_spec.js +++ b/spec/frontend/diffs/components/diff_gutter_avatars_spec.js @@ -21,10 +21,6 @@ describe('DiffGutterAvatars', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when expanded', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/diffs/components/diff_row_spec.js b/spec/frontend/diffs/components/diff_row_spec.js index a7a95ed2f35..f01c86f781e 100644 --- a/spec/frontend/diffs/components/diff_row_spec.js +++ b/spec/frontend/diffs/components/diff_row_spec.js @@ -89,9 +89,6 @@ describe('DiffRow', () => { }; afterEach(() => { - wrapper.destroy(); - wrapper = null; - window.gon = {}; showCommentForm.mockReset(); enterdragging.mockReset(); diff --git a/spec/frontend/diffs/components/hidden_files_warning_spec.js b/spec/frontend/diffs/components/hidden_files_warning_spec.js index bbd4f5faeec..d9359fb3c7b 100644 --- a/spec/frontend/diffs/components/hidden_files_warning_spec.js +++ b/spec/frontend/diffs/components/hidden_files_warning_spec.js @@ -23,10 +23,6 @@ describe('HiddenFilesWarning', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('has a correct plain diff URL', () => { const plainDiffLink = wrapper.findAllComponents(GlButton).at(0); diff --git a/spec/frontend/diffs/components/image_diff_overlay_spec.js b/spec/frontend/diffs/components/image_diff_overlay_spec.js index ccf942bdcef..18901781587 100644 --- a/spec/frontend/diffs/components/image_diff_overlay_spec.js +++ b/spec/frontend/diffs/components/image_diff_overlay_spec.js @@ -36,10 +36,6 @@ describe('Diffs image diff overlay component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - it('renders comment badges', () => { createComponent(); diff --git a/spec/frontend/diffs/components/merge_conflict_warning_spec.js b/spec/frontend/diffs/components/merge_conflict_warning_spec.js index 4e47249f5b4..715912b361f 100644 --- a/spec/frontend/diffs/components/merge_conflict_warning_spec.js +++ b/spec/frontend/diffs/components/merge_conflict_warning_spec.js @@ -25,10 +25,6 @@ describe('MergeConflictWarning', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it.each` present | resolutionPath ${false} | ${''} diff --git a/spec/frontend/diffs/components/no_changes_spec.js b/spec/frontend/diffs/components/no_changes_spec.js index dbfe9770e07..e637b1dd43d 100644 --- a/spec/frontend/diffs/components/no_changes_spec.js +++ b/spec/frontend/diffs/components/no_changes_spec.js @@ -34,11 +34,6 @@ describe('Diff no changes empty state', () => { store.state.diffs.mergeRequestDiffs = diffsMockData; }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findMessage = () => wrapper.find('[data-testid="no-changes-message"]'); it('prevents XSS', () => { diff --git a/spec/frontend/diffs/components/settings_dropdown_spec.js b/spec/frontend/diffs/components/settings_dropdown_spec.js index 2ec11ba86fd..3d2bbe43746 100644 --- a/spec/frontend/diffs/components/settings_dropdown_spec.js +++ b/spec/frontend/diffs/components/settings_dropdown_spec.js @@ -39,7 +39,6 @@ describe('Diff settings dropdown component', () => { afterEach(() => { store.dispatch.mockRestore(); - wrapper.destroy(); }); describe('tree view buttons', () => { diff --git a/spec/frontend/diffs/components/tree_list_spec.js b/spec/frontend/diffs/components/tree_list_spec.js index 7e6274d7778..87c638d065a 100644 --- a/spec/frontend/diffs/components/tree_list_spec.js +++ b/spec/frontend/diffs/components/tree_list_spec.js @@ -96,10 +96,6 @@ describe('Diffs tree list component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/diffs/store/utils_spec.js b/spec/frontend/diffs/store/utils_spec.js index b5c44b084d8..68bbbdbe176 100644 --- a/spec/frontend/diffs/store/utils_spec.js +++ b/spec/frontend/diffs/store/utils_spec.js @@ -892,4 +892,48 @@ describe('DiffsStoreUtils', () => { expect(files[6].right).toBeNull(); }); }); + + describe('isUrlHashNoteLink', () => { + it.each` + input | bool + ${'#note_12345'} | ${true} + ${'#12345'} | ${false} + ${'note_12345'} | ${true} + ${'12345'} | ${false} + `('returns $bool for $input', ({ bool, input }) => { + expect(utils.isUrlHashNoteLink(input)).toBe(bool); + }); + }); + + describe('isUrlHashFileHeader', () => { + it.each` + input | bool + ${'#diff-content-12345'} | ${true} + ${'#12345'} | ${false} + ${'diff-content-12345'} | ${true} + ${'12345'} | ${false} + `('returns $bool for $input', ({ bool, input }) => { + expect(utils.isUrlHashFileHeader(input)).toBe(bool); + }); + }); + + describe('parseUrlHashAsFileHash', () => { + it.each` + input | currentDiffId | resultId + ${'#note_12345'} | ${'1A2B3C'} | ${'1A2B3C'} + ${'note_12345'} | ${'1A2B3C'} | ${'1A2B3C'} + ${'#note_12345'} | ${undefined} | ${null} + ${'note_12345'} | ${undefined} | ${null} + ${'#diff-content-12345'} | ${undefined} | ${'12345'} + ${'diff-content-12345'} | ${undefined} | ${'12345'} + ${'#diff-content-12345'} | ${'98765'} | ${'12345'} + ${'diff-content-12345'} | ${'98765'} | ${'12345'} + ${'#e334a2a10f036c00151a04cea7938a5d4213a818'} | ${undefined} | ${'e334a2a10f036c00151a04cea7938a5d4213a818'} + ${'e334a2a10f036c00151a04cea7938a5d4213a818'} | ${undefined} | ${'e334a2a10f036c00151a04cea7938a5d4213a818'} + ${'#Z334a2a10f036c00151a04cea7938a5d4213a818'} | ${undefined} | ${null} + ${'Z334a2a10f036c00151a04cea7938a5d4213a818'} | ${undefined} | ${null} + `('returns $resultId for $input and $currentDiffId', ({ input, currentDiffId, resultId }) => { + expect(utils.parseUrlHashAsFileHash(input, currentDiffId)).toBe(resultId); + }); + }); }); diff --git a/spec/frontend/editor/components/source_editor_toolbar_button_spec.js b/spec/frontend/editor/components/source_editor_toolbar_button_spec.js index ff377494312..79692ab4557 100644 --- a/spec/frontend/editor/components/source_editor_toolbar_button_spec.js +++ b/spec/frontend/editor/components/source_editor_toolbar_button_spec.js @@ -21,11 +21,6 @@ describe('Source Editor Toolbar button', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('default', () => { const defaultProps = { category: 'primary', diff --git a/spec/frontend/editor/components/source_editor_toolbar_spec.js b/spec/frontend/editor/components/source_editor_toolbar_spec.js index bead39ca744..132b5739be2 100644 --- a/spec/frontend/editor/components/source_editor_toolbar_spec.js +++ b/spec/frontend/editor/components/source_editor_toolbar_spec.js @@ -40,7 +40,6 @@ describe('Source Editor Toolbar', () => { }; afterEach(() => { - wrapper.destroy(); mockApollo = null; }); diff --git a/spec/frontend/editor/source_editor_webide_ext_spec.js b/spec/frontend/editor/source_editor_webide_ext_spec.js index f418eab668a..7e4079c17f7 100644 --- a/spec/frontend/editor/source_editor_webide_ext_spec.js +++ b/spec/frontend/editor/source_editor_webide_ext_spec.js @@ -13,7 +13,6 @@ describe('Source Editor Web IDE Extension', () => { editorEl = document.getElementById('editor'); editor = new SourceEditor(); }); - afterEach(() => {}); describe('onSetup', () => { it.each` diff --git a/spec/frontend/emoji/components/category_spec.js b/spec/frontend/emoji/components/category_spec.js index 6861059f19c..272c1a09a69 100644 --- a/spec/frontend/emoji/components/category_spec.js +++ b/spec/frontend/emoji/components/category_spec.js @@ -15,10 +15,6 @@ const triggerGlIntersectionObserver = () => { }; describe('Emoji category component', () => { - afterEach(() => { - wrapper.destroy(); - }); - beforeEach(() => { factory({ category: 'Activity', diff --git a/spec/frontend/emoji/components/emoji_group_spec.js b/spec/frontend/emoji/components/emoji_group_spec.js index 1aca2fbb8fc..75397ce25ff 100644 --- a/spec/frontend/emoji/components/emoji_group_spec.js +++ b/spec/frontend/emoji/components/emoji_group_spec.js @@ -15,10 +15,6 @@ function factory(propsData = {}) { } describe('Emoji group component', () => { - afterEach(() => { - wrapper.destroy(); - }); - it('does not render any buttons', () => { factory({ emojis: [], diff --git a/spec/frontend/environments/canary_ingress_spec.js b/spec/frontend/environments/canary_ingress_spec.js index eb3dec27cb6..17ecd93361f 100644 --- a/spec/frontend/environments/canary_ingress_spec.js +++ b/spec/frontend/environments/canary_ingress_spec.js @@ -37,8 +37,6 @@ describe('/environments/components/canary_ingress.vue', () => { if (wrapper) { wrapper.destroy(); } - - wrapper = null; }); describe('stable weight', () => { diff --git a/spec/frontend/environments/canary_update_modal_spec.js b/spec/frontend/environments/canary_update_modal_spec.js index 31b1770da59..7eb2a54a080 100644 --- a/spec/frontend/environments/canary_update_modal_spec.js +++ b/spec/frontend/environments/canary_update_modal_spec.js @@ -34,8 +34,6 @@ describe('/environments/components/canary_update_modal.vue', () => { if (wrapper) { wrapper.destroy(); } - - wrapper = null; }); beforeEach(() => { diff --git a/spec/frontend/environments/edit_environment_spec.js b/spec/frontend/environments/edit_environment_spec.js index 956d68a14f3..34f338fabe6 100644 --- a/spec/frontend/environments/edit_environment_spec.js +++ b/spec/frontend/environments/edit_environment_spec.js @@ -37,7 +37,6 @@ describe('~/environments/components/edit.vue', () => { afterEach(() => { mock.restore(); - wrapper.destroy(); }); const findNameInput = () => wrapper.findByLabelText('Name'); diff --git a/spec/frontend/environments/empty_state_spec.js b/spec/frontend/environments/empty_state_spec.js index 02cf2dc3c68..d067c4c80e0 100644 --- a/spec/frontend/environments/empty_state_spec.js +++ b/spec/frontend/environments/empty_state_spec.js @@ -29,10 +29,6 @@ describe('~/environments/components/empty_state.vue', () => { provide: { newEnvironmentPath: NEW_PATH }, }); - afterEach(() => { - wrapper.destroy(); - }); - it('shows an empty state for available environments', () => { wrapper = createWrapper(); diff --git a/spec/frontend/environments/enable_review_app_modal_spec.js b/spec/frontend/environments/enable_review_app_modal_spec.js index 7939bd600dc..ee728775980 100644 --- a/spec/frontend/environments/enable_review_app_modal_spec.js +++ b/spec/frontend/environments/enable_review_app_modal_spec.js @@ -18,10 +18,6 @@ describe('Enable Review App Modal', () => { const findInstructionAt = (i) => wrapper.findAll('ol li').at(i); const findCopyString = () => wrapper.find(`#${EXPECTED_COPY_PRE_ID}`); - afterEach(() => { - wrapper.destroy(); - }); - describe('renders the modal', () => { beforeEach(() => { wrapper = extendedWrapper( diff --git a/spec/frontend/environments/environment_actions_spec.js b/spec/frontend/environments/environment_actions_spec.js index b79f899b6d4..3c9b4144e45 100644 --- a/spec/frontend/environments/environment_actions_spec.js +++ b/spec/frontend/environments/environment_actions_spec.js @@ -52,7 +52,6 @@ describe('EnvironmentActions Component', () => { }; afterEach(() => { - wrapper.destroy(); confirmAction.mockReset(); }); diff --git a/spec/frontend/environments/environment_form_spec.js b/spec/frontend/environments/environment_form_spec.js index 00401d759f9..50e4e637aa3 100644 --- a/spec/frontend/environments/environment_form_spec.js +++ b/spec/frontend/environments/environment_form_spec.js @@ -25,10 +25,6 @@ describe('~/environments/components/form.vue', () => { }, }); - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { beforeEach(() => { wrapper = createWrapper(); diff --git a/spec/frontend/environments/environment_item_spec.js b/spec/frontend/environments/environment_item_spec.js index dd909cf4473..59e94dfd662 100644 --- a/spec/frontend/environments/environment_item_spec.js +++ b/spec/frontend/environments/environment_item_spec.js @@ -56,10 +56,6 @@ describe('Environment item', () => { findUpcomingDeployment().findComponent(GlAvatarLink); const findUpcomingDeploymentAvatar = () => findUpcomingDeployment().findComponent(GlAvatar); - afterEach(() => { - wrapper.destroy(); - }); - describe('when item is not folder', () => { it('should render environment name', () => { expect(wrapper.find('.environment-name').text()).toContain(environment.name); @@ -390,10 +386,6 @@ describe('Environment item', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should render folder icon and name', () => { expect(wrapper.find('.folder-name').text()).toContain(folder.name); expect(wrapper.find('.folder-icon')).toBeDefined(); diff --git a/spec/frontend/environments/environment_pin_spec.js b/spec/frontend/environments/environment_pin_spec.js index 170036b5b00..2f38dea2833 100644 --- a/spec/frontend/environments/environment_pin_spec.js +++ b/spec/frontend/environments/environment_pin_spec.js @@ -31,10 +31,6 @@ describe('Pin Component', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should render the component with descriptive text', () => { expect(wrapper.text()).toBe('Prevent auto-stopping'); }); @@ -64,10 +60,6 @@ describe('Pin Component', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should render the component with descriptive text', () => { expect(wrapper.text()).toBe('Prevent auto-stopping'); }); diff --git a/spec/frontend/environments/environment_table_spec.js b/spec/frontend/environments/environment_table_spec.js index a86cfdd56ba..652b0f807fe 100644 --- a/spec/frontend/environments/environment_table_spec.js +++ b/spec/frontend/environments/environment_table_spec.js @@ -34,10 +34,6 @@ describe('Environment table', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('Should render a table', async () => { const mockItem = { name: 'review', diff --git a/spec/frontend/environments/environments_app_spec.js b/spec/frontend/environments/environments_app_spec.js index 986ecca4e84..a843f801da5 100644 --- a/spec/frontend/environments/environments_app_spec.js +++ b/spec/frontend/environments/environments_app_spec.js @@ -96,10 +96,6 @@ describe('~/environments/components/environments_app.vue', () => { paginationMock = jest.fn(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should request available environments if the scope is invalid', async () => { await createWrapperWithMocked({ environmentsApp: resolvedEnvironmentsApp, diff --git a/spec/frontend/environments/environments_detail_header_spec.js b/spec/frontend/environments/environments_detail_header_spec.js index 0b5f076ba9f..8574743919f 100644 --- a/spec/frontend/environments/environments_detail_header_spec.js +++ b/spec/frontend/environments/environments_detail_header_spec.js @@ -59,10 +59,6 @@ describe('Environments detail header component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('default state with minimal access', () => { beforeEach(() => { createWrapper({ props: { environment: createEnvironment({ externalUrl: null }) } }); diff --git a/spec/frontend/environments/environments_folder_view_spec.js b/spec/frontend/environments/environments_folder_view_spec.js index a87060f83d8..75fb3a31120 100644 --- a/spec/frontend/environments/environments_folder_view_spec.js +++ b/spec/frontend/environments/environments_folder_view_spec.js @@ -24,7 +24,6 @@ describe('Environments Folder View', () => { afterEach(() => { mock.restore(); - wrapper.destroy(); }); describe('successful request', () => { diff --git a/spec/frontend/environments/new_environment_spec.js b/spec/frontend/environments/new_environment_spec.js index 257bf76baba..743f4ad6786 100644 --- a/spec/frontend/environments/new_environment_spec.js +++ b/spec/frontend/environments/new_environment_spec.js @@ -41,7 +41,6 @@ describe('~/environments/components/new.vue', () => { afterEach(() => { mock.restore(); - wrapper.destroy(); }); const showsLoading = () => wrapper.findComponent(GlLoadingIcon).exists(); diff --git a/spec/frontend/environments/stop_stale_environments_modal_spec.js b/spec/frontend/environments/stop_stale_environments_modal_spec.js index a2ab4f707b5..eddab696439 100644 --- a/spec/frontend/environments/stop_stale_environments_modal_spec.js +++ b/spec/frontend/environments/stop_stale_environments_modal_spec.js @@ -39,7 +39,6 @@ describe('~/environments/components/stop_stale_environments_modal.vue', () => { afterEach(() => { mock.restore(); - wrapper.destroy(); jest.resetAllMocks(); window.gon = originalGon; }); diff --git a/spec/frontend/experimentation/components/gitlab_experiment_spec.js b/spec/frontend/experimentation/components/gitlab_experiment_spec.js index f52ebf0f3c4..54289acc2dc 100644 --- a/spec/frontend/experimentation/components/gitlab_experiment_spec.js +++ b/spec/frontend/experimentation/components/gitlab_experiment_spec.js @@ -21,8 +21,6 @@ describe('ExperimentComponent', () => { }; afterEach(() => { - wrapper.destroy(); - wrapper = null; window.gon = oldGon; }); diff --git a/spec/frontend/feature_flags/components/configure_feature_flags_modal_spec.js b/spec/frontend/feature_flags/components/configure_feature_flags_modal_spec.js index c1051a14a08..4851e03f713 100644 --- a/spec/frontend/feature_flags/components/configure_feature_flags_modal_spec.js +++ b/spec/frontend/feature_flags/components/configure_feature_flags_modal_spec.js @@ -42,7 +42,6 @@ describe('Configure Feature Flags Modal', () => { wrapper.findAllComponents(GlAlert).filter((c) => c.props('variant') === 'danger'); describe('idle', () => { - afterEach(() => wrapper.destroy()); beforeEach(factory); it('should have Primary and Secondary actions', () => { @@ -112,7 +111,6 @@ describe('Configure Feature Flags Modal', () => { }); describe('verified', () => { - afterEach(() => wrapper.destroy()); beforeEach(factory); it('should enable the secondary action', async () => { @@ -124,7 +122,6 @@ describe('Configure Feature Flags Modal', () => { }); describe('cannot rotate token', () => { - afterEach(() => wrapper.destroy()); beforeEach(factory.bind(null, { canUserRotateToken: false })); it('should not display the primary action', () => { @@ -141,7 +138,6 @@ describe('Configure Feature Flags Modal', () => { }); describe('has rotate error', () => { - afterEach(() => wrapper.destroy()); beforeEach(() => { factory({ hasRotateError: true }); }); @@ -153,7 +149,6 @@ describe('Configure Feature Flags Modal', () => { }); describe('is rotating', () => { - afterEach(() => wrapper.destroy()); beforeEach(factory.bind(null, { isRotating: true })); it('should disable the project name input', async () => { diff --git a/spec/frontend/feature_flags/components/edit_feature_flag_spec.js b/spec/frontend/feature_flags/components/edit_feature_flag_spec.js index cf4605e21ea..c26fd80865d 100644 --- a/spec/frontend/feature_flags/components/edit_feature_flag_spec.js +++ b/spec/frontend/feature_flags/components/edit_feature_flag_spec.js @@ -53,7 +53,6 @@ describe('Edit feature flag form', () => { }); afterEach(() => { - wrapper.destroy(); mock.restore(); }); diff --git a/spec/frontend/feature_flags/components/empty_state_spec.js b/spec/frontend/feature_flags/components/empty_state_spec.js index e3cc6f703c4..d983332f7c1 100644 --- a/spec/frontend/feature_flags/components/empty_state_spec.js +++ b/spec/frontend/feature_flags/components/empty_state_spec.js @@ -48,8 +48,6 @@ describe('feature_flags/components/feature_flags_tab.vue', () => { if (wrapper?.destroy) { wrapper.destroy(); } - - wrapper = null; }); describe('alerts', () => { diff --git a/spec/frontend/feature_flags/components/environments_dropdown_spec.js b/spec/frontend/feature_flags/components/environments_dropdown_spec.js index a4738fed37e..9fc0119a6c8 100644 --- a/spec/frontend/feature_flags/components/environments_dropdown_spec.js +++ b/spec/frontend/feature_flags/components/environments_dropdown_spec.js @@ -27,7 +27,6 @@ describe('Feature flags > Environments dropdown', () => { const findDropdownMenu = () => wrapper.find('.dropdown-menu'); afterEach(() => { - wrapper.destroy(); mock.restore(); }); diff --git a/spec/frontend/feature_flags/components/feature_flags_spec.js b/spec/frontend/feature_flags/components/feature_flags_spec.js index e80f9c559c4..23e86d0eb2f 100644 --- a/spec/frontend/feature_flags/components/feature_flags_spec.js +++ b/spec/frontend/feature_flags/components/feature_flags_spec.js @@ -65,8 +65,6 @@ describe('Feature flags', () => { afterEach(() => { mock.restore(); - wrapper.destroy(); - wrapper = null; }); describe('when limit exceeded', () => { diff --git a/spec/frontend/feature_flags/components/form_spec.js b/spec/frontend/feature_flags/components/form_spec.js index 7dd7c709c94..f66e25698e6 100644 --- a/spec/frontend/feature_flags/components/form_spec.js +++ b/spec/frontend/feature_flags/components/form_spec.js @@ -42,10 +42,6 @@ describe('feature flag form', () => { Api.fetchFeatureFlagUserLists.mockResolvedValue({ data: [] }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should render provided submitText', () => { factory(requiredProps); diff --git a/spec/frontend/feature_flags/components/new_feature_flag_spec.js b/spec/frontend/feature_flags/components/new_feature_flag_spec.js index 300d0e47082..46c9118cbd9 100644 --- a/spec/frontend/feature_flags/components/new_feature_flag_spec.js +++ b/spec/frontend/feature_flags/components/new_feature_flag_spec.js @@ -46,10 +46,6 @@ describe('New feature flag form', () => { factory(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('with error', () => { it('should render the error', async () => { store.dispatch('receiveCreateFeatureFlagError', { message: ['The name is required'] }); diff --git a/spec/frontend/feature_flags/components/strategies/flexible_rollout_spec.js b/spec/frontend/feature_flags/components/strategies/flexible_rollout_spec.js index 70a9156b5a9..5feaf094701 100644 --- a/spec/frontend/feature_flags/components/strategies/flexible_rollout_spec.js +++ b/spec/frontend/feature_flags/components/strategies/flexible_rollout_spec.js @@ -24,8 +24,6 @@ describe('feature_flags/components/strategies/flexible_rollout.vue', () => { if (wrapper?.destroy) { wrapper.destroy(); } - - wrapper = null; }); describe('with valid percentage', () => { diff --git a/spec/frontend/feature_flags/components/strategies/parameter_form_group_spec.js b/spec/frontend/feature_flags/components/strategies/parameter_form_group_spec.js index 23ad0d3a08d..365f1e534b5 100644 --- a/spec/frontend/feature_flags/components/strategies/parameter_form_group_spec.js +++ b/spec/frontend/feature_flags/components/strategies/parameter_form_group_spec.js @@ -28,8 +28,6 @@ describe('~/feature_flags/strategies/parameter_form_group.vue', () => { if (wrapper?.destroy) { wrapper.destroy(); } - - wrapper = null; }); it('should display the default slot', () => { diff --git a/spec/frontend/feature_flags/components/strategies/percent_rollout_spec.js b/spec/frontend/feature_flags/components/strategies/percent_rollout_spec.js index cb422a018f9..b20061c12a2 100644 --- a/spec/frontend/feature_flags/components/strategies/percent_rollout_spec.js +++ b/spec/frontend/feature_flags/components/strategies/percent_rollout_spec.js @@ -22,8 +22,6 @@ describe('~/feature_flags/components/strategies/percent_rollout.vue', () => { if (wrapper?.destroy) { wrapper.destroy(); } - - wrapper = null; }); describe('with valid percentage', () => { diff --git a/spec/frontend/feature_flags/components/strategies/users_with_id_spec.js b/spec/frontend/feature_flags/components/strategies/users_with_id_spec.js index 0a72714c22a..ae489f3a6e6 100644 --- a/spec/frontend/feature_flags/components/strategies/users_with_id_spec.js +++ b/spec/frontend/feature_flags/components/strategies/users_with_id_spec.js @@ -22,8 +22,6 @@ describe('~/feature_flags/components/users_with_id.vue', () => { if (wrapper?.destroy) { wrapper.destroy(); } - - wrapper = null; }); it('should display the current value of the parameters', () => { diff --git a/spec/frontend/feature_flags/components/strategy_parameters_spec.js b/spec/frontend/feature_flags/components/strategy_parameters_spec.js index d0f1f7d0e2a..cd8270f1801 100644 --- a/spec/frontend/feature_flags/components/strategy_parameters_spec.js +++ b/spec/frontend/feature_flags/components/strategy_parameters_spec.js @@ -32,8 +32,6 @@ describe('~/feature_flags/components/strategy_parameters.vue', () => { if (wrapper?.destroy) { wrapper.destroy(); } - - wrapper = null; }); describe.each` diff --git a/spec/frontend/feature_highlight/feature_highlight_popover_spec.js b/spec/frontend/feature_highlight/feature_highlight_popover_spec.js index 650f9eb1bbc..66ea22cece3 100644 --- a/spec/frontend/feature_highlight/feature_highlight_popover_spec.js +++ b/spec/frontend/feature_highlight/feature_highlight_popover_spec.js @@ -29,11 +29,6 @@ describe('feature_highlight/feature_highlight_popover', () => { buildWrapper(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders popover target', () => { expect(findPopoverTarget().exists()).toBe(true); }); diff --git a/spec/frontend/filtered_search/components/recent_searches_dropdown_content_spec.js b/spec/frontend/filtered_search/components/recent_searches_dropdown_content_spec.js index ebed477fa2f..5f0e928e1fe 100644 --- a/spec/frontend/filtered_search/components/recent_searches_dropdown_content_spec.js +++ b/spec/frontend/filtered_search/components/recent_searches_dropdown_content_spec.js @@ -22,11 +22,6 @@ describe('Recent Searches Dropdown Content', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when local storage is not available', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/frequent_items/components/app_spec.js b/spec/frontend/frequent_items/components/app_spec.js index e1890555de0..4f5788dcb77 100644 --- a/spec/frontend/frequent_items/components/app_spec.js +++ b/spec/frontend/frequent_items/components/app_spec.js @@ -69,7 +69,6 @@ describe('Frequent Items App Component', () => { afterEach(() => { mock.restore(); - wrapper.destroy(); }); describe('default', () => { diff --git a/spec/frontend/frequent_items/components/frequent_items_list_item_spec.js b/spec/frontend/frequent_items/components/frequent_items_list_item_spec.js index c54a2a1d039..7c8592fdf0c 100644 --- a/spec/frontend/frequent_items/components/frequent_items_list_item_spec.js +++ b/spec/frontend/frequent_items/components/frequent_items_list_item_spec.js @@ -59,8 +59,6 @@ describe('FrequentItemsListItemComponent', () => { afterEach(() => { unmockTracking(); - wrapper.destroy(); - wrapper = null; }); describe('computed', () => { diff --git a/spec/frontend/frequent_items/components/frequent_items_list_spec.js b/spec/frontend/frequent_items/components/frequent_items_list_spec.js index d024925f62b..87f8e131b77 100644 --- a/spec/frontend/frequent_items/components/frequent_items_list_spec.js +++ b/spec/frontend/frequent_items/components/frequent_items_list_spec.js @@ -29,10 +29,6 @@ describe('FrequentItemsListComponent', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('computed', () => { describe('isListEmpty', () => { it('should return `true` or `false` representing whether if `items` is empty or not with projects', async () => { diff --git a/spec/frontend/gitlab_pages/new/pages/pages_pipeline_wizard_spec.js b/spec/frontend/gitlab_pages/new/pages/pages_pipeline_wizard_spec.js index 685b5144a95..b1adc3f794a 100644 --- a/spec/frontend/gitlab_pages/new/pages/pages_pipeline_wizard_spec.js +++ b/spec/frontend/gitlab_pages/new/pages/pages_pipeline_wizard_spec.js @@ -50,10 +50,6 @@ describe('PagesPipelineWizard', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('shows the pipeline wizard', () => { expect(findPipelineWizardWrapper().exists()).toBe(true); }); diff --git a/spec/frontend/gitlab_version_check/components/gitlab_version_check_badge_spec.js b/spec/frontend/gitlab_version_check/components/gitlab_version_check_badge_spec.js index 949bcf71ff5..e87f7e950cd 100644 --- a/spec/frontend/gitlab_version_check/components/gitlab_version_check_badge_spec.js +++ b/spec/frontend/gitlab_version_check/components/gitlab_version_check_badge_spec.js @@ -25,7 +25,6 @@ describe('GitlabVersionCheckBadge', () => { afterEach(() => { unmockTracking(); - wrapper.destroy(); }); const findGlBadgeClickWrapper = () => wrapper.findByTestId('badge-click-wrapper'); diff --git a/spec/frontend/google_cloud/components/google_cloud_menu_spec.js b/spec/frontend/google_cloud/components/google_cloud_menu_spec.js index 4809ea37045..a0c988830ed 100644 --- a/spec/frontend/google_cloud/components/google_cloud_menu_spec.js +++ b/spec/frontend/google_cloud/components/google_cloud_menu_spec.js @@ -15,10 +15,6 @@ describe('google_cloud/components/google_cloud_menu', () => { wrapper = mountExtended(GoogleCloudMenu, { propsData: props }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('contains active configuration link', () => { const link = wrapper.findByTestId('configurationLink'); expect(link.text()).toBe(GoogleCloudMenu.i18n.configuration.title); diff --git a/spec/frontend/google_cloud/components/incubation_banner_spec.js b/spec/frontend/google_cloud/components/incubation_banner_spec.js index 09a4d92dca2..92bc39bdff9 100644 --- a/spec/frontend/google_cloud/components/incubation_banner_spec.js +++ b/spec/frontend/google_cloud/components/incubation_banner_spec.js @@ -15,10 +15,6 @@ describe('google_cloud/components/incubation_banner', () => { wrapper = mount(IncubationBanner); }); - afterEach(() => { - wrapper.destroy(); - }); - it('contains alert', () => { expect(findAlert().exists()).toBe(true); }); diff --git a/spec/frontend/google_cloud/components/revoke_oauth_spec.js b/spec/frontend/google_cloud/components/revoke_oauth_spec.js index faaec07fc35..2b39bb9ca74 100644 --- a/spec/frontend/google_cloud/components/revoke_oauth_spec.js +++ b/spec/frontend/google_cloud/components/revoke_oauth_spec.js @@ -20,10 +20,6 @@ describe('google_cloud/components/revoke_oauth', () => { wrapper = shallowMount(RevokeOauth, { propsData }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('contains title', () => { const title = findTitle(); expect(title.text()).toContain('Revoke authorizations'); diff --git a/spec/frontend/google_cloud/configuration/panel_spec.js b/spec/frontend/google_cloud/configuration/panel_spec.js index 79eb4cb4918..dd85b4c90a7 100644 --- a/spec/frontend/google_cloud/configuration/panel_spec.js +++ b/spec/frontend/google_cloud/configuration/panel_spec.js @@ -25,10 +25,6 @@ describe('google_cloud/configuration/panel', () => { wrapper = shallowMountExtended(Panel, { propsData: props }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('contains incubation banner', () => { const target = wrapper.findComponent(IncubationBanner); expect(target.exists()).toBe(true); diff --git a/spec/frontend/google_cloud/databases/cloudsql/create_instance_form_spec.js b/spec/frontend/google_cloud/databases/cloudsql/create_instance_form_spec.js index 48e4b0ca1ad..6e2d3147a54 100644 --- a/spec/frontend/google_cloud/databases/cloudsql/create_instance_form_spec.js +++ b/spec/frontend/google_cloud/databases/cloudsql/create_instance_form_spec.js @@ -25,10 +25,6 @@ describe('google_cloud/databases/cloudsql/create_instance_form', () => { wrapper = shallowMountExtended(InstanceForm, { propsData, stubs: { GlFormCheckbox } }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('contains header', () => { expect(findHeader().exists()).toBe(true); }); diff --git a/spec/frontend/google_cloud/databases/cloudsql/instance_table_spec.js b/spec/frontend/google_cloud/databases/cloudsql/instance_table_spec.js index a5736d0a524..a2ee75f9fbf 100644 --- a/spec/frontend/google_cloud/databases/cloudsql/instance_table_spec.js +++ b/spec/frontend/google_cloud/databases/cloudsql/instance_table_spec.js @@ -8,10 +8,6 @@ describe('google_cloud/databases/cloudsql/instance_table', () => { const findEmptyState = () => wrapper.findComponent(GlEmptyState); const findTable = () => wrapper.findComponent(GlTable); - afterEach(() => { - wrapper.destroy(); - }); - describe('when there are no instances', () => { beforeEach(() => { const propsData = { diff --git a/spec/frontend/google_cloud/databases/panel_spec.js b/spec/frontend/google_cloud/databases/panel_spec.js index e6a0d74f348..779258bbdbb 100644 --- a/spec/frontend/google_cloud/databases/panel_spec.js +++ b/spec/frontend/google_cloud/databases/panel_spec.js @@ -23,10 +23,6 @@ describe('google_cloud/databases/panel', () => { wrapper = shallowMountExtended(Panel, { propsData: props }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('contains incubation banner', () => { const target = wrapper.findComponent(IncubationBanner); expect(target.exists()).toBe(true); diff --git a/spec/frontend/google_cloud/databases/service_table_spec.js b/spec/frontend/google_cloud/databases/service_table_spec.js index 4a622e544e1..4594e1758ad 100644 --- a/spec/frontend/google_cloud/databases/service_table_spec.js +++ b/spec/frontend/google_cloud/databases/service_table_spec.js @@ -19,10 +19,6 @@ describe('google_cloud/databases/service_table', () => { wrapper = mountExtended(ServiceTable, { propsData }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should contain a table', () => { expect(findTable().exists()).toBe(true); }); diff --git a/spec/frontend/google_cloud/deployments/panel_spec.js b/spec/frontend/google_cloud/deployments/panel_spec.js index 729db1707a7..0748d8f9377 100644 --- a/spec/frontend/google_cloud/deployments/panel_spec.js +++ b/spec/frontend/google_cloud/deployments/panel_spec.js @@ -19,10 +19,6 @@ describe('google_cloud/deployments/panel', () => { wrapper = shallowMountExtended(Panel, { propsData: props }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('contains incubation banner', () => { const target = wrapper.findComponent(IncubationBanner); expect(target.exists()).toBe(true); diff --git a/spec/frontend/google_cloud/deployments/service_table_spec.js b/spec/frontend/google_cloud/deployments/service_table_spec.js index 8faad64e313..49220a6007e 100644 --- a/spec/frontend/google_cloud/deployments/service_table_spec.js +++ b/spec/frontend/google_cloud/deployments/service_table_spec.js @@ -18,10 +18,6 @@ describe('google_cloud/deployments/service_table', () => { wrapper = mount(DeploymentsServiceTable, { propsData }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should contain a table', () => { expect(findTable().exists()).toBe(true); }); diff --git a/spec/frontend/google_cloud/gcp_regions/form_spec.js b/spec/frontend/google_cloud/gcp_regions/form_spec.js index 1030e9c8a18..be37ff092f0 100644 --- a/spec/frontend/google_cloud/gcp_regions/form_spec.js +++ b/spec/frontend/google_cloud/gcp_regions/form_spec.js @@ -16,10 +16,6 @@ describe('google_cloud/gcp_regions/form', () => { wrapper = shallowMount(GcpRegionsForm, { propsData }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('contains header', () => { expect(findHeader().exists()).toBe(true); }); diff --git a/spec/frontend/google_cloud/gcp_regions/list_spec.js b/spec/frontend/google_cloud/gcp_regions/list_spec.js index 6d8c389e5a1..74a54b93183 100644 --- a/spec/frontend/google_cloud/gcp_regions/list_spec.js +++ b/spec/frontend/google_cloud/gcp_regions/list_spec.js @@ -18,10 +18,6 @@ describe('google_cloud/gcp_regions/list', () => { wrapper = mount(GcpRegionsList, { propsData }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('shows the empty state component', () => { expect(findEmptyState().exists()).toBe(true); }); diff --git a/spec/frontend/google_cloud/service_accounts/form_spec.js b/spec/frontend/google_cloud/service_accounts/form_spec.js index 8be481774fa..c86c8876b15 100644 --- a/spec/frontend/google_cloud/service_accounts/form_spec.js +++ b/spec/frontend/google_cloud/service_accounts/form_spec.js @@ -17,10 +17,6 @@ describe('google_cloud/service_accounts/form', () => { wrapper = shallowMount(ServiceAccountsForm, { propsData, stubs: { GlFormCheckbox } }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('contains header', () => { expect(findHeader().exists()).toBe(true); }); diff --git a/spec/frontend/google_cloud/service_accounts/list_spec.js b/spec/frontend/google_cloud/service_accounts/list_spec.js index c2bd2005b5d..ae5776081d7 100644 --- a/spec/frontend/google_cloud/service_accounts/list_spec.js +++ b/spec/frontend/google_cloud/service_accounts/list_spec.js @@ -18,10 +18,6 @@ describe('google_cloud/service_accounts/list', () => { wrapper = mount(ServiceAccountsList, { propsData }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('shows the empty state component', () => { expect(findEmptyState().exists()).toBe(true); }); diff --git a/spec/frontend/group_settings/components/shared_runners_form_spec.js b/spec/frontend/group_settings/components/shared_runners_form_spec.js index 85475c749b0..e92493315f7 100644 --- a/spec/frontend/group_settings/components/shared_runners_form_spec.js +++ b/spec/frontend/group_settings/components/shared_runners_form_spec.js @@ -45,9 +45,6 @@ describe('group_settings/components/shared_runners_form', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; - updateGroup.mockReset(); }); diff --git a/spec/frontend/groups/components/app_spec.js b/spec/frontend/groups/components/app_spec.js index ec397cc44f9..98868de8475 100644 --- a/spec/frontend/groups/components/app_spec.js +++ b/spec/frontend/groups/components/app_spec.js @@ -65,11 +65,6 @@ describe('AppComponent', () => { vm = wrapper.vm; }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - beforeEach(async () => { mock = new AxiosMockAdapter(axios); mock.onGet('/dashboard/groups.json').reply(HTTP_STATUS_OK, mockGroups); diff --git a/spec/frontend/groups/components/empty_states/subgroups_and_projects_empty_state_spec.js b/spec/frontend/groups/components/empty_states/subgroups_and_projects_empty_state_spec.js index 75edc602fbf..dc4271b98ee 100644 --- a/spec/frontend/groups/components/empty_states/subgroups_and_projects_empty_state_spec.js +++ b/spec/frontend/groups/components/empty_states/subgroups_and_projects_empty_state_spec.js @@ -24,10 +24,6 @@ const createComponent = ({ provide = {} } = {}) => { }); }; -afterEach(() => { - wrapper.destroy(); -}); - const findNewSubgroupLink = () => wrapper.findByRole('link', { name: new RegExp(SubgroupsAndProjectsEmptyState.i18n.withLinks.subgroup.title), diff --git a/spec/frontend/groups/components/group_folder_spec.js b/spec/frontend/groups/components/group_folder_spec.js index f223333360d..da31fb02f69 100644 --- a/spec/frontend/groups/components/group_folder_spec.js +++ b/spec/frontend/groups/components/group_folder_spec.js @@ -20,10 +20,6 @@ describe('GroupFolder component', () => { }, }); - afterEach(() => { - wrapper.destroy(); - }); - it('does not render more children stats link when children count of group is under limit', () => { wrapper = createComponent(); diff --git a/spec/frontend/groups/components/group_item_spec.js b/spec/frontend/groups/components/group_item_spec.js index 4570aa33a6c..663dd341a58 100644 --- a/spec/frontend/groups/components/group_item_spec.js +++ b/spec/frontend/groups/components/group_item_spec.js @@ -37,10 +37,6 @@ describe('GroupItemComponent', () => { return waitForPromises(); }); - afterEach(() => { - wrapper.destroy(); - }); - const withMicrodata = (group) => ({ ...group, microdata: getGroupItemMicrodata(group), diff --git a/spec/frontend/groups/components/groups_spec.js b/spec/frontend/groups/components/groups_spec.js index cae29a8f15a..9ee785d688a 100644 --- a/spec/frontend/groups/components/groups_spec.js +++ b/spec/frontend/groups/components/groups_spec.js @@ -37,10 +37,6 @@ describe('GroupsComponent', () => { Vue.component('GroupItem', GroupItemComponent); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('methods', () => { describe('change', () => { it('should emit `fetchPage` event when page is changed via pagination', () => { diff --git a/spec/frontend/groups/components/invite_members_banner_spec.js b/spec/frontend/groups/components/invite_members_banner_spec.js index 8975107f422..c4bc35dcd57 100644 --- a/spec/frontend/groups/components/invite_members_banner_spec.js +++ b/spec/frontend/groups/components/invite_members_banner_spec.js @@ -42,8 +42,6 @@ describe('InviteMembersBanner', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; mockAxios.restore(); unmockTracking(); }); diff --git a/spec/frontend/groups/components/item_actions_spec.js b/spec/frontend/groups/components/item_actions_spec.js index 3ceb038dd3c..fac6fb77709 100644 --- a/spec/frontend/groups/components/item_actions_spec.js +++ b/spec/frontend/groups/components/item_actions_spec.js @@ -18,11 +18,6 @@ describe('ItemActions', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findEditGroupBtn = () => wrapper.findByTestId(`edit-group-${mockParentGroupItem.id}-btn`); const findLeaveGroupBtn = () => wrapper.findByTestId(`leave-group-${mockParentGroupItem.id}-btn`); const findRemoveGroupBtn = () => diff --git a/spec/frontend/groups/components/new_top_level_group_alert_spec.js b/spec/frontend/groups/components/new_top_level_group_alert_spec.js index db9a5c7b16b..060663747e4 100644 --- a/spec/frontend/groups/components/new_top_level_group_alert_spec.js +++ b/spec/frontend/groups/components/new_top_level_group_alert_spec.js @@ -30,10 +30,6 @@ describe('NewTopLevelGroupAlert', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('when the component is created', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/groups/components/overview_tabs_spec.js b/spec/frontend/groups/components/overview_tabs_spec.js index d1ae2c4be17..906609c97f9 100644 --- a/spec/frontend/groups/components/overview_tabs_spec.js +++ b/spec/frontend/groups/components/overview_tabs_spec.js @@ -76,7 +76,6 @@ describe('OverviewTabs', () => { }); afterEach(() => { - wrapper.destroy(); axiosMock.restore(); }); diff --git a/spec/frontend/groups/components/transfer_group_form_spec.js b/spec/frontend/groups/components/transfer_group_form_spec.js index 0065820f78f..fd0c3907e04 100644 --- a/spec/frontend/groups/components/transfer_group_form_spec.js +++ b/spec/frontend/groups/components/transfer_group_form_spec.js @@ -48,10 +48,6 @@ describe('Transfer group form', () => { const findTransferLocations = () => wrapper.findComponent(TransferLocations); const findHiddenInput = () => wrapper.find('[name="new_parent_group_id"]'); - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/groups_projects/components/transfer_locations_spec.js b/spec/frontend/groups_projects/components/transfer_locations_spec.js index 77c0966ba1e..86913bb4c09 100644 --- a/spec/frontend/groups_projects/components/transfer_locations_spec.js +++ b/spec/frontend/groups_projects/components/transfer_locations_spec.js @@ -109,10 +109,6 @@ describe('TransferLocations', () => { const intersectionObserverEmitAppear = () => findIntersectionObserver().vm.$emit('appear'); const findLoadingIcon = () => wrapper.findComponent(GlLoadingIcon); - afterEach(() => { - wrapper.destroy(); - }); - describe('when `GlDropdown` is opened', () => { it('shows loading icon', async () => { getTransferLocations.mockReturnValueOnce(new Promise(() => {})); diff --git a/spec/frontend/header_search/components/app_spec.js b/spec/frontend/header_search/components/app_spec.js index d6263c663d2..8adc108d38a 100644 --- a/spec/frontend/header_search/components/app_spec.js +++ b/spec/frontend/header_search/components/app_spec.js @@ -80,10 +80,6 @@ describe('HeaderSearchApp', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - const findHeaderSearchForm = () => wrapper.findByTestId('header-search-form'); const findHeaderSearchInput = () => wrapper.findComponent(GlSearchBoxByType); const findScopeToken = () => wrapper.findComponent(GlToken); diff --git a/spec/frontend/header_search/components/header_search_autocomplete_items_spec.js b/spec/frontend/header_search/components/header_search_autocomplete_items_spec.js index 7952661e2d2..06dfe1ff29b 100644 --- a/spec/frontend/header_search/components/header_search_autocomplete_items_spec.js +++ b/spec/frontend/header_search/components/header_search_autocomplete_items_spec.js @@ -46,10 +46,6 @@ describe('HeaderSearchAutocompleteItems', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findDropdownItems = () => wrapper.findAllComponents(GlDropdownItem); const findGlDropdownDividers = () => wrapper.findAllComponents(GlDropdownDivider); const findFirstDropdownItem = () => findDropdownItems().at(0); diff --git a/spec/frontend/header_search/components/header_search_default_items_spec.js b/spec/frontend/header_search/components/header_search_default_items_spec.js index abcacc487df..3768862d83e 100644 --- a/spec/frontend/header_search/components/header_search_default_items_spec.js +++ b/spec/frontend/header_search/components/header_search_default_items_spec.js @@ -29,10 +29,6 @@ describe('HeaderSearchDefaultItems', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findDropdownHeader = () => wrapper.findComponent(GlDropdownSectionHeader); const findDropdownItems = () => wrapper.findAllComponents(GlDropdownItem); const findFirstDropdownItem = () => findDropdownItems().at(0); diff --git a/spec/frontend/header_search/components/header_search_scoped_items_spec.js b/spec/frontend/header_search/components/header_search_scoped_items_spec.js index 2db9f71d702..18ea927a78c 100644 --- a/spec/frontend/header_search/components/header_search_scoped_items_spec.js +++ b/spec/frontend/header_search/components/header_search_scoped_items_spec.js @@ -38,10 +38,6 @@ describe('HeaderSearchScopedItems', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findDropdownItems = () => wrapper.findAllComponents(GlDropdownItem); const findFirstDropdownItem = () => findDropdownItems().at(0); const findDropdownItemTitles = () => findDropdownItems().wrappers.map((w) => trimText(w.text())); diff --git a/spec/frontend/ide/components/activity_bar_spec.js b/spec/frontend/ide/components/activity_bar_spec.js index a97e883a8bf..ff04f9a84f1 100644 --- a/spec/frontend/ide/components/activity_bar_spec.js +++ b/spec/frontend/ide/components/activity_bar_spec.js @@ -22,10 +22,6 @@ describe('IDE ActivityBar component', () => { wrapper = shallowMount(ActivityBar, { store }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('updateActivityBarView', () => { beforeEach(() => { mountComponent(); diff --git a/spec/frontend/ide/components/branches/item_spec.js b/spec/frontend/ide/components/branches/item_spec.js index 3dbd1210916..4cae146cbd2 100644 --- a/spec/frontend/ide/components/branches/item_spec.js +++ b/spec/frontend/ide/components/branches/item_spec.js @@ -34,10 +34,6 @@ describe('IDE branch item', () => { router = createRouter(store); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('if not active', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/ide/components/branches/search_list_spec.js b/spec/frontend/ide/components/branches/search_list_spec.js index bbde45d700f..eeab26f7559 100644 --- a/spec/frontend/ide/components/branches/search_list_spec.js +++ b/spec/frontend/ide/components/branches/search_list_spec.js @@ -35,11 +35,6 @@ describe('IDE branches search list', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('calls fetch on mounted', () => { createComponent(); expect(fetchBranchesMock).toHaveBeenCalled(); diff --git a/spec/frontend/ide/components/cannot_push_code_alert_spec.js b/spec/frontend/ide/components/cannot_push_code_alert_spec.js index ff659ecdf3f..d4db2246008 100644 --- a/spec/frontend/ide/components/cannot_push_code_alert_spec.js +++ b/spec/frontend/ide/components/cannot_push_code_alert_spec.js @@ -10,10 +10,6 @@ const TEST_BUTTON_TEXT = 'Fork text'; describe('ide/components/cannot_push_code_alert', () => { let wrapper; - afterEach(() => { - wrapper.destroy(); - }); - const createComponent = (props = {}) => { wrapper = shallowMount(CannotPushCodeAlert, { propsData: { diff --git a/spec/frontend/ide/components/commit_sidebar/actions_spec.js b/spec/frontend/ide/components/commit_sidebar/actions_spec.js index dc103fec5d0..019469cbf87 100644 --- a/spec/frontend/ide/components/commit_sidebar/actions_spec.js +++ b/spec/frontend/ide/components/commit_sidebar/actions_spec.js @@ -46,10 +46,6 @@ describe('IDE commit sidebar actions', () => { jest.spyOn(store, 'dispatch').mockImplementation(() => {}); }); - afterEach(() => { - wrapper.destroy(); - }); - const findText = () => wrapper.text(); const findRadios = () => wrapper.findAll('input[type="radio"]'); diff --git a/spec/frontend/ide/components/commit_sidebar/empty_state_spec.js b/spec/frontend/ide/components/commit_sidebar/empty_state_spec.js index 7c48c0e6f95..4a6aafe42ae 100644 --- a/spec/frontend/ide/components/commit_sidebar/empty_state_spec.js +++ b/spec/frontend/ide/components/commit_sidebar/empty_state_spec.js @@ -11,10 +11,6 @@ describe('IDE commit panel EmptyState component', () => { wrapper = shallowMount(EmptyState, { store }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders no changes text when last commit message is empty', () => { expect(wrapper.find('h4').text()).toBe('No changes'); }); diff --git a/spec/frontend/ide/components/commit_sidebar/form_spec.js b/spec/frontend/ide/components/commit_sidebar/form_spec.js index 98100727630..0c0998c037a 100644 --- a/spec/frontend/ide/components/commit_sidebar/form_spec.js +++ b/spec/frontend/ide/components/commit_sidebar/form_spec.js @@ -73,10 +73,6 @@ describe('IDE commit form', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - // Notes: // - When there are no changes, there is no commit button so there's nothing to test :) describe.each` diff --git a/spec/frontend/ide/components/commit_sidebar/list_item_spec.js b/spec/frontend/ide/components/commit_sidebar/list_item_spec.js index c9571d39acb..c2a33c0d71e 100644 --- a/spec/frontend/ide/components/commit_sidebar/list_item_spec.js +++ b/spec/frontend/ide/components/commit_sidebar/list_item_spec.js @@ -36,10 +36,6 @@ describe('Multi-file editor commit sidebar list item', () => { findPathEl = wrapper.find('.multi-file-commit-list-path'); }); - afterEach(() => { - wrapper.destroy(); - }); - const findPathText = () => trimText(findPathEl.text()); it('renders file path', () => { diff --git a/spec/frontend/ide/components/commit_sidebar/list_spec.js b/spec/frontend/ide/components/commit_sidebar/list_spec.js index 4406d14d990..6b9ba939a87 100644 --- a/spec/frontend/ide/components/commit_sidebar/list_spec.js +++ b/spec/frontend/ide/components/commit_sidebar/list_spec.js @@ -19,10 +19,6 @@ describe('Multi-file editor commit sidebar list', () => { }, }); - afterEach(() => { - wrapper.destroy(); - }); - describe('with a list of files', () => { beforeEach(async () => { const f = file('file name'); diff --git a/spec/frontend/ide/components/commit_sidebar/message_field_spec.js b/spec/frontend/ide/components/commit_sidebar/message_field_spec.js index c2ef29c1059..3403a7b8ad9 100644 --- a/spec/frontend/ide/components/commit_sidebar/message_field_spec.js +++ b/spec/frontend/ide/components/commit_sidebar/message_field_spec.js @@ -15,10 +15,6 @@ describe('IDE commit message field', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - const findMessage = () => wrapper.find('textarea'); const findHighlights = () => wrapper.findAll('.highlights span'); const findMarks = () => wrapper.findAll('mark'); diff --git a/spec/frontend/ide/components/commit_sidebar/new_merge_request_option_spec.js b/spec/frontend/ide/components/commit_sidebar/new_merge_request_option_spec.js index 8827dd41a74..adc9a0f1421 100644 --- a/spec/frontend/ide/components/commit_sidebar/new_merge_request_option_spec.js +++ b/spec/frontend/ide/components/commit_sidebar/new_merge_request_option_spec.js @@ -38,10 +38,6 @@ describe('NewMergeRequestOption component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when the `shouldHideNewMrOption` getter returns false', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/ide/components/commit_sidebar/radio_group_spec.js b/spec/frontend/ide/components/commit_sidebar/radio_group_spec.js index 589d282e4c4..cdf14056523 100644 --- a/spec/frontend/ide/components/commit_sidebar/radio_group_spec.js +++ b/spec/frontend/ide/components/commit_sidebar/radio_group_spec.js @@ -24,10 +24,6 @@ describe('IDE commit sidebar radio group', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('without input', () => { const props = { value: '1', diff --git a/spec/frontend/ide/components/commit_sidebar/success_message_spec.js b/spec/frontend/ide/components/commit_sidebar/success_message_spec.js index 63d51953915..d1a81dd1639 100644 --- a/spec/frontend/ide/components/commit_sidebar/success_message_spec.js +++ b/spec/frontend/ide/components/commit_sidebar/success_message_spec.js @@ -12,10 +12,6 @@ describe('IDE commit panel successful commit state', () => { wrapper = shallowMount(SuccessMessage, { store }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders last commit message when it exists', () => { expect(wrapper.text()).toContain('testing commit message'); }); diff --git a/spec/frontend/ide/components/error_message_spec.js b/spec/frontend/ide/components/error_message_spec.js index 204d39de741..5f6579654bc 100644 --- a/spec/frontend/ide/components/error_message_spec.js +++ b/spec/frontend/ide/components/error_message_spec.js @@ -32,11 +32,6 @@ describe('IDE error message component', () => { setErrorMessageMock.mockReset(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findDismissButton = () => wrapper.find('button[aria-label=Dismiss]'); const findActionButton = () => wrapper.find('button.gl-alert-action'); diff --git a/spec/frontend/ide/components/file_row_extra_spec.js b/spec/frontend/ide/components/file_row_extra_spec.js index 281c549a1b4..f5a6e7222f9 100644 --- a/spec/frontend/ide/components/file_row_extra_spec.js +++ b/spec/frontend/ide/components/file_row_extra_spec.js @@ -37,8 +37,6 @@ describe('IDE extra file row component', () => { }; afterEach(() => { - wrapper.destroy(); - stagedFilesCount = 0; unstagedFilesCount = 0; changesCount = 0; diff --git a/spec/frontend/ide/components/file_templates/bar_spec.js b/spec/frontend/ide/components/file_templates/bar_spec.js index 60f37260393..b8c850fdd13 100644 --- a/spec/frontend/ide/components/file_templates/bar_spec.js +++ b/spec/frontend/ide/components/file_templates/bar_spec.js @@ -21,10 +21,6 @@ describe('IDE file templates bar component', () => { wrapper = mount(Bar, { store }); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('template type dropdown', () => { it('renders dropdown component', () => { expect(wrapper.find('.dropdown').text()).toContain('Choose a type'); diff --git a/spec/frontend/ide/components/file_templates/dropdown_spec.js b/spec/frontend/ide/components/file_templates/dropdown_spec.js index ee90d87357c..72fdd05eb2c 100644 --- a/spec/frontend/ide/components/file_templates/dropdown_spec.js +++ b/spec/frontend/ide/components/file_templates/dropdown_spec.js @@ -49,11 +49,6 @@ describe('IDE file templates dropdown component', () => { ({ element } = wrapper); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('calls clickItem on click', async () => { const itemData = { name: 'test.yml ' }; createComponent({ props: { data: [itemData] } }); diff --git a/spec/frontend/ide/components/ide_file_row_spec.js b/spec/frontend/ide/components/ide_file_row_spec.js index aa66224fa19..331877ff112 100644 --- a/spec/frontend/ide/components/ide_file_row_spec.js +++ b/spec/frontend/ide/components/ide_file_row_spec.js @@ -34,11 +34,6 @@ describe('Ide File Row component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findFileRowExtra = () => wrapper.findComponent(FileRowExtra); const findFileRow = () => wrapper.findComponent(FileRow); const hasDropdownOpen = () => findFileRowExtra().props('dropdownOpen'); diff --git a/spec/frontend/ide/components/ide_project_header_spec.js b/spec/frontend/ide/components/ide_project_header_spec.js index d0636352a3f..7613f407e45 100644 --- a/spec/frontend/ide/components/ide_project_header_spec.js +++ b/spec/frontend/ide/components/ide_project_header_spec.js @@ -20,10 +20,6 @@ describe('IDE project header', () => { wrapper = shallowMount(IDEProjectHeader, { propsData: { project: mockProject } }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/ide/components/ide_review_spec.js b/spec/frontend/ide/components/ide_review_spec.js index 0759f957374..e6fd018969f 100644 --- a/spec/frontend/ide/components/ide_review_spec.js +++ b/spec/frontend/ide/components/ide_review_spec.js @@ -30,10 +30,6 @@ describe('IDE review mode', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders list of files', () => { expect(wrapper.text()).toContain('fileName'); }); diff --git a/spec/frontend/ide/components/ide_side_bar_spec.js b/spec/frontend/ide/components/ide_side_bar_spec.js index 4784d6c516f..c258c5312d8 100644 --- a/spec/frontend/ide/components/ide_side_bar_spec.js +++ b/spec/frontend/ide/components/ide_side_bar_spec.js @@ -29,11 +29,6 @@ describe('IdeSidebar', () => { }); } - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders a sidebar', () => { wrapper = createComponent(); diff --git a/spec/frontend/ide/components/ide_sidebar_nav_spec.js b/spec/frontend/ide/components/ide_sidebar_nav_spec.js index b7aa99747b3..4ee24f63f76 100644 --- a/spec/frontend/ide/components/ide_sidebar_nav_spec.js +++ b/spec/frontend/ide/components/ide_sidebar_nav_spec.js @@ -25,10 +25,6 @@ describe('ide/components/ide_sidebar_nav', () => { let wrapper; const createComponent = (props = {}) => { - if (wrapper) { - throw new Error('wrapper already exists'); - } - wrapper = shallowMount(IdeSidebarNav, { propsData: { tabs: TEST_TABS, @@ -42,11 +38,6 @@ describe('ide/components/ide_sidebar_nav', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findButtons = () => wrapper.findAll('li button'); const findButtonsData = () => findButtons().wrappers.map((button) => { diff --git a/spec/frontend/ide/components/ide_spec.js b/spec/frontend/ide/components/ide_spec.js index a575f428a69..1c8d570cdce 100644 --- a/spec/frontend/ide/components/ide_spec.js +++ b/spec/frontend/ide/components/ide_spec.js @@ -52,8 +52,6 @@ describe('WebIDE', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; window.onbeforeunload = null; }); diff --git a/spec/frontend/ide/components/ide_status_bar_spec.js b/spec/frontend/ide/components/ide_status_bar_spec.js index e6e0ebaf1e8..0ee16f98e7e 100644 --- a/spec/frontend/ide/components/ide_status_bar_spec.js +++ b/spec/frontend/ide/components/ide_status_bar_spec.js @@ -34,10 +34,6 @@ describe('IdeStatusBar component', () => { wrapper = mount(IdeStatusBar, { store }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { it('triggers a setInterval', () => { mountComponent(); diff --git a/spec/frontend/ide/components/ide_status_list_spec.js b/spec/frontend/ide/components/ide_status_list_spec.js index 0b54e8b6afb..344a1fbc4f6 100644 --- a/spec/frontend/ide/components/ide_status_list_spec.js +++ b/spec/frontend/ide/components/ide_status_list_spec.js @@ -53,10 +53,7 @@ describe('ide/components/ide_status_list', () => { }); afterEach(() => { - wrapper.destroy(); - store = null; - wrapper = null; }); describe('with regular file', () => { diff --git a/spec/frontend/ide/components/ide_status_mr_spec.js b/spec/frontend/ide/components/ide_status_mr_spec.js index 0b9111c0e2a..3501ecce061 100644 --- a/spec/frontend/ide/components/ide_status_mr_spec.js +++ b/spec/frontend/ide/components/ide_status_mr_spec.js @@ -17,10 +17,6 @@ describe('ide/components/ide_status_mr', () => { const findIcon = () => wrapper.findComponent(GlIcon); const findLink = () => wrapper.findComponent(GlLink); - afterEach(() => { - wrapper.destroy(); - }); - describe('when mounted', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/ide/components/ide_tree_list_spec.js b/spec/frontend/ide/components/ide_tree_list_spec.js index 0f61aa80e53..427daa57324 100644 --- a/spec/frontend/ide/components/ide_tree_list_spec.js +++ b/spec/frontend/ide/components/ide_tree_list_spec.js @@ -25,10 +25,6 @@ describe('IdeTreeList component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('normal branch', () => { const tree = [file('fileName')]; diff --git a/spec/frontend/ide/components/ide_tree_spec.js b/spec/frontend/ide/components/ide_tree_spec.js index f00017a2736..9f452910496 100644 --- a/spec/frontend/ide/components/ide_tree_spec.js +++ b/spec/frontend/ide/components/ide_tree_spec.js @@ -29,10 +29,6 @@ describe('IdeTree', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders list of files', () => { expect(wrapper.text()).toContain('fileName'); }); diff --git a/spec/frontend/ide/components/jobs/detail/description_spec.js b/spec/frontend/ide/components/jobs/detail/description_spec.js index 629c4424314..2bb0f3fccf4 100644 --- a/spec/frontend/ide/components/jobs/detail/description_spec.js +++ b/spec/frontend/ide/components/jobs/detail/description_spec.js @@ -14,10 +14,6 @@ describe('IDE job description', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders job details', () => { expect(wrapper.text()).toContain('#1'); expect(wrapper.text()).toContain('test'); diff --git a/spec/frontend/ide/components/jobs/detail/scroll_button_spec.js b/spec/frontend/ide/components/jobs/detail/scroll_button_spec.js index 5eb66f75978..eec1bd6b123 100644 --- a/spec/frontend/ide/components/jobs/detail/scroll_button_spec.js +++ b/spec/frontend/ide/components/jobs/detail/scroll_button_spec.js @@ -15,10 +15,6 @@ describe('IDE job log scroll button', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe.each` direction | icon | title ${'up'} | ${'scroll_up'} | ${'Scroll to top'} diff --git a/spec/frontend/ide/components/jobs/detail_spec.js b/spec/frontend/ide/components/jobs/detail_spec.js index bf2be3aa595..60e03a7b882 100644 --- a/spec/frontend/ide/components/jobs/detail_spec.js +++ b/spec/frontend/ide/components/jobs/detail_spec.js @@ -34,10 +34,6 @@ describe('IDE jobs detail view', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('mounted', () => { const findJobOutput = () => wrapper.find('.bash'); const findBuildLoaderAnimation = () => wrapper.find('.build-loader-animation'); diff --git a/spec/frontend/ide/components/jobs/item_spec.js b/spec/frontend/ide/components/jobs/item_spec.js index 32e27333e42..ab442a27817 100644 --- a/spec/frontend/ide/components/jobs/item_spec.js +++ b/spec/frontend/ide/components/jobs/item_spec.js @@ -12,10 +12,6 @@ describe('IDE jobs item', () => { wrapper = mount(JobItem, { propsData: { job } }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders job details', () => { expect(wrapper.text()).toContain(job.name); expect(wrapper.text()).toContain(`#${job.id}`); diff --git a/spec/frontend/ide/components/jobs/stage_spec.js b/spec/frontend/ide/components/jobs/stage_spec.js index 52fbff2f497..23ef92f9682 100644 --- a/spec/frontend/ide/components/jobs/stage_spec.js +++ b/spec/frontend/ide/components/jobs/stage_spec.js @@ -31,11 +31,6 @@ describe('IDE pipeline stage', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('emits fetch event when mounted', () => { createComponent(); expect(wrapper.emitted().fetch).toBeDefined(); diff --git a/spec/frontend/ide/components/merge_requests/item_spec.js b/spec/frontend/ide/components/merge_requests/item_spec.js index d6cf8127b53..2fbb6919b8b 100644 --- a/spec/frontend/ide/components/merge_requests/item_spec.js +++ b/spec/frontend/ide/components/merge_requests/item_spec.js @@ -39,11 +39,6 @@ describe('IDE merge request item', () => { router = createRouter(store); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('default', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/ide/components/merge_requests/list_spec.js b/spec/frontend/ide/components/merge_requests/list_spec.js index ea6e2741a85..3b0e8c632fb 100644 --- a/spec/frontend/ide/components/merge_requests/list_spec.js +++ b/spec/frontend/ide/components/merge_requests/list_spec.js @@ -48,11 +48,6 @@ describe('IDE merge requests list', () => { fetchMergeRequestsMock = jest.fn(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('calls fetch on mounted', () => { createComponent(); expect(fetchMergeRequestsMock).toHaveBeenCalledWith(expect.any(Object), { diff --git a/spec/frontend/ide/components/nav_dropdown_button_spec.js b/spec/frontend/ide/components/nav_dropdown_button_spec.js index 8eebcdd9e08..3aae2c83e80 100644 --- a/spec/frontend/ide/components/nav_dropdown_button_spec.js +++ b/spec/frontend/ide/components/nav_dropdown_button_spec.js @@ -9,10 +9,6 @@ describe('NavDropdownButton component', () => { const TEST_MR_ID = '12345'; let wrapper; - afterEach(() => { - wrapper.destroy(); - }); - const createComponent = ({ props = {}, state = {} } = {}) => { const store = createStore(); store.replaceState(state); diff --git a/spec/frontend/ide/components/nav_dropdown_spec.js b/spec/frontend/ide/components/nav_dropdown_spec.js index 33e638843f5..794aaba6d01 100644 --- a/spec/frontend/ide/components/nav_dropdown_spec.js +++ b/spec/frontend/ide/components/nav_dropdown_spec.js @@ -30,10 +30,6 @@ describe('IDE NavDropdown', () => { jest.spyOn(store, 'dispatch').mockImplementation(() => {}); }); - afterEach(() => { - wrapper.destroy(); - }); - const createComponent = () => { wrapper = mount(NavDropdown, { store, diff --git a/spec/frontend/ide/components/new_dropdown/button_spec.js b/spec/frontend/ide/components/new_dropdown/button_spec.js index a9cfdfd20c1..bfd5cdf7263 100644 --- a/spec/frontend/ide/components/new_dropdown/button_spec.js +++ b/spec/frontend/ide/components/new_dropdown/button_spec.js @@ -14,10 +14,6 @@ describe('IDE new entry dropdown button component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders button with label', () => { createComponent(); diff --git a/spec/frontend/ide/components/new_dropdown/index_spec.js b/spec/frontend/ide/components/new_dropdown/index_spec.js index 747c099db33..01dcb174c41 100644 --- a/spec/frontend/ide/components/new_dropdown/index_spec.js +++ b/spec/frontend/ide/components/new_dropdown/index_spec.js @@ -30,10 +30,6 @@ describe('new dropdown component', () => { jest.spyOn(wrapper.vm.$refs.newModal, 'open').mockImplementation(() => {}); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders new file, upload and new directory links', () => { expect(findAllButtons().at(0).text()).toBe('New file'); expect(findAllButtons().at(1).text()).toBe('Upload file'); diff --git a/spec/frontend/ide/components/new_dropdown/modal_spec.js b/spec/frontend/ide/components/new_dropdown/modal_spec.js index c6f9fd0c4ea..b1fdf59adab 100644 --- a/spec/frontend/ide/components/new_dropdown/modal_spec.js +++ b/spec/frontend/ide/components/new_dropdown/modal_spec.js @@ -79,7 +79,6 @@ describe('new file modal component', () => { afterEach(() => { store = null; - wrapper.destroy(); document.body.innerHTML = ''; }); diff --git a/spec/frontend/ide/components/new_dropdown/upload_spec.js b/spec/frontend/ide/components/new_dropdown/upload_spec.js index fc643589d51..40780c7f0bd 100644 --- a/spec/frontend/ide/components/new_dropdown/upload_spec.js +++ b/spec/frontend/ide/components/new_dropdown/upload_spec.js @@ -12,10 +12,6 @@ describe('new dropdown upload', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('openFile', () => { it('calls for each file', () => { const files = ['test', 'test2', 'test3']; diff --git a/spec/frontend/ide/components/panes/collapsible_sidebar_spec.js b/spec/frontend/ide/components/panes/collapsible_sidebar_spec.js index e92f843ae6e..42eb5b3fc7a 100644 --- a/spec/frontend/ide/components/panes/collapsible_sidebar_spec.js +++ b/spec/frontend/ide/components/panes/collapsible_sidebar_spec.js @@ -35,11 +35,6 @@ describe('ide/components/panes/collapsible_sidebar.vue', () => { jest.spyOn(store, 'dispatch').mockImplementation(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('with a tab', () => { let fakeView; let extensionTabs; diff --git a/spec/frontend/ide/components/panes/right_spec.js b/spec/frontend/ide/components/panes/right_spec.js index 1d81c3ea89d..832983edf21 100644 --- a/spec/frontend/ide/components/panes/right_spec.js +++ b/spec/frontend/ide/components/panes/right_spec.js @@ -28,11 +28,6 @@ describe('ide/components/panes/right.vue', () => { store = createStore(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('default', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/ide/components/pipelines/empty_state_spec.js b/spec/frontend/ide/components/pipelines/empty_state_spec.js index 31081e8f9d5..71de9aecb52 100644 --- a/spec/frontend/ide/components/pipelines/empty_state_spec.js +++ b/spec/frontend/ide/components/pipelines/empty_state_spec.js @@ -22,10 +22,6 @@ describe('~/ide/components/pipelines/empty_state.vue', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/ide/components/pipelines/list_spec.js b/spec/frontend/ide/components/pipelines/list_spec.js index d82b97561f0..e913fa84d56 100644 --- a/spec/frontend/ide/components/pipelines/list_spec.js +++ b/spec/frontend/ide/components/pipelines/list_spec.js @@ -65,11 +65,6 @@ describe('IDE pipelines list', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('fetches latest pipeline', () => { createComponent(); diff --git a/spec/frontend/ide/components/repo_commit_section_spec.js b/spec/frontend/ide/components/repo_commit_section_spec.js index d3312358402..92bb645b1c0 100644 --- a/spec/frontend/ide/components/repo_commit_section_spec.js +++ b/spec/frontend/ide/components/repo_commit_section_spec.js @@ -63,11 +63,6 @@ describe('RepoCommitSection', () => { jest.spyOn(router, 'push').mockImplementation(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('empty state', () => { beforeEach(() => { store.state.noChangesStateSvgPath = TEST_NO_CHANGES_SVG; diff --git a/spec/frontend/ide/components/repo_editor_spec.js b/spec/frontend/ide/components/repo_editor_spec.js index c9f033bffbb..9253bfc7e71 100644 --- a/spec/frontend/ide/components/repo_editor_spec.js +++ b/spec/frontend/ide/components/repo_editor_spec.js @@ -162,8 +162,6 @@ describe('RepoEditor', () => { // create a new model each time, otherwise tests conflict with each other // because of same model being used in multiple tests monacoEditor.getModels().forEach((model) => model.dispose()); - wrapper.destroy(); - wrapper = null; }); describe('default', () => { diff --git a/spec/frontend/ide/components/repo_tab_spec.js b/spec/frontend/ide/components/repo_tab_spec.js index b26edc5a85b..b329baea783 100644 --- a/spec/frontend/ide/components/repo_tab_spec.js +++ b/spec/frontend/ide/components/repo_tab_spec.js @@ -37,11 +37,6 @@ describe('RepoTab', () => { jest.spyOn(router, 'push').mockImplementation(() => {}); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders a close link and a name link', () => { createComponent({ tab: file(), diff --git a/spec/frontend/ide/components/repo_tabs_spec.js b/spec/frontend/ide/components/repo_tabs_spec.js index 1cfc1f12745..06ad162d398 100644 --- a/spec/frontend/ide/components/repo_tabs_spec.js +++ b/spec/frontend/ide/components/repo_tabs_spec.js @@ -25,10 +25,6 @@ describe('RepoTabs', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders a list of tabs', async () => { store.state.openFiles[0].active = true; diff --git a/spec/frontend/ide/components/resizable_panel_spec.js b/spec/frontend/ide/components/resizable_panel_spec.js index fe2a128c9c8..240e675a38e 100644 --- a/spec/frontend/ide/components/resizable_panel_spec.js +++ b/spec/frontend/ide/components/resizable_panel_spec.js @@ -19,11 +19,6 @@ describe('~/ide/components/resizable_panel', () => { jest.spyOn(store, 'dispatch').mockImplementation(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const createComponent = (props = {}) => { wrapper = shallowMount(ResizablePanel, { propsData: { diff --git a/spec/frontend/ide/components/shared/commit_message_field_spec.js b/spec/frontend/ide/components/shared/commit_message_field_spec.js index 94da06f4cb2..186b1997497 100644 --- a/spec/frontend/ide/components/shared/commit_message_field_spec.js +++ b/spec/frontend/ide/components/shared/commit_message_field_spec.js @@ -23,10 +23,6 @@ describe('CommitMessageField', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - const findTextArea = () => wrapper.find('textarea'); const findHighlights = () => wrapper.findByTestId('highlights'); const findHighlightsText = () => wrapper.findByTestId('highlights-text'); diff --git a/spec/frontend/ide/components/shared/tokened_input_spec.js b/spec/frontend/ide/components/shared/tokened_input_spec.js index b70c9659e46..4bd5a6527e2 100644 --- a/spec/frontend/ide/components/shared/tokened_input_spec.js +++ b/spec/frontend/ide/components/shared/tokened_input_spec.js @@ -28,10 +28,6 @@ describe('IDE shared/TokenedInput', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders tokens', () => { createComponent(); const renderedTokens = getTokenElements(wrapper).wrappers.map((w) => w.text()); diff --git a/spec/frontend/ide/components/terminal/empty_state_spec.js b/spec/frontend/ide/components/terminal/empty_state_spec.js index 15fb0fe9013..3a691c151d5 100644 --- a/spec/frontend/ide/components/terminal/empty_state_spec.js +++ b/spec/frontend/ide/components/terminal/empty_state_spec.js @@ -16,10 +16,6 @@ describe('IDE TerminalEmptyState', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('does not show illustration, if no path specified', () => { factory(); diff --git a/spec/frontend/ide/components/terminal/terminal_spec.js b/spec/frontend/ide/components/terminal/terminal_spec.js index 0d22f7f73fe..0500c116d23 100644 --- a/spec/frontend/ide/components/terminal/terminal_spec.js +++ b/spec/frontend/ide/components/terminal/terminal_spec.js @@ -59,10 +59,6 @@ describe('IDE Terminal', () => { }; }); - afterEach(() => { - wrapper.destroy(); - }); - describe('loading text', () => { [STARTING, PENDING].forEach((status) => { it(`shows when starting (${status})`, () => { diff --git a/spec/frontend/ide/components/terminal/view_spec.js b/spec/frontend/ide/components/terminal/view_spec.js index 57c8da9f5b7..b8ffaa89047 100644 --- a/spec/frontend/ide/components/terminal/view_spec.js +++ b/spec/frontend/ide/components/terminal/view_spec.js @@ -59,10 +59,6 @@ describe('IDE TerminalView', () => { }; }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders empty state', async () => { await factory(); diff --git a/spec/frontend/ide/components/terminal_sync/terminal_sync_status_safe_spec.js b/spec/frontend/ide/components/terminal_sync/terminal_sync_status_safe_spec.js index 5b1502cc190..e420e28c7b6 100644 --- a/spec/frontend/ide/components/terminal_sync/terminal_sync_status_safe_spec.js +++ b/spec/frontend/ide/components/terminal_sync/terminal_sync_status_safe_spec.js @@ -22,10 +22,6 @@ describe('ide/components/terminal_sync/terminal_sync_status_safe', () => { beforeEach(createComponent); - afterEach(() => { - wrapper.destroy(); - }); - describe('with terminal sync module in store', () => { beforeEach(() => { store.registerModule('terminalSync', { diff --git a/spec/frontend/ide/components/terminal_sync/terminal_sync_status_spec.js b/spec/frontend/ide/components/terminal_sync/terminal_sync_status_spec.js index 147235abc8e..4541c3b5ec8 100644 --- a/spec/frontend/ide/components/terminal_sync/terminal_sync_status_spec.js +++ b/spec/frontend/ide/components/terminal_sync/terminal_sync_status_spec.js @@ -48,10 +48,6 @@ describe('ide/components/terminal_sync/terminal_sync_status', () => { }; }); - afterEach(() => { - wrapper.destroy(); - }); - describe('when doing nothing', () => { it('shows nothing', () => { createComponent(); diff --git a/spec/frontend/import_entities/components/group_dropdown_spec.js b/spec/frontend/import_entities/components/group_dropdown_spec.js index 31e097cfa7b..b44bc33de6f 100644 --- a/spec/frontend/import_entities/components/group_dropdown_spec.js +++ b/spec/frontend/import_entities/components/group_dropdown_spec.js @@ -64,10 +64,6 @@ describe('Import entities group dropdown component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('passes namespaces from graphql query to default slot', async () => { createComponent(); jest.advanceTimersByTime(DEBOUNCE_DELAY); diff --git a/spec/frontend/import_entities/components/import_status_spec.js b/spec/frontend/import_entities/components/import_status_spec.js index 56c4ed827d7..3488d9f60c8 100644 --- a/spec/frontend/import_entities/components/import_status_spec.js +++ b/spec/frontend/import_entities/components/import_status_spec.js @@ -12,10 +12,6 @@ describe('Import entities status component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('success status', () => { const getStatusText = () => wrapper.findComponent(GlBadge).text(); const getStatusIcon = () => wrapper.findComponent(GlBadge).props('icon'); diff --git a/spec/frontend/import_entities/import_groups/components/import_actions_cell_spec.js b/spec/frontend/import_entities/import_groups/components/import_actions_cell_spec.js index 163a60bae36..e813c9eab11 100644 --- a/spec/frontend/import_entities/import_groups/components/import_actions_cell_spec.js +++ b/spec/frontend/import_entities/import_groups/components/import_actions_cell_spec.js @@ -17,10 +17,6 @@ describe('import actions cell', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when group is available for import', () => { beforeEach(() => { createComponent({ isAvailableForImport: true }); diff --git a/spec/frontend/import_entities/import_groups/components/import_source_cell_spec.js b/spec/frontend/import_entities/import_groups/components/import_source_cell_spec.js index f2735d86493..9ead483d02f 100644 --- a/spec/frontend/import_entities/import_groups/components/import_source_cell_spec.js +++ b/spec/frontend/import_entities/import_groups/components/import_source_cell_spec.js @@ -22,10 +22,6 @@ describe('import source cell', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when group status is NONE', () => { beforeEach(() => { group = generateFakeTableEntry({ id: 1, status: STATUSES.NONE }); diff --git a/spec/frontend/import_entities/import_groups/components/import_table_spec.js b/spec/frontend/import_entities/import_groups/components/import_table_spec.js index 8311c447253..f664f4a4fe7 100644 --- a/spec/frontend/import_entities/import_groups/components/import_table_spec.js +++ b/spec/frontend/import_entities/import_groups/components/import_table_spec.js @@ -120,10 +120,6 @@ describe('import table', () => { axiosMock.onGet(/.*\/exists$/, () => []).reply(HTTP_STATUS_OK, { exists: false }); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('loading state', () => { it('renders loading icon while performing request', async () => { createComponent({ diff --git a/spec/frontend/import_entities/import_groups/components/import_target_cell_spec.js b/spec/frontend/import_entities/import_groups/components/import_target_cell_spec.js index d5286e71c44..a524d9ebdb0 100644 --- a/spec/frontend/import_entities/import_groups/components/import_target_cell_spec.js +++ b/spec/frontend/import_entities/import_groups/components/import_target_cell_spec.js @@ -57,11 +57,6 @@ describe('import target cell', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('events', () => { beforeEach(async () => { group = generateFakeTableEntry({ id: 1, status: STATUSES.NONE }); diff --git a/spec/frontend/import_entities/import_projects/components/advanced_settings_spec.js b/spec/frontend/import_entities/import_projects/components/advanced_settings_spec.js index 68716600592..2294d236e8b 100644 --- a/spec/frontend/import_entities/import_projects/components/advanced_settings_spec.js +++ b/spec/frontend/import_entities/import_projects/components/advanced_settings_spec.js @@ -25,10 +25,6 @@ describe('Import Advanced Settings', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders GLFormCheckbox for each optional stage', () => { expect(wrapper.findAllComponents(GlFormCheckbox)).toHaveLength(OPTIONAL_STAGES.length); }); diff --git a/spec/frontend/import_entities/import_projects/components/provider_repo_table_row_spec.js b/spec/frontend/import_entities/import_projects/components/provider_repo_table_row_spec.js index e613b9756af..8e73f76382a 100644 --- a/spec/frontend/import_entities/import_projects/components/provider_repo_table_row_spec.js +++ b/spec/frontend/import_entities/import_projects/components/provider_repo_table_row_spec.js @@ -60,11 +60,6 @@ describe('ProviderRepoTableRow', () => { }); } - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when rendering importable project', () => { const repo = { importSource: { diff --git a/spec/frontend/incidents_settings/components/pagerduty_form_spec.js b/spec/frontend/incidents_settings/components/pagerduty_form_spec.js index 521a861829b..77258db437d 100644 --- a/spec/frontend/incidents_settings/components/pagerduty_form_spec.js +++ b/spec/frontend/incidents_settings/components/pagerduty_form_spec.js @@ -26,10 +26,6 @@ describe('Alert integration settings form', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should match the default snapshot', () => { expect(wrapper.element).toMatchSnapshot(); }); diff --git a/spec/frontend/integrations/edit/components/active_checkbox_spec.js b/spec/frontend/integrations/edit/components/active_checkbox_spec.js index 1f7a5f0dbc9..8afff842a85 100644 --- a/spec/frontend/integrations/edit/components/active_checkbox_spec.js +++ b/spec/frontend/integrations/edit/components/active_checkbox_spec.js @@ -17,10 +17,6 @@ describe('ActiveCheckbox', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findGlFormCheckbox = () => wrapper.findComponent(GlFormCheckbox); const findInputInCheckbox = () => findGlFormCheckbox().find('input'); diff --git a/spec/frontend/integrations/edit/components/confirmation_modal_spec.js b/spec/frontend/integrations/edit/components/confirmation_modal_spec.js index cbe3402727a..dfb6b7d9a9c 100644 --- a/spec/frontend/integrations/edit/components/confirmation_modal_spec.js +++ b/spec/frontend/integrations/edit/components/confirmation_modal_spec.js @@ -14,10 +14,6 @@ describe('ConfirmationModal', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findGlModal = () => wrapper.findComponent(GlModal); describe('template', () => { diff --git a/spec/frontend/integrations/edit/components/dynamic_field_spec.js b/spec/frontend/integrations/edit/components/dynamic_field_spec.js index 7589b04b0fd..e1d9aef752f 100644 --- a/spec/frontend/integrations/edit/components/dynamic_field_spec.js +++ b/spec/frontend/integrations/edit/components/dynamic_field_spec.js @@ -21,10 +21,6 @@ describe('DynamicField', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findGlFormGroup = () => wrapper.findComponent(GlFormGroup); const findGlFormCheckbox = () => wrapper.findComponent(GlFormCheckbox); const findGlFormInput = () => wrapper.findComponent(GlFormInput); diff --git a/spec/frontend/integrations/edit/components/integration_form_spec.js b/spec/frontend/integrations/edit/components/integration_form_spec.js index 2d74fe0a7d8..58fb456eb53 100644 --- a/spec/frontend/integrations/edit/components/integration_form_spec.js +++ b/spec/frontend/integrations/edit/components/integration_form_spec.js @@ -84,7 +84,6 @@ describe('IntegrationForm', () => { }); afterEach(() => { - wrapper.destroy(); mockAxios.restore(); }); diff --git a/spec/frontend/integrations/edit/components/jira_issues_fields_spec.js b/spec/frontend/integrations/edit/components/jira_issues_fields_spec.js index fa91f8de45a..90ee69ef2dc 100644 --- a/spec/frontend/integrations/edit/components/jira_issues_fields_spec.js +++ b/spec/frontend/integrations/edit/components/jira_issues_fields_spec.js @@ -31,10 +31,6 @@ describe('JiraIssuesFields', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findEnableCheckbox = () => wrapper.findComponent(GlFormCheckbox); const findEnableCheckboxDisabled = () => findEnableCheckbox().find('[type=checkbox]').attributes('disabled'); diff --git a/spec/frontend/integrations/edit/components/jira_trigger_fields_spec.js b/spec/frontend/integrations/edit/components/jira_trigger_fields_spec.js index 6011b3e6edc..f876a497f98 100644 --- a/spec/frontend/integrations/edit/components/jira_trigger_fields_spec.js +++ b/spec/frontend/integrations/edit/components/jira_trigger_fields_spec.js @@ -22,10 +22,6 @@ describe('JiraTriggerFields', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findCommentSettings = () => wrapper.findByTestId('comment-settings'); const findCommentDetail = () => wrapper.findByTestId('comment-detail'); const findCommentSettingsCheckbox = () => findCommentSettings().findComponent(GlFormCheckbox); diff --git a/spec/frontend/integrations/edit/components/override_dropdown_spec.js b/spec/frontend/integrations/edit/components/override_dropdown_spec.js index 90facaff1f9..2d1a6b3ace1 100644 --- a/spec/frontend/integrations/edit/components/override_dropdown_spec.js +++ b/spec/frontend/integrations/edit/components/override_dropdown_spec.js @@ -26,10 +26,6 @@ describe('OverrideDropdown', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findGlLink = () => wrapper.findComponent(GlLink); const findGlDropdown = () => wrapper.findComponent(GlDropdown); diff --git a/spec/frontend/integrations/edit/components/sections/configuration_spec.js b/spec/frontend/integrations/edit/components/sections/configuration_spec.js index e697212ea0b..c8a7d17c041 100644 --- a/spec/frontend/integrations/edit/components/sections/configuration_spec.js +++ b/spec/frontend/integrations/edit/components/sections/configuration_spec.js @@ -19,10 +19,6 @@ describe('IntegrationSectionCoonfiguration', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findAllDynamicFields = () => wrapper.findAllComponents(DynamicField); describe('template', () => { diff --git a/spec/frontend/integrations/edit/components/sections/connection_spec.js b/spec/frontend/integrations/edit/components/sections/connection_spec.js index 1eb92e80723..a24253d542d 100644 --- a/spec/frontend/integrations/edit/components/sections/connection_spec.js +++ b/spec/frontend/integrations/edit/components/sections/connection_spec.js @@ -20,10 +20,6 @@ describe('IntegrationSectionConnection', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findActiveCheckbox = () => wrapper.findComponent(ActiveCheckbox); const findAllDynamicFields = () => wrapper.findAllComponents(DynamicField); diff --git a/spec/frontend/integrations/edit/components/sections/jira_issues_spec.js b/spec/frontend/integrations/edit/components/sections/jira_issues_spec.js index a7c1cc2a03f..8b39fa8f583 100644 --- a/spec/frontend/integrations/edit/components/sections/jira_issues_spec.js +++ b/spec/frontend/integrations/edit/components/sections/jira_issues_spec.js @@ -18,10 +18,6 @@ describe('IntegrationSectionJiraIssue', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findJiraIssuesFields = () => wrapper.findComponent(JiraIssuesFields); describe('template', () => { diff --git a/spec/frontend/integrations/edit/components/sections/jira_trigger_spec.js b/spec/frontend/integrations/edit/components/sections/jira_trigger_spec.js index d4ab9864fab..b3b7f508e25 100644 --- a/spec/frontend/integrations/edit/components/sections/jira_trigger_spec.js +++ b/spec/frontend/integrations/edit/components/sections/jira_trigger_spec.js @@ -18,10 +18,6 @@ describe('IntegrationSectionJiraTrigger', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findJiraTriggerFields = () => wrapper.findComponent(JiraTriggerFields); describe('template', () => { diff --git a/spec/frontend/integrations/edit/components/sections/trigger_spec.js b/spec/frontend/integrations/edit/components/sections/trigger_spec.js index 883f5c7bf79..b9c1efbb0a2 100644 --- a/spec/frontend/integrations/edit/components/sections/trigger_spec.js +++ b/spec/frontend/integrations/edit/components/sections/trigger_spec.js @@ -18,10 +18,6 @@ describe('IntegrationSectionTrigger', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findAllTriggerFields = () => wrapper.findAllComponents(TriggerField); describe('template', () => { diff --git a/spec/frontend/integrations/edit/components/trigger_field_spec.js b/spec/frontend/integrations/edit/components/trigger_field_spec.js index ed0b3324708..3b736b33a2f 100644 --- a/spec/frontend/integrations/edit/components/trigger_field_spec.js +++ b/spec/frontend/integrations/edit/components/trigger_field_spec.js @@ -23,10 +23,6 @@ describe('TriggerField', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findGlFormCheckbox = () => wrapper.findComponent(GlFormCheckbox); const findGlFormInput = () => wrapper.findComponent(GlFormInput); const findHiddenInput = () => wrapper.find('input[type="hidden"]'); diff --git a/spec/frontend/integrations/edit/components/trigger_fields_spec.js b/spec/frontend/integrations/edit/components/trigger_fields_spec.js index 082eeea30f1..defa02aefd2 100644 --- a/spec/frontend/integrations/edit/components/trigger_fields_spec.js +++ b/spec/frontend/integrations/edit/components/trigger_fields_spec.js @@ -20,10 +20,6 @@ describe('TriggerFields', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findTriggerLabel = () => wrapper.findByTestId('trigger-fields-group').find('label'); const findAllGlFormGroups = () => wrapper.find('#trigger-fields').findAllComponents(GlFormGroup); const findAllGlFormCheckboxes = () => wrapper.findAllComponents(GlFormCheckbox); diff --git a/spec/frontend/integrations/index/components/integrations_list_spec.js b/spec/frontend/integrations/index/components/integrations_list_spec.js index ee54a5fd359..155a3d1c6be 100644 --- a/spec/frontend/integrations/index/components/integrations_list_spec.js +++ b/spec/frontend/integrations/index/components/integrations_list_spec.js @@ -13,10 +13,6 @@ describe('IntegrationsList', () => { wrapper = shallowMountExtended(IntegrationsList, { propsData }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('provides correct `integrations` prop to the IntegrationsTable instance', () => { createComponent({ integrations: [...mockInactiveIntegrations, ...mockActiveIntegrations] }); diff --git a/spec/frontend/integrations/index/components/integrations_table_spec.js b/spec/frontend/integrations/index/components/integrations_table_spec.js index bfe0a5987b4..5456a23a98d 100644 --- a/spec/frontend/integrations/index/components/integrations_table_spec.js +++ b/spec/frontend/integrations/index/components/integrations_table_spec.js @@ -19,10 +19,6 @@ describe('IntegrationsTable', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe.each([true, false])('when `showUpdatedAt` is %p', (showUpdatedAt) => { beforeEach(() => { createComponent({ showUpdatedAt }); diff --git a/spec/frontend/integrations/overrides/components/integration_overrides_spec.js b/spec/frontend/integrations/overrides/components/integration_overrides_spec.js index fdb728281b5..9e863eaecfd 100644 --- a/spec/frontend/integrations/overrides/components/integration_overrides_spec.js +++ b/spec/frontend/integrations/overrides/components/integration_overrides_spec.js @@ -47,7 +47,6 @@ describe('IntegrationOverrides', () => { afterEach(() => { mockAxios.restore(); - wrapper.destroy(); }); const findGlTable = () => wrapper.findComponent(GlTable); diff --git a/spec/frontend/integrations/overrides/components/integration_tabs_spec.js b/spec/frontend/integrations/overrides/components/integration_tabs_spec.js index a728b4d391f..b35a40d69c1 100644 --- a/spec/frontend/integrations/overrides/components/integration_tabs_spec.js +++ b/spec/frontend/integrations/overrides/components/integration_tabs_spec.js @@ -21,10 +21,6 @@ describe('IntegrationTabs', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findGlBadge = () => wrapper.findComponent(GlBadge); const findGlTab = () => wrapper.findComponent(GlTab); const findSettingsLink = () => wrapper.find('a'); diff --git a/spec/frontend/invite_members/components/confetti_spec.js b/spec/frontend/invite_members/components/confetti_spec.js index 2f361f1dc1e..382569abfd9 100644 --- a/spec/frontend/invite_members/components/confetti_spec.js +++ b/spec/frontend/invite_members/components/confetti_spec.js @@ -6,16 +6,10 @@ jest.mock('canvas-confetti', () => ({ create: jest.fn(), })); -let wrapper; - const createComponent = () => { - wrapper = shallowMount(Confetti); + shallowMount(Confetti); }; -afterEach(() => { - wrapper.destroy(); -}); - describe('Confetti', () => { it('initiates confetti', () => { const basicCannon = jest.spyOn(Confetti.methods, 'basicCannon').mockImplementation(() => {}); diff --git a/spec/frontend/invite_members/components/group_select_spec.js b/spec/frontend/invite_members/components/group_select_spec.js index e1563a7bb3a..94bcd2b60a1 100644 --- a/spec/frontend/invite_members/components/group_select_spec.js +++ b/spec/frontend/invite_members/components/group_select_spec.js @@ -26,11 +26,6 @@ describe('GroupSelect', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findSearchBoxByType = () => wrapper.findComponent(GlSearchBoxByType); const findDropdown = () => wrapper.findComponent(GlDropdown); const findDropdownToggle = () => findDropdown().find('button[aria-haspopup="true"]'); diff --git a/spec/frontend/invite_members/components/import_project_members_modal_spec.js b/spec/frontend/invite_members/components/import_project_members_modal_spec.js index d839cde163c..74cb59a9b52 100644 --- a/spec/frontend/invite_members/components/import_project_members_modal_spec.js +++ b/spec/frontend/invite_members/components/import_project_members_modal_spec.js @@ -54,7 +54,6 @@ beforeEach(() => { }); afterEach(() => { - wrapper.destroy(); mock.restore(); }); diff --git a/spec/frontend/invite_members/components/import_project_members_trigger_spec.js b/spec/frontend/invite_members/components/import_project_members_trigger_spec.js index b6375fcfa22..0e8243491a8 100644 --- a/spec/frontend/invite_members/components/import_project_members_trigger_spec.js +++ b/spec/frontend/invite_members/components/import_project_members_trigger_spec.js @@ -17,10 +17,6 @@ const createComponent = (props = {}) => { describe('ImportProjectMembersTrigger', () => { let wrapper; - afterEach(() => { - wrapper.destroy(); - }); - const findButton = () => wrapper.findComponent(GlButton); describe('displayText', () => { diff --git a/spec/frontend/invite_members/components/invite_group_trigger_spec.js b/spec/frontend/invite_members/components/invite_group_trigger_spec.js index 84ddb779a9e..e088dc41a2b 100644 --- a/spec/frontend/invite_members/components/invite_group_trigger_spec.js +++ b/spec/frontend/invite_members/components/invite_group_trigger_spec.js @@ -17,11 +17,6 @@ const createComponent = (props = {}) => { describe('InviteGroupTrigger', () => { let wrapper; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findButton = () => wrapper.findComponent(GlButton); describe('displayText', () => { diff --git a/spec/frontend/invite_members/components/invite_groups_modal_spec.js b/spec/frontend/invite_members/components/invite_groups_modal_spec.js index 0e17b6bc07f..82b4717fbf1 100644 --- a/spec/frontend/invite_members/components/invite_groups_modal_spec.js +++ b/spec/frontend/invite_members/components/invite_groups_modal_spec.js @@ -44,11 +44,6 @@ describe('InviteGroupsModal', () => { createComponent({ isProject: false }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findModal = () => wrapper.findComponent(GlModal); const findGroupSelect = () => wrapper.findComponent(GroupSelect); const findInviteGroupAlert = () => wrapper.findComponent(InviteGroupNotification); diff --git a/spec/frontend/invite_members/components/invite_members_modal_spec.js b/spec/frontend/invite_members/components/invite_members_modal_spec.js index c1677f8366c..39d5ddee723 100644 --- a/spec/frontend/invite_members/components/invite_members_modal_spec.js +++ b/spec/frontend/invite_members/components/invite_members_modal_spec.js @@ -117,8 +117,6 @@ describe('InviteMembersModal', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; mock.restore(); }); diff --git a/spec/frontend/invite_members/components/invite_members_trigger_spec.js b/spec/frontend/invite_members/components/invite_members_trigger_spec.js index c42e497decc..699a0ad5809 100644 --- a/spec/frontend/invite_members/components/invite_members_trigger_spec.js +++ b/spec/frontend/invite_members/components/invite_members_trigger_spec.js @@ -62,10 +62,6 @@ describe.each(triggerItems)('with triggerElement as %s', (triggerItem) => { findButton = () => wrapper.findComponent(triggerComponent[triggerItem.triggerElement]); - afterEach(() => { - wrapper.destroy(); - }); - describe('configurable attributes', () => { it('includes the correct displayText for the button', () => { createComponent(); diff --git a/spec/frontend/invite_members/components/invite_modal_base_spec.js b/spec/frontend/invite_members/components/invite_modal_base_spec.js index 7e49977432d..e70c83a424e 100644 --- a/spec/frontend/invite_members/components/invite_modal_base_spec.js +++ b/spec/frontend/invite_members/components/invite_modal_base_spec.js @@ -54,10 +54,6 @@ describe('InviteModalBase', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findFormSelect = () => wrapper.findComponent(GlFormSelect); const findFormSelectOptions = () => findFormSelect().findAllComponents('option'); const findDatepicker = () => wrapper.findComponent(GlDatepicker); diff --git a/spec/frontend/invite_members/components/members_token_select_spec.js b/spec/frontend/invite_members/components/members_token_select_spec.js index 0455460918c..c7e9905dee3 100644 --- a/spec/frontend/invite_members/components/members_token_select_spec.js +++ b/spec/frontend/invite_members/components/members_token_select_spec.js @@ -30,11 +30,6 @@ const createComponent = (props) => { describe('MembersTokenSelect', () => { let wrapper; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findTokenSelector = () => wrapper.findComponent(GlTokenSelector); describe('rendering the token-selector component', () => { diff --git a/spec/frontend/invite_members/components/project_select_spec.js b/spec/frontend/invite_members/components/project_select_spec.js index 6fbf95362fa..20db4f20408 100644 --- a/spec/frontend/invite_members/components/project_select_spec.js +++ b/spec/frontend/invite_members/components/project_select_spec.js @@ -23,10 +23,6 @@ describe('ProjectSelect', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - const findGlCollapsibleListbox = () => wrapper.findComponent(GlCollapsibleListbox); const findAvatarLabeled = (index) => wrapper.findAllComponents(GlAvatarLabeled).at(index); diff --git a/spec/frontend/issuable/components/csv_export_modal_spec.js b/spec/frontend/issuable/components/csv_export_modal_spec.js index 1c604318c72..ccd53e64c4d 100644 --- a/spec/frontend/issuable/components/csv_export_modal_spec.js +++ b/spec/frontend/issuable/components/csv_export_modal_spec.js @@ -29,10 +29,6 @@ describe('CsvExportModal', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - const findModal = () => wrapper.findComponent(GlModal); const findIcon = () => wrapper.findComponent(GlIcon); diff --git a/spec/frontend/issuable/components/csv_import_export_buttons_spec.js b/spec/frontend/issuable/components/csv_import_export_buttons_spec.js index a392198030d..a861148abb6 100644 --- a/spec/frontend/issuable/components/csv_import_export_buttons_spec.js +++ b/spec/frontend/issuable/components/csv_import_export_buttons_spec.js @@ -33,10 +33,6 @@ describe('CsvImportExportButtons', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - const findExportCsvButton = () => wrapper.findComponent(GlButton); const findImportDropdown = () => wrapper.findComponent(GlDropdown); const findImportCsvButton = () => wrapper.findByRole('menuitem', { name: 'Import CSV' }); diff --git a/spec/frontend/issuable/components/csv_import_modal_spec.js b/spec/frontend/issuable/components/csv_import_modal_spec.js index 6e954c91f46..9069d2b3ab3 100644 --- a/spec/frontend/issuable/components/csv_import_modal_spec.js +++ b/spec/frontend/issuable/components/csv_import_modal_spec.js @@ -32,10 +32,6 @@ describe('CsvImportModal', () => { formSubmitSpy = jest.spyOn(HTMLFormElement.prototype, 'submit').mockImplementation(); }); - afterEach(() => { - wrapper.destroy(); - }); - const findModal = () => wrapper.findComponent(GlModal); const findForm = () => wrapper.find('form'); const findFileInput = () => wrapper.findByLabelText('Upload CSV file'); diff --git a/spec/frontend/issuable/components/issuable_by_email_spec.js b/spec/frontend/issuable/components/issuable_by_email_spec.js index b04a6c0b8fd..4cc5775b54e 100644 --- a/spec/frontend/issuable/components/issuable_by_email_spec.js +++ b/spec/frontend/issuable/components/issuable_by_email_spec.js @@ -53,8 +53,6 @@ describe('IssuableByEmail', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; mockAxios.restore(); }); diff --git a/spec/frontend/issuable/components/issuable_header_warnings_spec.js b/spec/frontend/issuable/components/issuable_header_warnings_spec.js index 690bbf585de..ff772040d22 100644 --- a/spec/frontend/issuable/components/issuable_header_warnings_spec.js +++ b/spec/frontend/issuable/components/issuable_header_warnings_spec.js @@ -30,11 +30,6 @@ describe('IssuableHeaderWarnings', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe.each` issuableType ${ISSUABLE_TYPE_ISSUE} | ${ISSUABLE_TYPE_MR} diff --git a/spec/frontend/issuable/components/issue_assignees_spec.js b/spec/frontend/issuable/components/issue_assignees_spec.js index 9a33bfae240..8ed51120508 100644 --- a/spec/frontend/issuable/components/issue_assignees_spec.js +++ b/spec/frontend/issuable/components/issue_assignees_spec.js @@ -21,11 +21,6 @@ describe('IssueAssigneesComponent', () => { vm = wrapper.vm; }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findTooltipText = () => wrapper.find('.js-assignee-tooltip').text(); const findAvatars = () => wrapper.findAllComponents(UserAvatarLink); const findOverflowCounter = () => wrapper.find('.avatar-counter'); diff --git a/spec/frontend/issuable/components/related_issuable_item_spec.js b/spec/frontend/issuable/components/related_issuable_item_spec.js index 3f9f048605a..3e23558ceb4 100644 --- a/spec/frontend/issuable/components/related_issuable_item_spec.js +++ b/spec/frontend/issuable/components/related_issuable_item_spec.js @@ -53,10 +53,6 @@ describe('RelatedIssuableItem', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - it('contains issuable-info-container class when canReorder is false', () => { mountComponent({ props: { canReorder: false } }); diff --git a/spec/frontend/issuable/components/status_box_spec.js b/spec/frontend/issuable/components/status_box_spec.js index 728b8958b9b..d26f287d90c 100644 --- a/spec/frontend/issuable/components/status_box_spec.js +++ b/spec/frontend/issuable/components/status_box_spec.js @@ -11,11 +11,6 @@ function factory(propsData) { describe('Merge request status box component', () => { const findBadge = () => wrapper.findComponent(GlBadge); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe.each` issuableType | badgeText | initialState | badgeClass | badgeVariant | badgeIcon ${'merge_request'} | ${'Open'} | ${'opened'} | ${'issuable-status-badge-open'} | ${'success'} | ${'merge-request-open'} diff --git a/spec/frontend/issuable/popover/components/issue_popover_spec.js b/spec/frontend/issuable/popover/components/issue_popover_spec.js index 444165f61c7..a7605016039 100644 --- a/spec/frontend/issuable/popover/components/issue_popover_spec.js +++ b/spec/frontend/issuable/popover/components/issue_popover_spec.js @@ -33,10 +33,6 @@ describe('Issue Popover', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('shows skeleton-loader while apollo is loading', () => { mountComponent(); diff --git a/spec/frontend/issuable/popover/components/mr_popover_spec.js b/spec/frontend/issuable/popover/components/mr_popover_spec.js index 5fdd1e6e8fc..d9e113eeaae 100644 --- a/spec/frontend/issuable/popover/components/mr_popover_spec.js +++ b/spec/frontend/issuable/popover/components/mr_popover_spec.js @@ -71,10 +71,6 @@ describe('MR Popover', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('shows skeleton-loader while apollo is loading', () => { mountComponent(); diff --git a/spec/frontend/issuable/related_issues/components/related_issues_root_spec.js b/spec/frontend/issuable/related_issues/components/related_issues_root_spec.js index 337a7c9a175..1383013aedb 100644 --- a/spec/frontend/issuable/related_issues/components/related_issues_root_spec.js +++ b/spec/frontend/issuable/related_issues/components/related_issues_root_spec.js @@ -34,7 +34,6 @@ describe('RelatedIssuesRoot', () => { afterEach(() => { mock.restore(); - wrapper.destroy(); }); const createComponent = ({ props = {}, data = {} } = {}) => { diff --git a/spec/frontend/issues/list/components/issue_card_time_info_spec.js b/spec/frontend/issues/list/components/issue_card_time_info_spec.js index ab4d023ee39..e80ffea0591 100644 --- a/spec/frontend/issues/list/components/issue_card_time_info_spec.js +++ b/spec/frontend/issues/list/components/issue_card_time_info_spec.js @@ -45,10 +45,6 @@ describe('CE IssueCardTimeInfo component', () => { }, }); - afterEach(() => { - wrapper.destroy(); - }); - describe('milestone', () => { it('renders', () => { wrapper = mountComponent(); diff --git a/spec/frontend/issues/list/components/issues_list_app_spec.js b/spec/frontend/issues/list/components/issues_list_app_spec.js index 93b9868b38b..06993ab8e29 100644 --- a/spec/frontend/issues/list/components/issues_list_app_spec.js +++ b/spec/frontend/issues/list/components/issues_list_app_spec.js @@ -192,7 +192,6 @@ describe('CE IssuesListApp component', () => { afterEach(() => { axiosMock.reset(); - wrapper.destroy(); }); describe('IssuableList', () => { diff --git a/spec/frontend/issues/list/components/jira_issues_import_status_app_spec.js b/spec/frontend/issues/list/components/jira_issues_import_status_app_spec.js index 406b1fbc1af..7bbb5a954ae 100644 --- a/spec/frontend/issues/list/components/jira_issues_import_status_app_spec.js +++ b/spec/frontend/issues/list/components/jira_issues_import_status_app_spec.js @@ -38,11 +38,6 @@ describe('JiraIssuesImportStatus', () => { }, }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when Jira import is neither in progress nor finished', () => { beforeEach(() => { wrapper = mountComponent(); diff --git a/spec/frontend/issues/new/components/title_suggestions_item_spec.js b/spec/frontend/issues/new/components/title_suggestions_item_spec.js index c54a762440f..4454ef81416 100644 --- a/spec/frontend/issues/new/components/title_suggestions_item_spec.js +++ b/spec/frontend/issues/new/components/title_suggestions_item_spec.js @@ -25,10 +25,6 @@ describe('Issue title suggestions item component', () => { const findTooltip = () => wrapper.findComponent(GlTooltip); const findUserAvatar = () => wrapper.findComponent(UserAvatarImage); - afterEach(() => { - wrapper.destroy(); - }); - it('renders title', () => { createComponent(); diff --git a/spec/frontend/issues/new/components/type_popover_spec.js b/spec/frontend/issues/new/components/type_popover_spec.js index fe3d5207516..1ae150797c3 100644 --- a/spec/frontend/issues/new/components/type_popover_spec.js +++ b/spec/frontend/issues/new/components/type_popover_spec.js @@ -8,10 +8,6 @@ describe('Issue type info popover', () => { wrapper = shallowMount(TypePopover); } - afterEach(() => { - wrapper.destroy(); - }); - it('renders', () => { createComponent(); diff --git a/spec/frontend/issues/related_merge_requests/components/related_merge_requests_spec.js b/spec/frontend/issues/related_merge_requests/components/related_merge_requests_spec.js index 010c719bd84..c5507c88fd7 100644 --- a/spec/frontend/issues/related_merge_requests/components/related_merge_requests_spec.js +++ b/spec/frontend/issues/related_merge_requests/components/related_merge_requests_spec.js @@ -34,7 +34,6 @@ describe('RelatedMergeRequests', () => { }); afterEach(() => { - wrapper.destroy(); mock.restore(); }); diff --git a/spec/frontend/issues/show/components/app_spec.js b/spec/frontend/issues/show/components/app_spec.js index 9284e711300..fe841137e9a 100644 --- a/spec/frontend/issues/show/components/app_spec.js +++ b/spec/frontend/issues/show/components/app_spec.js @@ -115,7 +115,6 @@ describe('Issuable output', () => { mock.restore(); realtimeRequestCount = 0; wrapper.vm.poll.stop(); - wrapper.destroy(); resetHTMLFixture(); }); diff --git a/spec/frontend/issues/show/components/delete_issue_modal_spec.js b/spec/frontend/issues/show/components/delete_issue_modal_spec.js index 97a091a1748..b8adeb24005 100644 --- a/spec/frontend/issues/show/components/delete_issue_modal_spec.js +++ b/spec/frontend/issues/show/components/delete_issue_modal_spec.js @@ -20,10 +20,6 @@ describe('DeleteIssueModal component', () => { const mountComponent = (props = {}) => shallowMount(DeleteIssueModal, { propsData: { ...defaultProps, ...props } }); - afterEach(() => { - wrapper.destroy(); - }); - describe('modal', () => { it('renders', () => { wrapper = mountComponent(); diff --git a/spec/frontend/issues/show/components/edit_actions_spec.js b/spec/frontend/issues/show/components/edit_actions_spec.js index 11c43ea4388..ca561149806 100644 --- a/spec/frontend/issues/show/components/edit_actions_spec.js +++ b/spec/frontend/issues/show/components/edit_actions_spec.js @@ -56,10 +56,6 @@ describe('Edit Actions component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders all buttons as enabled', () => { const buttons = findEditButtons().wrappers; buttons.forEach((button) => { diff --git a/spec/frontend/issues/show/components/edited_spec.js b/spec/frontend/issues/show/components/edited_spec.js index aa6e0a9dceb..a509627c347 100644 --- a/spec/frontend/issues/show/components/edited_spec.js +++ b/spec/frontend/issues/show/components/edited_spec.js @@ -15,10 +15,6 @@ describe('Edited component', () => { const mountComponent = (propsData) => mount(Edited, { propsData }); const updatedAt = '2017-05-15T12:31:04.428Z'; - afterEach(() => { - wrapper.destroy(); - }); - it('renders an edited at+by string', () => { wrapper = mountComponent({ updatedAt, diff --git a/spec/frontend/issues/show/components/fields/description_spec.js b/spec/frontend/issues/show/components/fields/description_spec.js index d795a5e2c1a..edb42bf1fdc 100644 --- a/spec/frontend/issues/show/components/fields/description_spec.js +++ b/spec/frontend/issues/show/components/fields/description_spec.js @@ -33,11 +33,6 @@ describe('Description field component', () => { jest.spyOn(eventHub, '$emit'); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders markdown field with description', () => { wrapper = mountComponent(); diff --git a/spec/frontend/issues/show/components/fields/description_template_spec.js b/spec/frontend/issues/show/components/fields/description_template_spec.js index 79a3bfa9840..1e8d5e2dd95 100644 --- a/spec/frontend/issues/show/components/fields/description_template_spec.js +++ b/spec/frontend/issues/show/components/fields/description_template_spec.js @@ -22,10 +22,6 @@ describe('Issue description template component with templates as hash', () => { wrapper = shallowMount(descriptionTemplate, options); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders templates as JSON hash in data attribute', () => { createComponent(); expect(findIssuableSelector().attributes('data-data')).toBe( diff --git a/spec/frontend/issues/show/components/fields/title_spec.js b/spec/frontend/issues/show/components/fields/title_spec.js index a5fa96d8d64..b28762f1520 100644 --- a/spec/frontend/issues/show/components/fields/title_spec.js +++ b/spec/frontend/issues/show/components/fields/title_spec.js @@ -17,11 +17,6 @@ describe('Title field component', () => { }); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders form control with formState title', () => { expect(findInput().element.value).toBe('test'); }); diff --git a/spec/frontend/issues/show/components/fields/type_spec.js b/spec/frontend/issues/show/components/fields/type_spec.js index 27ac0e1baf3..cb1be142f75 100644 --- a/spec/frontend/issues/show/components/fields/type_spec.js +++ b/spec/frontend/issues/show/components/fields/type_spec.js @@ -60,10 +60,6 @@ describe('Issue type field component', () => { mockIssueStateData = jest.fn(); }); - afterEach(() => { - wrapper.destroy(); - }); - it.each` at | text | icon ${0} | ${issuableTypes[0].text} | ${issuableTypes[0].icon} diff --git a/spec/frontend/issues/show/components/form_spec.js b/spec/frontend/issues/show/components/form_spec.js index aedb974cbd0..b8ed33801f2 100644 --- a/spec/frontend/issues/show/components/form_spec.js +++ b/spec/frontend/issues/show/components/form_spec.js @@ -30,10 +30,6 @@ describe('Inline edit form component', () => { projectNamespace: '/', }; - afterEach(() => { - wrapper.destroy(); - }); - const createComponent = (props) => { wrapper = shallowMount(formComponent, { propsData: { diff --git a/spec/frontend/issues/show/components/header_actions_spec.js b/spec/frontend/issues/show/components/header_actions_spec.js index 8871b8297f3..5fb80aaa3e3 100644 --- a/spec/frontend/issues/show/components/header_actions_spec.js +++ b/spec/frontend/issues/show/components/header_actions_spec.js @@ -113,7 +113,6 @@ describe('HeaderActions component', () => { if (visitUrlSpy) { visitUrlSpy.mockRestore(); } - wrapper.destroy(); }); describe.each` diff --git a/spec/frontend/issues/show/components/incidents/create_timeline_events_form_spec.js b/spec/frontend/issues/show/components/incidents/create_timeline_events_form_spec.js index 6c923cae0cc..00e2422de78 100644 --- a/spec/frontend/issues/show/components/incidents/create_timeline_events_form_spec.js +++ b/spec/frontend/issues/show/components/incidents/create_timeline_events_form_spec.js @@ -99,7 +99,6 @@ describe('Create Timeline events', () => { afterEach(() => { createAlert.mockReset(); - wrapper.destroy(); }); describe('createIncidentTimelineEvent', () => { diff --git a/spec/frontend/issues/show/components/incidents/timeline_events_form_spec.js b/spec/frontend/issues/show/components/incidents/timeline_events_form_spec.js index e352f9708e4..3fa9e8061c8 100644 --- a/spec/frontend/issues/show/components/incidents/timeline_events_form_spec.js +++ b/spec/frontend/issues/show/components/incidents/timeline_events_form_spec.js @@ -51,7 +51,6 @@ describe('Timeline events form', () => { afterEach(() => { createAlert.mockReset(); - wrapper.destroy(); }); const findMarkdownField = () => wrapper.findComponent(MarkdownField); diff --git a/spec/frontend/issues/show/components/incidents/timeline_events_list_spec.js b/spec/frontend/issues/show/components/incidents/timeline_events_list_spec.js index 26fda877089..5d198e1e852 100644 --- a/spec/frontend/issues/show/components/incidents/timeline_events_list_spec.js +++ b/spec/frontend/issues/show/components/incidents/timeline_events_list_spec.js @@ -77,10 +77,6 @@ describe('IncidentTimelineEventList', () => { mountComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { it('groups items correctly', () => { expect(findTimelineEventGroups()).toHaveLength(2); diff --git a/spec/frontend/issues/show/components/locked_warning_spec.js b/spec/frontend/issues/show/components/locked_warning_spec.js index dd3c7c58380..f8a8c999632 100644 --- a/spec/frontend/issues/show/components/locked_warning_spec.js +++ b/spec/frontend/issues/show/components/locked_warning_spec.js @@ -13,11 +13,6 @@ describe('LockedWarning component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findAlert = () => wrapper.findComponent(GlAlert); const findLink = () => wrapper.findComponent(GlLink); diff --git a/spec/frontend/jira_connect/branches/components/new_branch_form_spec.js b/spec/frontend/jira_connect/branches/components/new_branch_form_spec.js index d41031f9eaa..5e6b67aec40 100644 --- a/spec/frontend/jira_connect/branches/components/new_branch_form_spec.js +++ b/spec/frontend/jira_connect/branches/components/new_branch_form_spec.js @@ -78,10 +78,6 @@ describe('NewBranchForm', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - describe('when selecting items from dropdowns', () => { describe('when no project selected', () => { beforeEach(() => { diff --git a/spec/frontend/jira_connect/branches/components/project_dropdown_spec.js b/spec/frontend/jira_connect/branches/components/project_dropdown_spec.js index 944854faab3..0a887efee4b 100644 --- a/spec/frontend/jira_connect/branches/components/project_dropdown_spec.js +++ b/spec/frontend/jira_connect/branches/components/project_dropdown_spec.js @@ -49,10 +49,6 @@ describe('ProjectDropdown', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - describe('when loading projects', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/jira_connect/branches/components/source_branch_dropdown_spec.js b/spec/frontend/jira_connect/branches/components/source_branch_dropdown_spec.js index 56e425fa4eb..701512953df 100644 --- a/spec/frontend/jira_connect/branches/components/source_branch_dropdown_spec.js +++ b/spec/frontend/jira_connect/branches/components/source_branch_dropdown_spec.js @@ -54,10 +54,6 @@ describe('SourceBranchDropdown', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - describe('when `selectedProject` prop is not specified', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/jira_connect/branches/pages/index_spec.js b/spec/frontend/jira_connect/branches/pages/index_spec.js index 92976dd28da..4b79d5feab5 100644 --- a/spec/frontend/jira_connect/branches/pages/index_spec.js +++ b/spec/frontend/jira_connect/branches/pages/index_spec.js @@ -25,10 +25,6 @@ describe('NewBranchForm', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - describe('page title', () => { it.each` initialBranchName | pageTitle diff --git a/spec/frontend/jira_connect/subscriptions/components/add_namespace_button_spec.js b/spec/frontend/jira_connect/subscriptions/components/add_namespace_button_spec.js index 06fad25dbf3..934473c15ba 100644 --- a/spec/frontend/jira_connect/subscriptions/components/add_namespace_button_spec.js +++ b/spec/frontend/jira_connect/subscriptions/components/add_namespace_button_spec.js @@ -23,10 +23,6 @@ describe('AddNamespaceButton', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('displays a button', () => { expect(findButton().exists()).toBe(true); }); diff --git a/spec/frontend/jira_connect/subscriptions/components/add_namespace_modal/add_namespace_modal_spec.js b/spec/frontend/jira_connect/subscriptions/components/add_namespace_modal/add_namespace_modal_spec.js index d80381107f2..dbe8a734bb4 100644 --- a/spec/frontend/jira_connect/subscriptions/components/add_namespace_modal/add_namespace_modal_spec.js +++ b/spec/frontend/jira_connect/subscriptions/components/add_namespace_modal/add_namespace_modal_spec.js @@ -17,10 +17,6 @@ describe('AddNamespaceModal', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('displays modal with correct props', () => { const modal = findModal(); expect(modal.exists()).toBe(true); diff --git a/spec/frontend/jira_connect/subscriptions/components/add_namespace_modal/groups_list_item_spec.js b/spec/frontend/jira_connect/subscriptions/components/add_namespace_modal/groups_list_item_spec.js index 5df54abfc05..e437e6e0398 100644 --- a/spec/frontend/jira_connect/subscriptions/components/add_namespace_modal/groups_list_item_spec.js +++ b/spec/frontend/jira_connect/subscriptions/components/add_namespace_modal/groups_list_item_spec.js @@ -40,10 +40,6 @@ describe('GroupsListItem', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findGroupItemName = () => wrapper.findComponent(GroupItemName); const findLinkButton = () => wrapper.findComponent(GlButton); const clickLinkButton = () => findLinkButton().trigger('click'); diff --git a/spec/frontend/jira_connect/subscriptions/components/add_namespace_modal/groups_list_spec.js b/spec/frontend/jira_connect/subscriptions/components/add_namespace_modal/groups_list_spec.js index 97038a2a231..9d5bc8dff2a 100644 --- a/spec/frontend/jira_connect/subscriptions/components/add_namespace_modal/groups_list_spec.js +++ b/spec/frontend/jira_connect/subscriptions/components/add_namespace_modal/groups_list_spec.js @@ -48,10 +48,6 @@ describe('GroupsList', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - const findGlAlert = () => wrapper.findComponent(GlAlert); const findGlLoadingIcon = () => wrapper.findComponent(GlLoadingIcon); const findAllItems = () => wrapper.findAllComponents(GroupsListItem); diff --git a/spec/frontend/jira_connect/subscriptions/components/app_spec.js b/spec/frontend/jira_connect/subscriptions/components/app_spec.js index 369ddda8dbe..aa4feaa5261 100644 --- a/spec/frontend/jira_connect/subscriptions/components/app_spec.js +++ b/spec/frontend/jira_connect/subscriptions/components/app_spec.js @@ -41,10 +41,6 @@ describe('JiraConnectApp', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { describe.each` scenario | usersPath | shouldRenderSignInPage | shouldRenderSubscriptionsPage diff --git a/spec/frontend/jira_connect/subscriptions/components/browser_support_alert_spec.js b/spec/frontend/jira_connect/subscriptions/components/browser_support_alert_spec.js index aa93a6be3c8..a8aa383d917 100644 --- a/spec/frontend/jira_connect/subscriptions/components/browser_support_alert_spec.js +++ b/spec/frontend/jira_connect/subscriptions/components/browser_support_alert_spec.js @@ -12,10 +12,6 @@ describe('BrowserSupportAlert', () => { const findAlert = () => wrapper.findComponent(GlAlert); const findLink = () => wrapper.findComponent(GlLink); - afterEach(() => { - wrapper.destroy(); - }); - it('displays a non-dismissible alert', () => { createComponent(); diff --git a/spec/frontend/jira_connect/subscriptions/components/group_item_name_spec.js b/spec/frontend/jira_connect/subscriptions/components/group_item_name_spec.js index b5fe08486b1..e4da10569f3 100644 --- a/spec/frontend/jira_connect/subscriptions/components/group_item_name_spec.js +++ b/spec/frontend/jira_connect/subscriptions/components/group_item_name_spec.js @@ -14,10 +14,6 @@ describe('GroupItemName', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { it('matches the snapshot', () => { createComponent(); diff --git a/spec/frontend/jira_connect/subscriptions/components/sign_in_legacy_button_spec.js b/spec/frontend/jira_connect/subscriptions/components/sign_in_legacy_button_spec.js index 4ebfaed261e..0dadec598e4 100644 --- a/spec/frontend/jira_connect/subscriptions/components/sign_in_legacy_button_spec.js +++ b/spec/frontend/jira_connect/subscriptions/components/sign_in_legacy_button_spec.js @@ -22,10 +22,6 @@ describe('SignInLegacyButton', () => { const findButton = () => wrapper.findComponent(GlButton); - afterEach(() => { - wrapper.destroy(); - }); - it('displays a button', () => { createComponent(); diff --git a/spec/frontend/jira_connect/subscriptions/components/sign_in_oauth_button_spec.js b/spec/frontend/jira_connect/subscriptions/components/sign_in_oauth_button_spec.js index e20c4b62e77..9d39b82c05f 100644 --- a/spec/frontend/jira_connect/subscriptions/components/sign_in_oauth_button_spec.js +++ b/spec/frontend/jira_connect/subscriptions/components/sign_in_oauth_button_spec.js @@ -56,10 +56,6 @@ describe('SignInOauthButton', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findButton = () => wrapper.findComponent(GlButton); describe('when `gitlabBasePath` is GitLab.com', () => { it('displays a button', () => { diff --git a/spec/frontend/jira_connect/subscriptions/components/subscriptions_list_spec.js b/spec/frontend/jira_connect/subscriptions/components/subscriptions_list_spec.js index 2d7c58fc278..5337575d5ef 100644 --- a/spec/frontend/jira_connect/subscriptions/components/subscriptions_list_spec.js +++ b/spec/frontend/jira_connect/subscriptions/components/subscriptions_list_spec.js @@ -29,10 +29,6 @@ describe('SubscriptionsList', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findUnlinkButton = () => wrapper.findComponent(GlButton); const clickUnlinkButton = () => findUnlinkButton().trigger('click'); diff --git a/spec/frontend/jira_connect/subscriptions/components/user_link_spec.js b/spec/frontend/jira_connect/subscriptions/components/user_link_spec.js index e16121243a0..c0bd908da0f 100644 --- a/spec/frontend/jira_connect/subscriptions/components/user_link_spec.js +++ b/spec/frontend/jira_connect/subscriptions/components/user_link_spec.js @@ -28,10 +28,6 @@ describe('UserLink', () => { const findSprintf = () => wrapper.findComponent(GlSprintf); const findOauthButton = () => wrapper.findComponent(SignInOauthButton); - afterEach(() => { - wrapper.destroy(); - }); - describe.each` userSignedIn | hasSubscriptions | expectGlSprintf | expectGlLink | expectOauthButton | jiraConnectOauthEnabled ${true} | ${false} | ${true} | ${false} | ${false} | ${false} diff --git a/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_com_spec.js b/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_com_spec.js index b9a8451f3b3..be46c1d1609 100644 --- a/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_com_spec.js +++ b/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_com_spec.js @@ -42,10 +42,6 @@ describe('SignInGitlabCom', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { describe.each` scenario | hasSubscriptions | signInButtonText diff --git a/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index_spec.js b/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index_spec.js index e98c6ff1054..d99d8986296 100644 --- a/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index_spec.js +++ b/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index_spec.js @@ -32,10 +32,6 @@ describe('SignInGitlabMultiversion', () => { wrapper = shallowMountExtended(SignInGitlabMultiversion); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when version is not selected', () => { describe('VersionSelectForm', () => { it('renders version select form', () => { diff --git a/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/version_select_form_spec.js b/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/version_select_form_spec.js index 29e7fe7a5b2..428aa1d734b 100644 --- a/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/version_select_form_spec.js +++ b/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/version_select_form_spec.js @@ -17,10 +17,6 @@ describe('VersionSelectForm', () => { wrapper = shallowMountExtended(VersionSelectForm); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('default state', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_page_spec.js b/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_page_spec.js index b27eba6b040..7639c3a9c3f 100644 --- a/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_page_spec.js +++ b/spec/frontend/jira_connect/subscriptions/pages/sign_in/sign_in_page_spec.js @@ -34,10 +34,6 @@ describe('SignInPage', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it.each` jiraConnectOauthEnabled | publicKeyStorageEnabled | shouldRenderDotCom | shouldRenderMultiversion ${false} | ${true} | ${true} | ${false} diff --git a/spec/frontend/jira_connect/subscriptions/pages/subscriptions_page_spec.js b/spec/frontend/jira_connect/subscriptions/pages/subscriptions_page_spec.js index 4956af76ead..d262f4b2735 100644 --- a/spec/frontend/jira_connect/subscriptions/pages/subscriptions_page_spec.js +++ b/spec/frontend/jira_connect/subscriptions/pages/subscriptions_page_spec.js @@ -26,10 +26,6 @@ describe('SubscriptionsPage', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { describe.each` scenario | subscriptionsLoading | hasSubscriptions | expectSubscriptionsList | expectEmptyState diff --git a/spec/frontend/jira_import/components/jira_import_app_spec.js b/spec/frontend/jira_import/components/jira_import_app_spec.js index 022a0f81aaa..dc1b75f5d9e 100644 --- a/spec/frontend/jira_import/components/jira_import_app_spec.js +++ b/spec/frontend/jira_import/components/jira_import_app_spec.js @@ -67,11 +67,6 @@ describe('JiraImportApp', () => { }, }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when Jira integration is not configured', () => { beforeEach(() => { wrapper = mountComponent({ isJiraConfigured: false }); diff --git a/spec/frontend/jira_import/components/jira_import_form_spec.js b/spec/frontend/jira_import/components/jira_import_form_spec.js index d43a9f8a145..c7db9f429de 100644 --- a/spec/frontend/jira_import/components/jira_import_form_spec.js +++ b/spec/frontend/jira_import/components/jira_import_form_spec.js @@ -106,7 +106,6 @@ describe('JiraImportForm', () => { axiosMock.restore(); mutateSpy.mockRestore(); querySpy.mockRestore(); - wrapper.destroy(); }); describe('select dropdown project selection', () => { diff --git a/spec/frontend/jira_import/components/jira_import_progress_spec.js b/spec/frontend/jira_import/components/jira_import_progress_spec.js index 42356763492..c0d415a2130 100644 --- a/spec/frontend/jira_import/components/jira_import_progress_spec.js +++ b/spec/frontend/jira_import/components/jira_import_progress_spec.js @@ -25,11 +25,6 @@ describe('JiraImportProgress', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('empty state', () => { beforeEach(() => { wrapper = mountComponent(); diff --git a/spec/frontend/jira_import/components/jira_import_setup_spec.js b/spec/frontend/jira_import/components/jira_import_setup_spec.js index 0085a2b5572..5331467d669 100644 --- a/spec/frontend/jira_import/components/jira_import_setup_spec.js +++ b/spec/frontend/jira_import/components/jira_import_setup_spec.js @@ -17,11 +17,6 @@ describe('JiraImportSetup', () => { }); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('contains illustration', () => { expect(getGlEmptyStateProp('svgPath')).toBe(illustration); }); diff --git a/spec/frontend/jobs/components/filtered_search/jobs_filtered_search_spec.js b/spec/frontend/jobs/components/filtered_search/jobs_filtered_search_spec.js index 14613775791..5ecddc7efd6 100644 --- a/spec/frontend/jobs/components/filtered_search/jobs_filtered_search_spec.js +++ b/spec/frontend/jobs/components/filtered_search/jobs_filtered_search_spec.js @@ -27,10 +27,6 @@ describe('Jobs filtered search', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('displays filtered search', () => { createComponent(); diff --git a/spec/frontend/jobs/components/filtered_search/tokens/job_status_token_spec.js b/spec/frontend/jobs/components/filtered_search/tokens/job_status_token_spec.js index fbe5f6a2e11..6755b854f01 100644 --- a/spec/frontend/jobs/components/filtered_search/tokens/job_status_token_spec.js +++ b/spec/frontend/jobs/components/filtered_search/tokens/job_status_token_spec.js @@ -45,10 +45,6 @@ describe('Job Status Token', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('passes config correctly', () => { expect(findFilteredSearchToken().props('config')).toEqual(defaultProps.config); }); diff --git a/spec/frontend/jobs/components/job/artifacts_block_spec.js b/spec/frontend/jobs/components/job/artifacts_block_spec.js index c75deb64d84..ea5d727bd08 100644 --- a/spec/frontend/jobs/components/job/artifacts_block_spec.js +++ b/spec/frontend/jobs/components/job/artifacts_block_spec.js @@ -55,11 +55,6 @@ describe('Artifacts block', () => { locked: true, }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('with expired artifacts that are not locked', () => { beforeEach(() => { wrapper = createWrapper({ diff --git a/spec/frontend/jobs/components/job/commit_block_spec.js b/spec/frontend/jobs/components/job/commit_block_spec.js index 4fcc754c82c..1c28b5079d7 100644 --- a/spec/frontend/jobs/components/job/commit_block_spec.js +++ b/spec/frontend/jobs/components/job/commit_block_spec.js @@ -32,10 +32,6 @@ describe('Commit block', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('without merge request', () => { beforeEach(() => { mountComponent(); diff --git a/spec/frontend/jobs/components/job/environments_block_spec.js b/spec/frontend/jobs/components/job/environments_block_spec.js index 134533e2af8..ab36f79ea5e 100644 --- a/spec/frontend/jobs/components/job/environments_block_spec.js +++ b/spec/frontend/jobs/components/job/environments_block_spec.js @@ -51,11 +51,6 @@ describe('Environments block', () => { const findEnvironmentLink = () => wrapper.find('[data-testid="job-environment-link"]'); const findClusterLink = () => wrapper.find('[data-testid="job-cluster-link"]'); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('with last deployment', () => { it('renders info for most recent deployment', () => { createComponent({ diff --git a/spec/frontend/jobs/components/job/erased_block_spec.js b/spec/frontend/jobs/components/job/erased_block_spec.js index c6aba01fa53..aeab676fc7e 100644 --- a/spec/frontend/jobs/components/job/erased_block_spec.js +++ b/spec/frontend/jobs/components/job/erased_block_spec.js @@ -18,10 +18,6 @@ describe('Erased block', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('with job erased by user', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/jobs/components/job/job_app_spec.js b/spec/frontend/jobs/components/job/job_app_spec.js index cefedcd82fb..394fc8ad43c 100644 --- a/spec/frontend/jobs/components/job/job_app_spec.js +++ b/spec/frontend/jobs/components/job/job_app_spec.js @@ -83,8 +83,9 @@ describe('Job App', () => { }); afterEach(() => { - wrapper.destroy(); mock.restore(); + // eslint-disable-next-line @gitlab/vtu-no-explicit-wrapper-destroy + wrapper.destroy(); }); describe('while loading', () => { diff --git a/spec/frontend/jobs/components/job/job_container_item_spec.js b/spec/frontend/jobs/components/job/job_container_item_spec.js index 05c38dd74b7..8121aa1172f 100644 --- a/spec/frontend/jobs/components/job/job_container_item_spec.js +++ b/spec/frontend/jobs/components/job/job_container_item_spec.js @@ -24,11 +24,6 @@ describe('JobContainerItem', () => { }); } - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when a job is not active and not retried', () => { beforeEach(() => { createComponent(job); diff --git a/spec/frontend/jobs/components/job/jobs_container_spec.js b/spec/frontend/jobs/components/job/jobs_container_spec.js index 2fde4d3020b..05660880751 100644 --- a/spec/frontend/jobs/components/job/jobs_container_spec.js +++ b/spec/frontend/jobs/components/job/jobs_container_spec.js @@ -68,10 +68,6 @@ describe('Jobs List block', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders a list of jobs', () => { createComponent({ jobs: [job, retried, active], diff --git a/spec/frontend/jobs/components/job/manual_variables_form_spec.js b/spec/frontend/jobs/components/job/manual_variables_form_spec.js index 7d355ff0a82..98b9ca78a45 100644 --- a/spec/frontend/jobs/components/job/manual_variables_form_spec.js +++ b/spec/frontend/jobs/components/job/manual_variables_form_spec.js @@ -102,7 +102,6 @@ describe('Manual Variables Form', () => { afterEach(() => { createAlert.mockClear(); - wrapper.destroy(); }); describe('when page renders', () => { diff --git a/spec/frontend/jobs/components/job/sidebar_detail_row_spec.js b/spec/frontend/jobs/components/job/sidebar_detail_row_spec.js index 5c9c011b4ab..dd5a9e3491d 100644 --- a/spec/frontend/jobs/components/job/sidebar_detail_row_spec.js +++ b/spec/frontend/jobs/components/job/sidebar_detail_row_spec.js @@ -19,11 +19,6 @@ describe('Sidebar detail row', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('with title/value and without helpUrl', () => { beforeEach(() => { createComponent({ title, value }); diff --git a/spec/frontend/jobs/components/job/sidebar_spec.js b/spec/frontend/jobs/components/job/sidebar_spec.js index aa9ca932023..cefa4582c15 100644 --- a/spec/frontend/jobs/components/job/sidebar_spec.js +++ b/spec/frontend/jobs/components/job/sidebar_spec.js @@ -48,10 +48,6 @@ describe('Sidebar details block', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('without terminal path', () => { it('does not render terminal link', async () => { createWrapper(); diff --git a/spec/frontend/jobs/components/job/stages_dropdown_spec.js b/spec/frontend/jobs/components/job/stages_dropdown_spec.js index 61dec585e82..f782d5600e6 100644 --- a/spec/frontend/jobs/components/job/stages_dropdown_spec.js +++ b/spec/frontend/jobs/components/job/stages_dropdown_spec.js @@ -37,10 +37,6 @@ describe('Stages Dropdown', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('without a merge request pipeline', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/jobs/components/job/trigger_block_spec.js b/spec/frontend/jobs/components/job/trigger_block_spec.js index a1de8fd143f..8bb2c1f3ad8 100644 --- a/spec/frontend/jobs/components/job/trigger_block_spec.js +++ b/spec/frontend/jobs/components/job/trigger_block_spec.js @@ -20,10 +20,6 @@ describe('Trigger block', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('with short token and no variables', () => { it('renders short token', () => { createComponent({ diff --git a/spec/frontend/jobs/components/job/unmet_prerequisites_block_spec.js b/spec/frontend/jobs/components/job/unmet_prerequisites_block_spec.js index fb7d389c4d6..1072cdd6781 100644 --- a/spec/frontend/jobs/components/job/unmet_prerequisites_block_spec.js +++ b/spec/frontend/jobs/components/job/unmet_prerequisites_block_spec.js @@ -18,10 +18,6 @@ describe('Unmet Prerequisites Block Job component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders an alert with the correct message', () => { const container = wrapper.findComponent(GlAlert); const alertMessage = diff --git a/spec/frontend/jobs/components/log/collapsible_section_spec.js b/spec/frontend/jobs/components/log/collapsible_section_spec.js index 646935568b1..5adedea28a5 100644 --- a/spec/frontend/jobs/components/log/collapsible_section_spec.js +++ b/spec/frontend/jobs/components/log/collapsible_section_spec.js @@ -19,10 +19,6 @@ describe('Job Log Collapsible Section', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('with closed section', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/jobs/components/log/duration_badge_spec.js b/spec/frontend/jobs/components/log/duration_badge_spec.js index 84dae386bdb..644d05366a0 100644 --- a/spec/frontend/jobs/components/log/duration_badge_spec.js +++ b/spec/frontend/jobs/components/log/duration_badge_spec.js @@ -20,10 +20,6 @@ describe('Job Log Duration Badge', () => { createComponent(data); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders provided duration', () => { expect(wrapper.text()).toBe(data.duration); }); diff --git a/spec/frontend/jobs/components/log/line_header_spec.js b/spec/frontend/jobs/components/log/line_header_spec.js index ec8e79bba13..16fe753e08a 100644 --- a/spec/frontend/jobs/components/log/line_header_spec.js +++ b/spec/frontend/jobs/components/log/line_header_spec.js @@ -29,10 +29,6 @@ describe('Job Log Header Line', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('line', () => { beforeEach(() => { createComponent(data); diff --git a/spec/frontend/jobs/components/log/line_number_spec.js b/spec/frontend/jobs/components/log/line_number_spec.js index 96aa31baab9..4130c124a30 100644 --- a/spec/frontend/jobs/components/log/line_number_spec.js +++ b/spec/frontend/jobs/components/log/line_number_spec.js @@ -21,10 +21,6 @@ describe('Job Log Line Number', () => { createComponent(data); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders incremented lineNunber by 1', () => { expect(wrapper.text()).toBe('1'); }); diff --git a/spec/frontend/jobs/components/table/cells/duration_cell_spec.js b/spec/frontend/jobs/components/table/cells/duration_cell_spec.js index 763a4b0eaa2..d015edb0e91 100644 --- a/spec/frontend/jobs/components/table/cells/duration_cell_spec.js +++ b/spec/frontend/jobs/components/table/cells/duration_cell_spec.js @@ -22,10 +22,6 @@ describe('Duration Cell', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - it('does not display duration or finished time when no properties are present', () => { createComponent(); diff --git a/spec/frontend/jobs/components/table/cells/job_cell_spec.js b/spec/frontend/jobs/components/table/cells/job_cell_spec.js index ddc196129a7..73e37eed5f1 100644 --- a/spec/frontend/jobs/components/table/cells/job_cell_spec.js +++ b/spec/frontend/jobs/components/table/cells/job_cell_spec.js @@ -39,10 +39,6 @@ describe('Job Cell', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('Job Id', () => { it('displays the job id and links to the job', () => { createComponent(); diff --git a/spec/frontend/jobs/components/table/cells/pipeline_cell_spec.js b/spec/frontend/jobs/components/table/cells/pipeline_cell_spec.js index 1f5e0a7aa21..3d424b20964 100644 --- a/spec/frontend/jobs/components/table/cells/pipeline_cell_spec.js +++ b/spec/frontend/jobs/components/table/cells/pipeline_cell_spec.js @@ -42,10 +42,6 @@ describe('Pipeline Cell', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('Pipeline Id', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/jobs/components/table/job_table_app_spec.js b/spec/frontend/jobs/components/table/job_table_app_spec.js index f13cab596da..6247cfcc640 100644 --- a/spec/frontend/jobs/components/table/job_table_app_spec.js +++ b/spec/frontend/jobs/components/table/job_table_app_spec.js @@ -80,10 +80,6 @@ describe('Job table app', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('loading state', () => { it('should display skeleton loader when loading', () => { createComponent(); diff --git a/spec/frontend/jobs/components/table/jobs_table_spec.js b/spec/frontend/jobs/components/table/jobs_table_spec.js index 3c4f2d624fe..06b13aa4372 100644 --- a/spec/frontend/jobs/components/table/jobs_table_spec.js +++ b/spec/frontend/jobs/components/table/jobs_table_spec.js @@ -30,10 +30,6 @@ describe('Jobs Table', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('displays the jobs table', () => { expect(findTable().exists()).toBe(true); }); diff --git a/spec/frontend/jobs/components/table/jobs_table_tabs_spec.js b/spec/frontend/jobs/components/table/jobs_table_tabs_spec.js index 23632001060..70bcac82a3f 100644 --- a/spec/frontend/jobs/components/table/jobs_table_tabs_spec.js +++ b/spec/frontend/jobs/components/table/jobs_table_tabs_spec.js @@ -42,10 +42,6 @@ describe('Jobs Table Tabs', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('displays All tab with count', () => { expect(trimText(findAllTab().text())).toBe(`All ${defaultProps.allJobsCount}`); }); diff --git a/spec/frontend/jobs/mixins/delayed_job_mixin_spec.js b/spec/frontend/jobs/mixins/delayed_job_mixin_spec.js index 1d3845b19bb..098a63719fe 100644 --- a/spec/frontend/jobs/mixins/delayed_job_mixin_spec.js +++ b/spec/frontend/jobs/mixins/delayed_job_mixin_spec.js @@ -16,11 +16,6 @@ describe('DelayedJobMixin', () => { template: '<div>{{remainingTime}}</div>', }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('if job is empty object', () => { beforeEach(() => { wrapper = shallowMount(dummyComponent, { diff --git a/spec/frontend/labels/components/delete_label_modal_spec.js b/spec/frontend/labels/components/delete_label_modal_spec.js index 24a803d3f16..7654d218209 100644 --- a/spec/frontend/labels/components/delete_label_modal_spec.js +++ b/spec/frontend/labels/components/delete_label_modal_spec.js @@ -30,10 +30,6 @@ describe('~/labels/components/delete_label_modal', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - const findModal = () => wrapper.findComponent(GlModal); const findPrimaryModalButton = () => wrapper.findByTestId('delete-button'); diff --git a/spec/frontend/labels/components/promote_label_modal_spec.js b/spec/frontend/labels/components/promote_label_modal_spec.js index 97913c20229..5983c16a9d1 100644 --- a/spec/frontend/labels/components/promote_label_modal_spec.js +++ b/spec/frontend/labels/components/promote_label_modal_spec.js @@ -41,7 +41,6 @@ describe('Promote label modal', () => { afterEach(() => { axiosMock.reset(); - wrapper.destroy(); }); describe('Modal title and description', () => { diff --git a/spec/frontend/language_switcher/components/app_spec.js b/spec/frontend/language_switcher/components/app_spec.js index 7f6fb138d89..036ff55fef7 100644 --- a/spec/frontend/language_switcher/components/app_spec.js +++ b/spec/frontend/language_switcher/components/app_spec.js @@ -24,10 +24,6 @@ describe('<LanguageSwitcher />', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - const getPreferredLanguage = () => wrapper.find('.gl-new-dropdown-button-text').text(); const findLanguageDropdownItem = (code) => wrapper.findByTestId(`language_switcher_lang_${code}`); const findFooter = () => wrapper.findByTestId('footer'); diff --git a/spec/frontend/lib/utils/confirm_via_gl_modal/confirm_action_spec.js b/spec/frontend/lib/utils/confirm_via_gl_modal/confirm_action_spec.js index 142c76f7bc0..9b790e739fb 100644 --- a/spec/frontend/lib/utils/confirm_via_gl_modal/confirm_action_spec.js +++ b/spec/frontend/lib/utils/confirm_via_gl_modal/confirm_action_spec.js @@ -44,7 +44,6 @@ describe('confirmAction', () => { resetHTMLFixture(); Vue.prototype.$mount.mockRestore(); modalWrapper?.destroy(); - modalWrapper = null; modal?.destroy(); modal = null; }); diff --git a/spec/frontend/lib/utils/confirm_via_gl_modal/confirm_modal_spec.js b/spec/frontend/lib/utils/confirm_via_gl_modal/confirm_modal_spec.js index 313e028d861..c135180c9df 100644 --- a/spec/frontend/lib/utils/confirm_via_gl_modal/confirm_modal_spec.js +++ b/spec/frontend/lib/utils/confirm_via_gl_modal/confirm_modal_spec.js @@ -28,10 +28,6 @@ describe('Confirm Modal', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findGlModal = () => wrapper.findComponent(GlModal); describe('Modal events', () => { diff --git a/spec/frontend/lib/utils/vuex_module_mappers_spec.js b/spec/frontend/lib/utils/vuex_module_mappers_spec.js index d25a692dfea..abd5095c1d2 100644 --- a/spec/frontend/lib/utils/vuex_module_mappers_spec.js +++ b/spec/frontend/lib/utils/vuex_module_mappers_spec.js @@ -96,10 +96,6 @@ describe('~/lib/utils/vuex_module_mappers', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('from module defined by prop', () => { it('maps state', () => { expect(getMappedState()).toEqual({ diff --git a/spec/frontend/members/components/action_buttons/access_request_action_buttons_spec.js b/spec/frontend/members/components/action_buttons/access_request_action_buttons_spec.js index b94964dc482..c2e0e44f97f 100644 --- a/spec/frontend/members/components/action_buttons/access_request_action_buttons_spec.js +++ b/spec/frontend/members/components/action_buttons/access_request_action_buttons_spec.js @@ -20,10 +20,6 @@ describe('AccessRequestActionButtons', () => { const findRemoveMemberButton = () => wrapper.findComponent(RemoveMemberButton); const findApproveButton = () => wrapper.findComponent(ApproveAccessRequestButton); - afterEach(() => { - wrapper.destroy(); - }); - it('renders remove member button', () => { createComponent(); diff --git a/spec/frontend/members/components/action_buttons/approve_access_request_button_spec.js b/spec/frontend/members/components/action_buttons/approve_access_request_button_spec.js index 621ed968972..7a4cd844425 100644 --- a/spec/frontend/members/components/action_buttons/approve_access_request_button_spec.js +++ b/spec/frontend/members/components/action_buttons/approve_access_request_button_spec.js @@ -50,10 +50,6 @@ describe('ApproveAccessRequestButton', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('displays a tooltip', () => { const button = findButton(); diff --git a/spec/frontend/members/components/action_buttons/invite_action_buttons_spec.js b/spec/frontend/members/components/action_buttons/invite_action_buttons_spec.js index 68009708c99..a852443844b 100644 --- a/spec/frontend/members/components/action_buttons/invite_action_buttons_spec.js +++ b/spec/frontend/members/components/action_buttons/invite_action_buttons_spec.js @@ -19,10 +19,6 @@ describe('InviteActionButtons', () => { const findRemoveMemberButton = () => wrapper.findComponent(RemoveMemberButton); const findResendInviteButton = () => wrapper.findComponent(ResendInviteButton); - afterEach(() => { - wrapper.destroy(); - }); - describe('when user has `canRemove` permissions', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/members/components/action_buttons/remove_group_link_button_spec.js b/spec/frontend/members/components/action_buttons/remove_group_link_button_spec.js index 4b50aa083ee..1d83a2e0e71 100644 --- a/spec/frontend/members/components/action_buttons/remove_group_link_button_spec.js +++ b/spec/frontend/members/components/action_buttons/remove_group_link_button_spec.js @@ -48,11 +48,6 @@ describe('RemoveGroupLinkButton', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('displays a tooltip', () => { const button = findButton(); diff --git a/spec/frontend/members/components/action_buttons/remove_member_button_spec.js b/spec/frontend/members/components/action_buttons/remove_member_button_spec.js index d3d732f9793..3879279b559 100644 --- a/spec/frontend/members/components/action_buttons/remove_member_button_spec.js +++ b/spec/frontend/members/components/action_buttons/remove_member_button_spec.js @@ -58,10 +58,6 @@ describe('RemoveMemberButton', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('sets attributes on button', () => { expect(wrapper.attributes()).toMatchObject({ 'aria-label': 'Remove member', diff --git a/spec/frontend/members/components/action_buttons/resend_invite_button_spec.js b/spec/frontend/members/components/action_buttons/resend_invite_button_spec.js index ca51cbea1d1..a6b5978b566 100644 --- a/spec/frontend/members/components/action_buttons/resend_invite_button_spec.js +++ b/spec/frontend/members/components/action_buttons/resend_invite_button_spec.js @@ -50,10 +50,6 @@ describe('ResendInviteButton', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('displays a tooltip', () => { expect(getBinding(findButton().element, 'gl-tooltip')).not.toBeUndefined(); expect(findButton().attributes('title')).toBe('Resend invite'); diff --git a/spec/frontend/members/components/action_dropdowns/leave_group_dropdown_item_spec.js b/spec/frontend/members/components/action_dropdowns/leave_group_dropdown_item_spec.js index b88f9cd0db2..679ad7897ed 100644 --- a/spec/frontend/members/components/action_dropdowns/leave_group_dropdown_item_spec.js +++ b/spec/frontend/members/components/action_dropdowns/leave_group_dropdown_item_spec.js @@ -32,10 +32,6 @@ describe('LeaveGroupDropdownItem', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders a slot with red text', () => { expect(findDropdownItem().html()).toContain(`<span class="gl-text-red-500">${text}</span>`); }); diff --git a/spec/frontend/members/components/action_dropdowns/remove_member_dropdown_item_spec.js b/spec/frontend/members/components/action_dropdowns/remove_member_dropdown_item_spec.js index e1c498249d7..125f1f8fff3 100644 --- a/spec/frontend/members/components/action_dropdowns/remove_member_dropdown_item_spec.js +++ b/spec/frontend/members/components/action_dropdowns/remove_member_dropdown_item_spec.js @@ -58,10 +58,6 @@ describe('RemoveMemberDropdownItem', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders a slot with red text', () => { expect(findDropdownItem().html()).toContain(`<span class="gl-text-red-500">${text}</span>`); }); diff --git a/spec/frontend/members/components/action_dropdowns/user_action_dropdown_spec.js b/spec/frontend/members/components/action_dropdowns/user_action_dropdown_spec.js index cc1d9972f60..448c04bcb69 100644 --- a/spec/frontend/members/components/action_dropdowns/user_action_dropdown_spec.js +++ b/spec/frontend/members/components/action_dropdowns/user_action_dropdown_spec.js @@ -31,10 +31,6 @@ describe('UserActionDropdown', () => { const findRemoveMemberDropdownItem = () => wrapper.findComponent(RemoveMemberDropdownItem); - afterEach(() => { - wrapper.destroy(); - }); - describe('when user has `canRemove` permissions', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/members/components/app_spec.js b/spec/frontend/members/components/app_spec.js index d105a4d9fde..b2147163233 100644 --- a/spec/frontend/members/components/app_spec.js +++ b/spec/frontend/members/components/app_spec.js @@ -49,7 +49,6 @@ describe('MembersApp', () => { }); afterEach(() => { - wrapper.destroy(); store = null; }); diff --git a/spec/frontend/members/components/avatars/group_avatar_spec.js b/spec/frontend/members/components/avatars/group_avatar_spec.js index 13c50de9835..8e4263f88fe 100644 --- a/spec/frontend/members/components/avatars/group_avatar_spec.js +++ b/spec/frontend/members/components/avatars/group_avatar_spec.js @@ -25,10 +25,6 @@ describe('MemberList', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders link to group', () => { const link = wrapper.findComponent(GlAvatarLink); diff --git a/spec/frontend/members/components/avatars/invite_avatar_spec.js b/spec/frontend/members/components/avatars/invite_avatar_spec.js index b197a46c0d1..84878fb9be2 100644 --- a/spec/frontend/members/components/avatars/invite_avatar_spec.js +++ b/spec/frontend/members/components/avatars/invite_avatar_spec.js @@ -24,10 +24,6 @@ describe('MemberList', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders email as name', () => { expect(getByText(invite.email).exists()).toBe(true); }); diff --git a/spec/frontend/members/components/avatars/user_avatar_spec.js b/spec/frontend/members/components/avatars/user_avatar_spec.js index 9172876e76f..4808bcb9363 100644 --- a/spec/frontend/members/components/avatars/user_avatar_spec.js +++ b/spec/frontend/members/components/avatars/user_avatar_spec.js @@ -26,10 +26,6 @@ describe('UserAvatar', () => { const findStatusEmoji = (emoji) => wrapper.find(`gl-emoji[data-name="${emoji}"]`); - afterEach(() => { - wrapper.destroy(); - }); - it("renders link to user's profile", () => { createComponent(); diff --git a/spec/frontend/members/components/members_tabs_spec.js b/spec/frontend/members/components/members_tabs_spec.js index 77af5e7293e..9078bd87d62 100644 --- a/spec/frontend/members/components/members_tabs_spec.js +++ b/spec/frontend/members/components/members_tabs_spec.js @@ -100,10 +100,6 @@ describe('MembersTabs', () => { setWindowLocation('https://localhost'); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders `GlTabs` with `syncActiveTabWithQueryParams` and `queryParamName` props set', async () => { await createComponent(); diff --git a/spec/frontend/members/components/modals/leave_modal_spec.js b/spec/frontend/members/components/modals/leave_modal_spec.js index ba587c6f0b3..cec5f192e59 100644 --- a/spec/frontend/members/components/modals/leave_modal_spec.js +++ b/spec/frontend/members/components/modals/leave_modal_spec.js @@ -60,10 +60,6 @@ describe('LeaveModal', () => { const findForm = () => findModal().findComponent(GlForm); const findUserDeletionObstaclesList = () => findModal().findComponent(UserDeletionObstaclesList); - afterEach(() => { - wrapper.destroy(); - }); - it('sets modal ID', async () => { await createComponent(); diff --git a/spec/frontend/members/components/modals/remove_group_link_modal_spec.js b/spec/frontend/members/components/modals/remove_group_link_modal_spec.js index af96396f09f..e4782ac7f2e 100644 --- a/spec/frontend/members/components/modals/remove_group_link_modal_spec.js +++ b/spec/frontend/members/components/modals/remove_group_link_modal_spec.js @@ -52,11 +52,6 @@ describe('RemoveGroupLinkModal', () => { const getByText = (text, options) => createWrapper(within(findModal().element).getByText(text, options)); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when modal is open', () => { beforeEach(async () => { createComponent(); diff --git a/spec/frontend/members/components/modals/remove_member_modal_spec.js b/spec/frontend/members/components/modals/remove_member_modal_spec.js index 47a03b5083a..baef0b30b02 100644 --- a/spec/frontend/members/components/modals/remove_member_modal_spec.js +++ b/spec/frontend/members/components/modals/remove_member_modal_spec.js @@ -54,10 +54,6 @@ describe('RemoveMemberModal', () => { const findGlModal = () => wrapper.findComponent(GlModal); const findUserDeletionObstaclesList = () => wrapper.findComponent(UserDeletionObstaclesList); - afterEach(() => { - wrapper.destroy(); - }); - describe.each` state | memberModelType | isAccessRequest | isInvite | actionText | removeSubMembershipsCheckboxExpected | unassignIssuablesCheckboxExpected | message | userDeletionObstacles | isPartOfOncall ${'removing a group member'} | ${MEMBER_MODEL_TYPE_GROUP_MEMBER} | ${false} | ${false} | ${'Remove member'} | ${true} | ${true} | ${'Are you sure you want to remove Jane Doe from the Gitlab Org / Gitlab Test project?'} | ${{}} | ${false} diff --git a/spec/frontend/members/components/table/created_at_spec.js b/spec/frontend/members/components/table/created_at_spec.js index fa31177564b..2c0493e7c59 100644 --- a/spec/frontend/members/components/table/created_at_spec.js +++ b/spec/frontend/members/components/table/created_at_spec.js @@ -20,10 +20,6 @@ describe('CreatedAt', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('created at text', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/members/components/table/expiration_datepicker_spec.js b/spec/frontend/members/components/table/expiration_datepicker_spec.js index 9b8f053348b..15812ee6572 100644 --- a/spec/frontend/members/components/table/expiration_datepicker_spec.js +++ b/spec/frontend/members/components/table/expiration_datepicker_spec.js @@ -58,10 +58,6 @@ describe('ExpirationDatepicker', () => { const findInput = () => wrapper.find('input'); const findDatepicker = () => wrapper.findComponent(GlDatepicker); - afterEach(() => { - wrapper.destroy(); - }); - describe('datepicker input', () => { it('sets `member.expiresAt` as initial date', async () => { createComponent({ member: { ...member, expiresAt: '2020-03-17T00:00:00Z' } }); diff --git a/spec/frontend/members/components/table/member_action_buttons_spec.js b/spec/frontend/members/components/table/member_action_buttons_spec.js index 95db30a3683..3a04d1dcb0a 100644 --- a/spec/frontend/members/components/table/member_action_buttons_spec.js +++ b/spec/frontend/members/components/table/member_action_buttons_spec.js @@ -23,10 +23,6 @@ describe('MemberActions', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it.each` memberType | member | expectedComponent | expectedComponentName ${MEMBER_TYPES.user} | ${memberMock} | ${UserActionDropdown} | ${'UserActionDropdown'} diff --git a/spec/frontend/members/components/table/member_avatar_spec.js b/spec/frontend/members/components/table/member_avatar_spec.js index dc5c97f41df..369f8a06cfd 100644 --- a/spec/frontend/members/components/table/member_avatar_spec.js +++ b/spec/frontend/members/components/table/member_avatar_spec.js @@ -18,10 +18,6 @@ describe('MemberList', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it.each` memberType | member | expectedComponent | expectedComponentName ${MEMBER_TYPES.user} | ${memberMock} | ${UserAvatar} | ${'UserAvatar'} diff --git a/spec/frontend/members/components/table/member_source_spec.js b/spec/frontend/members/components/table/member_source_spec.js index b4f3c2b042b..bbfbb19fd92 100644 --- a/spec/frontend/members/components/table/member_source_spec.js +++ b/spec/frontend/members/components/table/member_source_spec.js @@ -30,10 +30,6 @@ describe('MemberSource', () => { const getTooltipDirective = (elementWrapper) => getBinding(elementWrapper.element, 'gl-tooltip'); - afterEach(() => { - wrapper.destroy(); - }); - describe('direct member', () => { describe('when created by is available', () => { it('displays "Direct member by <user name>"', () => { diff --git a/spec/frontend/members/components/table/members_table_cell_spec.js b/spec/frontend/members/components/table/members_table_cell_spec.js index ac5d83d028d..1c6f1b086cf 100644 --- a/spec/frontend/members/components/table/members_table_cell_spec.js +++ b/spec/frontend/members/components/table/members_table_cell_spec.js @@ -97,11 +97,6 @@ describe('MembersTableCell', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it.each` member | expectedMemberType ${memberMock} | ${MEMBER_TYPES.user} diff --git a/spec/frontend/members/components/table/members_table_spec.js b/spec/frontend/members/components/table/members_table_spec.js index b8e0d73d8f6..e3c89bfed53 100644 --- a/spec/frontend/members/components/table/members_table_spec.js +++ b/spec/frontend/members/components/table/members_table_spec.js @@ -96,10 +96,6 @@ describe('MembersTable', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('fields', () => { const memberCanUpdate = { ...directMember, diff --git a/spec/frontend/members/components/table/role_dropdown_spec.js b/spec/frontend/members/components/table/role_dropdown_spec.js index a11f67be8f5..0b07311db29 100644 --- a/spec/frontend/members/components/table/role_dropdown_spec.js +++ b/spec/frontend/members/components/table/role_dropdown_spec.js @@ -79,7 +79,6 @@ describe('RoleDropdown', () => { afterEach(() => { window.gon = originalGon; - wrapper.destroy(); }); describe('when dropdown is open', () => { diff --git a/spec/frontend/members/index_spec.js b/spec/frontend/members/index_spec.js index 5c813eb2a67..b1730cf3746 100644 --- a/spec/frontend/members/index_spec.js +++ b/spec/frontend/members/index_spec.js @@ -31,9 +31,6 @@ describe('initMembersApp', () => { afterEach(() => { el = null; - - wrapper.destroy(); - wrapper = null; }); it('renders `MembersTabs`', () => { diff --git a/spec/frontend/merge_conflicts/components/merge_conflict_resolver_app_spec.js b/spec/frontend/merge_conflicts/components/merge_conflict_resolver_app_spec.js index 9b5641ef7b3..ab913b30f3c 100644 --- a/spec/frontend/merge_conflicts/components/merge_conflict_resolver_app_spec.js +++ b/spec/frontend/merge_conflicts/components/merge_conflict_resolver_app_spec.js @@ -37,10 +37,6 @@ describe('Merge Conflict Resolver App', () => { store.dispatch('setConflictsData', conflictsMock); }); - afterEach(() => { - wrapper.destroy(); - }); - const findLoadingSpinner = () => wrapper.findByTestId('loading-spinner'); const findConflictsCount = () => wrapper.findByTestId('conflicts-count'); const findFiles = () => wrapper.findAllByTestId('files'); diff --git a/spec/frontend/merge_requests/components/compare_app_spec.js b/spec/frontend/merge_requests/components/compare_app_spec.js index 8f84341b653..ba129363ffd 100644 --- a/spec/frontend/merge_requests/components/compare_app_spec.js +++ b/spec/frontend/merge_requests/components/compare_app_spec.js @@ -30,10 +30,6 @@ function factory(provideData = {}) { } describe('Merge requests compare app component', () => { - afterEach(() => { - wrapper.destroy(); - }); - it('shows commit box when selected branch is empty', () => { factory({ currentBranch: { diff --git a/spec/frontend/merge_requests/components/compare_dropdown_spec.js b/spec/frontend/merge_requests/components/compare_dropdown_spec.js index ab5c315816c..ce03b80bdcb 100644 --- a/spec/frontend/merge_requests/components/compare_dropdown_spec.js +++ b/spec/frontend/merge_requests/components/compare_dropdown_spec.js @@ -47,7 +47,6 @@ describe('Merge requests compare dropdown component', () => { }); afterEach(() => { - wrapper.destroy(); mock.restore(); }); diff --git a/spec/frontend/milestones/components/delete_milestone_modal_spec.js b/spec/frontend/milestones/components/delete_milestone_modal_spec.js index 21ae2b8cb47..f8730fd93a3 100644 --- a/spec/frontend/milestones/components/delete_milestone_modal_spec.js +++ b/spec/frontend/milestones/components/delete_milestone_modal_spec.js @@ -39,10 +39,6 @@ describe('Delete milestone modal', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('onSubmit', () => { beforeEach(() => { jest.spyOn(eventHub, '$emit').mockImplementation(() => {}); diff --git a/spec/frontend/milestones/components/milestone_combobox_spec.js b/spec/frontend/milestones/components/milestone_combobox_spec.js index f8ddca1a2ad..748e01d4291 100644 --- a/spec/frontend/milestones/components/milestone_combobox_spec.js +++ b/spec/frontend/milestones/components/milestone_combobox_spec.js @@ -85,11 +85,6 @@ describe('Milestone combobox component', () => { mock.onGet(`/api/v4/projects/${projectId}/search`).reply((config) => searchApiCallSpy(config)); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - // // Finders // diff --git a/spec/frontend/milestones/components/promote_milestone_modal_spec.js b/spec/frontend/milestones/components/promote_milestone_modal_spec.js index 9d8e344646d..e91e792afe8 100644 --- a/spec/frontend/milestones/components/promote_milestone_modal_spec.js +++ b/spec/frontend/milestones/components/promote_milestone_modal_spec.js @@ -33,10 +33,6 @@ describe('Promote milestone modal', () => { wrapper = shallowMount(PromoteMilestoneModal); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('Modal opener button', () => { it('button gets disabled when the modal opens', () => { expect(promoteButton().disabled).toBe(false); diff --git a/spec/frontend/monitoring/components/charts/column_spec.js b/spec/frontend/monitoring/components/charts/column_spec.js index 0158966997f..cc38a3fd8a1 100644 --- a/spec/frontend/monitoring/components/charts/column_spec.js +++ b/spec/frontend/monitoring/components/charts/column_spec.js @@ -51,10 +51,6 @@ describe('Column component', () => { createWrapper(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('xAxisLabel', () => { const mockDate = Date.UTC(2020, 4, 26, 20); // 8:00 PM in GMT diff --git a/spec/frontend/monitoring/components/charts/gauge_spec.js b/spec/frontend/monitoring/components/charts/gauge_spec.js index 484199698ea..33ea5e83598 100644 --- a/spec/frontend/monitoring/components/charts/gauge_spec.js +++ b/spec/frontend/monitoring/components/charts/gauge_spec.js @@ -21,11 +21,6 @@ describe('Gauge Chart component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('chart component', () => { it('is rendered when props are passed', () => { createWrapper(); diff --git a/spec/frontend/monitoring/components/charts/heatmap_spec.js b/spec/frontend/monitoring/components/charts/heatmap_spec.js index e163d4e73a0..54245cbdbc1 100644 --- a/spec/frontend/monitoring/components/charts/heatmap_spec.js +++ b/spec/frontend/monitoring/components/charts/heatmap_spec.js @@ -28,10 +28,6 @@ describe('Heatmap component', () => { createWrapper(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should display a label on the x axis', () => { expect(wrapper.vm.xAxisName).toBe(graphData.xLabel); }); diff --git a/spec/frontend/monitoring/components/charts/single_stat_spec.js b/spec/frontend/monitoring/components/charts/single_stat_spec.js index 62a0b7e6ad3..fa31b479296 100644 --- a/spec/frontend/monitoring/components/charts/single_stat_spec.js +++ b/spec/frontend/monitoring/components/charts/single_stat_spec.js @@ -21,10 +21,6 @@ describe('Single Stat Chart component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('computed', () => { describe('statValue', () => { it('should display the correct value', () => { diff --git a/spec/frontend/monitoring/components/charts/time_series_spec.js b/spec/frontend/monitoring/components/charts/time_series_spec.js index 503dee7b937..c1b51f71a7e 100644 --- a/spec/frontend/monitoring/components/charts/time_series_spec.js +++ b/spec/frontend/monitoring/components/charts/time_series_spec.js @@ -58,10 +58,6 @@ describe('Time series component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('With a single time series', () => { describe('general functions', () => { const findChart = () => wrapper.findComponent({ ref: 'chart' }); diff --git a/spec/frontend/monitoring/components/create_dashboard_modal_spec.js b/spec/frontend/monitoring/components/create_dashboard_modal_spec.js index 88de3467580..eb05b1f184a 100644 --- a/spec/frontend/monitoring/components/create_dashboard_modal_spec.js +++ b/spec/frontend/monitoring/components/create_dashboard_modal_spec.js @@ -29,10 +29,6 @@ describe('Create dashboard modal', () => { createWrapper(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('has button that links to the project url', async () => { findRepoButton().trigger('click'); diff --git a/spec/frontend/monitoring/components/dashboard_actions_menu_spec.js b/spec/frontend/monitoring/components/dashboard_actions_menu_spec.js index bb57420d406..2758103fd6e 100644 --- a/spec/frontend/monitoring/components/dashboard_actions_menu_spec.js +++ b/spec/frontend/monitoring/components/dashboard_actions_menu_spec.js @@ -55,11 +55,6 @@ describe('Actions menu', () => { store = createStore(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('add metric item', () => { it('is rendered when custom metrics are available', async () => { createShallowWrapper(); diff --git a/spec/frontend/monitoring/components/dashboard_header_spec.js b/spec/frontend/monitoring/components/dashboard_header_spec.js index 18ccda2c41c..ab259249772 100644 --- a/spec/frontend/monitoring/components/dashboard_header_spec.js +++ b/spec/frontend/monitoring/components/dashboard_header_spec.js @@ -59,10 +59,6 @@ describe('Dashboard header', () => { store = createStore(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('dashboards dropdown', () => { beforeEach(() => { store.commit(`monitoringDashboard/${types.SET_INITIAL_STATE}`, { diff --git a/spec/frontend/monitoring/components/dashboard_panel_builder_spec.js b/spec/frontend/monitoring/components/dashboard_panel_builder_spec.js index d71f6374967..1cfd132b123 100644 --- a/spec/frontend/monitoring/components/dashboard_panel_builder_spec.js +++ b/spec/frontend/monitoring/components/dashboard_panel_builder_spec.js @@ -49,8 +49,6 @@ describe('dashboard invalid url parameters', () => { jest.spyOn(store, 'dispatch').mockResolvedValue(); }); - afterEach(() => {}); - it('is mounted', () => { expect(wrapper.exists()).toBe(true); }); diff --git a/spec/frontend/monitoring/components/dashboard_panel_spec.js b/spec/frontend/monitoring/components/dashboard_panel_spec.js index 339c1710a9e..491649e5b96 100644 --- a/spec/frontend/monitoring/components/dashboard_panel_spec.js +++ b/spec/frontend/monitoring/components/dashboard_panel_spec.js @@ -106,10 +106,6 @@ describe('Dashboard Panel', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the chart title', () => { expect(findTitle().text()).toBe(graphDataEmpty.title); }); @@ -134,10 +130,6 @@ describe('Dashboard Panel', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders no chart title', () => { expect(findTitle().text()).toBe(''); }); @@ -160,10 +152,6 @@ describe('Dashboard Panel', () => { createWrapper(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the chart title', () => { expect(findTitle().text()).toBe(graphData.title); }); @@ -377,10 +365,6 @@ describe('Dashboard Panel', () => { await nextTick(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('csvText', () => { it('converts metrics data from json to csv', () => { const header = `timestamp,"${graphData.y_label} > ${graphData.metrics[0].label}"`; diff --git a/spec/frontend/monitoring/components/dashboard_spec.js b/spec/frontend/monitoring/components/dashboard_spec.js index 93bcba8648d..1f995965003 100644 --- a/spec/frontend/monitoring/components/dashboard_spec.js +++ b/spec/frontend/monitoring/components/dashboard_spec.js @@ -75,7 +75,6 @@ describe('Dashboard', () => { if (store.dispatch.mockReset) { store.dispatch.mockReset(); } - wrapper.destroy(); }); describe('request information to the server', () => { diff --git a/spec/frontend/monitoring/components/graph_group_spec.js b/spec/frontend/monitoring/components/graph_group_spec.js index 104263e73e0..593d832f297 100644 --- a/spec/frontend/monitoring/components/graph_group_spec.js +++ b/spec/frontend/monitoring/components/graph_group_spec.js @@ -18,10 +18,6 @@ describe('Graph group component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('When group is not collapsed', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/monitoring/components/group_empty_state_spec.js b/spec/frontend/monitoring/components/group_empty_state_spec.js index e3cd26b0e48..d3a48be7939 100644 --- a/spec/frontend/monitoring/components/group_empty_state_spec.js +++ b/spec/frontend/monitoring/components/group_empty_state_spec.js @@ -23,10 +23,6 @@ function createComponent(props) { describe('GroupEmptyState', () => { let wrapper; - afterEach(() => { - wrapper.destroy(); - }); - describe.each([ metricStates.NO_DATA, metricStates.TIMEOUT, diff --git a/spec/frontend/monitoring/components/refresh_button_spec.js b/spec/frontend/monitoring/components/refresh_button_spec.js index cb300870689..f6cc6789b1f 100644 --- a/spec/frontend/monitoring/components/refresh_button_spec.js +++ b/spec/frontend/monitoring/components/refresh_button_spec.js @@ -40,6 +40,7 @@ describe('RefreshButton', () => { afterEach(() => { dispatch.mockReset(); + // eslint-disable-next-line @gitlab/vtu-no-explicit-wrapper-destroy wrapper.destroy(); }); diff --git a/spec/frontend/monitoring/pages/panel_new_page_spec.js b/spec/frontend/monitoring/pages/panel_new_page_spec.js index fa112fca2db..98ee6c1cb29 100644 --- a/spec/frontend/monitoring/pages/panel_new_page_spec.js +++ b/spec/frontend/monitoring/pages/panel_new_page_spec.js @@ -49,10 +49,6 @@ describe('monitoring/pages/panel_new_page', () => { mountComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('back to dashboard button', () => { it('is rendered', () => { expect(findBackButton().exists()).toBe(true); diff --git a/spec/frontend/nav/components/new_nav_toggle_spec.js b/spec/frontend/nav/components/new_nav_toggle_spec.js index 34cf3b9c213..fe543a346b5 100644 --- a/spec/frontend/nav/components/new_nav_toggle_spec.js +++ b/spec/frontend/nav/components/new_nav_toggle_spec.js @@ -31,10 +31,6 @@ describe('NewNavToggle', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const getByText = (text, options) => createWrapper(getByTextHelper(wrapper.element, text, options)); diff --git a/spec/frontend/nav/components/responsive_app_spec.js b/spec/frontend/nav/components/responsive_app_spec.js index 76b8ebdc92f..9d3b43520ec 100644 --- a/spec/frontend/nav/components/responsive_app_spec.js +++ b/spec/frontend/nav/components/responsive_app_spec.js @@ -33,10 +33,6 @@ describe('~/nav/components/responsive_app.vue', () => { document.body.className = 'test-class'; }); - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/nav/components/responsive_header_spec.js b/spec/frontend/nav/components/responsive_header_spec.js index c9c0b1127bf..2514035270a 100644 --- a/spec/frontend/nav/components/responsive_header_spec.js +++ b/spec/frontend/nav/components/responsive_header_spec.js @@ -25,10 +25,6 @@ describe('~/nav/components/top_nav_menu_sections.vue', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders slot', () => { expect(wrapper.text()).toBe(TEST_SLOT_CONTENT); }); diff --git a/spec/frontend/nav/components/responsive_home_spec.js b/spec/frontend/nav/components/responsive_home_spec.js index 7cd958420eb..5a5cfc93607 100644 --- a/spec/frontend/nav/components/responsive_home_spec.js +++ b/spec/frontend/nav/components/responsive_home_spec.js @@ -45,10 +45,6 @@ describe('~/nav/components/responsive_home.vue', () => { menuItemClickListener = jest.fn(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/nav/components/top_nav_app_spec.js b/spec/frontend/nav/components/top_nav_app_spec.js index e70f70afc97..7f39552eb42 100644 --- a/spec/frontend/nav/components/top_nav_app_spec.js +++ b/spec/frontend/nav/components/top_nav_app_spec.js @@ -28,10 +28,6 @@ describe('~/nav/components/top_nav_app.vue', () => { const findNavItemDropdowToggle = () => findNavItemDropdown().find('.js-top-nav-dropdown-toggle'); const findMenu = () => wrapper.findComponent(TopNavDropdownMenu); - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { beforeEach(() => { createComponentShallow(); diff --git a/spec/frontend/nav/components/top_nav_container_view_spec.js b/spec/frontend/nav/components/top_nav_container_view_spec.js index 293fe361fa9..388ac243648 100644 --- a/spec/frontend/nav/components/top_nav_container_view_spec.js +++ b/spec/frontend/nav/components/top_nav_container_view_spec.js @@ -48,10 +48,6 @@ describe('~/nav/components/top_nav_container_view.vue', () => { }; const findFrequentItemsContainer = () => wrapper.find('[data-testid="frequent-items-container"]'); - afterEach(() => { - wrapper.destroy(); - }); - it.each(['projects', 'groups'])( 'emits frequent items event to event hub (%s)', async (frequentItemsDropdownType) => { diff --git a/spec/frontend/nav/components/top_nav_dropdown_menu_spec.js b/spec/frontend/nav/components/top_nav_dropdown_menu_spec.js index 8a0340087ec..08d6650b5bb 100644 --- a/spec/frontend/nav/components/top_nav_dropdown_menu_spec.js +++ b/spec/frontend/nav/components/top_nav_dropdown_menu_spec.js @@ -36,10 +36,6 @@ describe('~/nav/components/top_nav_dropdown_menu.vue', () => { active: idx === activeIndex, })); - afterEach(() => { - wrapper.destroy(); - }); - beforeEach(() => { jest.spyOn(console, 'error').mockImplementation(); }); diff --git a/spec/frontend/nav/components/top_nav_menu_sections_spec.js b/spec/frontend/nav/components/top_nav_menu_sections_spec.js index 7a5a8475ab7..7a3e58fd964 100644 --- a/spec/frontend/nav/components/top_nav_menu_sections_spec.js +++ b/spec/frontend/nav/components/top_nav_menu_sections_spec.js @@ -54,10 +54,6 @@ describe('~/nav/components/top_nav_menu_sections.vue', () => { menuItems: findMenuItemModels(x), })); - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/nav/components/top_nav_new_dropdown_spec.js b/spec/frontend/nav/components/top_nav_new_dropdown_spec.js index 533650cd149..2cd65307b0b 100644 --- a/spec/frontend/nav/components/top_nav_new_dropdown_spec.js +++ b/spec/frontend/nav/components/top_nav_new_dropdown_spec.js @@ -68,10 +68,6 @@ describe('~/nav/components/top_nav_menu_sections.vue', () => { }; }); - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/notebook/cells/code_spec.js b/spec/frontend/notebook/cells/code_spec.js index 10762a1c3a2..9836400a366 100644 --- a/spec/frontend/notebook/cells/code_spec.js +++ b/spec/frontend/notebook/cells/code_spec.js @@ -13,10 +13,6 @@ describe('Code component', () => { json = JSON.parse(JSON.stringify(fixture)); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('without output', () => { beforeEach(() => { wrapper = mountComponent(json.cells[0]); diff --git a/spec/frontend/notebook/cells/output/index_spec.js b/spec/frontend/notebook/cells/output/index_spec.js index 585cbb68eeb..1241c133b89 100644 --- a/spec/frontend/notebook/cells/output/index_spec.js +++ b/spec/frontend/notebook/cells/output/index_spec.js @@ -17,10 +17,6 @@ describe('Output component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('text output', () => { beforeEach(() => { const textType = json.cells[2]; diff --git a/spec/frontend/notebook/cells/prompt_spec.js b/spec/frontend/notebook/cells/prompt_spec.js index 0cda0c5bc2b..4c864a9b930 100644 --- a/spec/frontend/notebook/cells/prompt_spec.js +++ b/spec/frontend/notebook/cells/prompt_spec.js @@ -6,10 +6,6 @@ describe('Prompt component', () => { const mountComponent = ({ type }) => shallowMount(Prompt, { propsData: { type, count: 1 } }); - afterEach(() => { - wrapper.destroy(); - }); - describe('input', () => { beforeEach(() => { wrapper = mountComponent({ type: 'In' }); diff --git a/spec/frontend/notes/components/comment_form_spec.js b/spec/frontend/notes/components/comment_form_spec.js index acee89ae096..0d966c1dca0 100644 --- a/spec/frontend/notes/components/comment_form_spec.js +++ b/spec/frontend/notes/components/comment_form_spec.js @@ -127,7 +127,6 @@ describe('issue_comment_form component', () => { afterEach(() => { axiosMock.restore(); - wrapper.destroy(); }); describe('user is logged in', () => { diff --git a/spec/frontend/notes/components/comment_type_dropdown_spec.js b/spec/frontend/notes/components/comment_type_dropdown_spec.js index cabf551deba..b891c1f553d 100644 --- a/spec/frontend/notes/components/comment_type_dropdown_spec.js +++ b/spec/frontend/notes/components/comment_type_dropdown_spec.js @@ -24,10 +24,6 @@ describe('CommentTypeDropdown component', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - it.each` isInternalNote | buttonText ${false} | ${COMMENT_FORM.comment} diff --git a/spec/frontend/notes/components/diff_discussion_header_spec.js b/spec/frontend/notes/components/diff_discussion_header_spec.js index bb44563b87a..66b86ed3ce0 100644 --- a/spec/frontend/notes/components/diff_discussion_header_spec.js +++ b/spec/frontend/notes/components/diff_discussion_header_spec.js @@ -22,10 +22,6 @@ describe('diff_discussion_header component', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('Avatar', () => { const firstNoteAuthor = discussionMock.notes[0].author; const findAvatarLink = () => wrapper.findComponent(GlAvatarLink); diff --git a/spec/frontend/notes/components/discussion_actions_spec.js b/spec/frontend/notes/components/discussion_actions_spec.js index 0c13173ac87..a9a20bd8bc3 100644 --- a/spec/frontend/notes/components/discussion_actions_spec.js +++ b/spec/frontend/notes/components/discussion_actions_spec.js @@ -38,10 +38,6 @@ describe('DiscussionActions', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('rendering', () => { const createComponent = createComponentFactory(); diff --git a/spec/frontend/notes/components/discussion_counter_spec.js b/spec/frontend/notes/components/discussion_counter_spec.js index f4ec7f835bb..ac677841ee1 100644 --- a/spec/frontend/notes/components/discussion_counter_spec.js +++ b/spec/frontend/notes/components/discussion_counter_spec.js @@ -40,7 +40,6 @@ describe('DiscussionCounter component', () => { afterEach(() => { wrapper.vm.$destroy(); - wrapper = null; }); describe('has no discussions', () => { @@ -119,8 +118,6 @@ describe('DiscussionCounter component', () => { toggleAllButton = wrapper.find('[data-testid="toggle-all-discussions-btn"]'); }; - afterEach(() => wrapper.destroy()); - it('calls button handler when clicked', async () => { await updateStoreWithExpanded(true); diff --git a/spec/frontend/notes/components/discussion_filter_note_spec.js b/spec/frontend/notes/components/discussion_filter_note_spec.js index 48f5030aa1a..e31155a028f 100644 --- a/spec/frontend/notes/components/discussion_filter_note_spec.js +++ b/spec/frontend/notes/components/discussion_filter_note_spec.js @@ -18,11 +18,6 @@ describe('DiscussionFilterNote component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('timelineContent renders a string containing instruction for switching feed type', () => { expect(wrapper.find('[data-testid="discussion-filter-timeline-content"]').html()).toBe( '<div data-testid="discussion-filter-timeline-content">You\'re only seeing <b>other activity</b> in the feed. To add a comment, switch to one of the following options.</div>', diff --git a/spec/frontend/notes/components/discussion_navigator_spec.js b/spec/frontend/notes/components/discussion_navigator_spec.js index 77ae7b2c3b5..6e095f63003 100644 --- a/spec/frontend/notes/components/discussion_navigator_spec.js +++ b/spec/frontend/notes/components/discussion_navigator_spec.js @@ -37,7 +37,6 @@ describe('notes/components/discussion_navigator', () => { if (wrapper) { wrapper.destroy(); } - wrapper = null; }); describe('on create', () => { diff --git a/spec/frontend/notes/components/discussion_notes_replies_wrapper_spec.js b/spec/frontend/notes/components/discussion_notes_replies_wrapper_spec.js index 8d5ea108b50..d11ca7ad1ec 100644 --- a/spec/frontend/notes/components/discussion_notes_replies_wrapper_spec.js +++ b/spec/frontend/notes/components/discussion_notes_replies_wrapper_spec.js @@ -19,10 +19,6 @@ describe('DiscussionNotesRepliesWrapper', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when normal discussion', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/notes/components/discussion_notes_spec.js b/spec/frontend/notes/components/discussion_notes_spec.js index add2ed1ba8a..bc0c04f2d8a 100644 --- a/spec/frontend/notes/components/discussion_notes_spec.js +++ b/spec/frontend/notes/components/discussion_notes_spec.js @@ -53,11 +53,6 @@ describe('DiscussionNotes', () => { store.dispatch('setNotesData', notesDataMock); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('rendering', () => { it('renders an element for each note in the discussion', () => { createComponent(); diff --git a/spec/frontend/notes/components/discussion_reply_placeholder_spec.js b/spec/frontend/notes/components/discussion_reply_placeholder_spec.js index 971e3987929..a9201b78669 100644 --- a/spec/frontend/notes/components/discussion_reply_placeholder_spec.js +++ b/spec/frontend/notes/components/discussion_reply_placeholder_spec.js @@ -17,10 +17,6 @@ describe('ReplyPlaceholder', () => { const findTextarea = () => wrapper.findComponent({ ref: 'textarea' }); - afterEach(() => { - wrapper.destroy(); - }); - it('emits focus event on button click', async () => { createComponent({ options: { attachTo: document.body } }); diff --git a/spec/frontend/notes/components/discussion_resolve_button_spec.js b/spec/frontend/notes/components/discussion_resolve_button_spec.js index 17c3523cf48..4bd21842fec 100644 --- a/spec/frontend/notes/components/discussion_resolve_button_spec.js +++ b/spec/frontend/notes/components/discussion_resolve_button_spec.js @@ -23,10 +23,6 @@ describe('resolveDiscussionButton', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should emit a onClick event on button click', async () => { const button = wrapper.findComponent(GlButton); diff --git a/spec/frontend/notes/components/discussion_resolve_with_issue_button_spec.js b/spec/frontend/notes/components/discussion_resolve_with_issue_button_spec.js index a185f11ffaa..3dfae45ec49 100644 --- a/spec/frontend/notes/components/discussion_resolve_with_issue_button_spec.js +++ b/spec/frontend/notes/components/discussion_resolve_with_issue_button_spec.js @@ -15,10 +15,6 @@ describe('ResolveWithIssueButton', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should have a link with the provided link property as href', () => { const button = wrapper.findComponent(GlButton); diff --git a/spec/frontend/notes/components/email_participants_warning_spec.js b/spec/frontend/notes/components/email_participants_warning_spec.js index ab1a6b152a4..34b7524d8fb 100644 --- a/spec/frontend/notes/components/email_participants_warning_spec.js +++ b/spec/frontend/notes/components/email_participants_warning_spec.js @@ -4,11 +4,6 @@ import EmailParticipantsWarning from '~/notes/components/email_participants_warn describe('Email Participants Warning Component', () => { let wrapper; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findMoreButton = () => wrapper.find('button'); const createWrapper = (emails) => { diff --git a/spec/frontend/notes/components/note_actions/reply_button_spec.js b/spec/frontend/notes/components/note_actions/reply_button_spec.js index 20b32b8c178..68b11fb3b1a 100644 --- a/spec/frontend/notes/components/note_actions/reply_button_spec.js +++ b/spec/frontend/notes/components/note_actions/reply_button_spec.js @@ -9,11 +9,6 @@ describe('ReplyButton', () => { wrapper = shallowMount(ReplyButton); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('emits startReplying on click', () => { wrapper.findComponent(GlButton).vm.$emit('click'); diff --git a/spec/frontend/notes/components/note_actions/timeline_event_button_spec.js b/spec/frontend/notes/components/note_actions/timeline_event_button_spec.js index 658e844a9b1..bee08ee0605 100644 --- a/spec/frontend/notes/components/note_actions/timeline_event_button_spec.js +++ b/spec/frontend/notes/components/note_actions/timeline_event_button_spec.js @@ -20,10 +20,6 @@ describe('NoteTimelineEventButton', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - const findTimelineButton = () => wrapper.findComponent(GlButton); it('emits click-promote-comment-to-event', async () => { diff --git a/spec/frontend/notes/components/note_actions_spec.js b/spec/frontend/notes/components/note_actions_spec.js index 8630b7b7d07..63286927d53 100644 --- a/spec/frontend/notes/components/note_actions_spec.js +++ b/spec/frontend/notes/components/note_actions_spec.js @@ -77,7 +77,6 @@ describe('noteActions', () => { }); afterEach(() => { - wrapper.destroy(); axiosMock.restore(); }); @@ -203,7 +202,6 @@ describe('noteActions', () => { }); afterEach(() => { - wrapper.destroy(); axiosMock.restore(); }); @@ -226,7 +224,6 @@ describe('noteActions', () => { }); afterEach(() => { - wrapper.destroy(); axiosMock.restore(); }); @@ -248,10 +245,6 @@ describe('noteActions', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should not be possible to assign the comment author', testButtonDoesNotRender); it('should not be possible to unassign the comment author', testButtonDoesNotRender); }); diff --git a/spec/frontend/notes/components/note_attachment_spec.js b/spec/frontend/notes/components/note_attachment_spec.js index 24632f8e427..7f44171f6cc 100644 --- a/spec/frontend/notes/components/note_attachment_spec.js +++ b/spec/frontend/notes/components/note_attachment_spec.js @@ -15,11 +15,6 @@ describe('Issue note attachment', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders attachment image if it is passed in attachment prop', () => { createComponent({ image: 'test-image', diff --git a/spec/frontend/notes/components/note_body_spec.js b/spec/frontend/notes/components/note_body_spec.js index c71cf7666ab..b4f185004bb 100644 --- a/spec/frontend/notes/components/note_body_spec.js +++ b/spec/frontend/notes/components/note_body_spec.js @@ -49,10 +49,6 @@ describe('issue_note_body component', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should render the note', () => { expect(wrapper.find('.note-text').html()).toContain(note.note_html); }); diff --git a/spec/frontend/notes/components/note_edited_text_spec.js b/spec/frontend/notes/components/note_edited_text_spec.js index e76a1de0a66..577e1044588 100644 --- a/spec/frontend/notes/components/note_edited_text_spec.js +++ b/spec/frontend/notes/components/note_edited_text_spec.js @@ -26,10 +26,6 @@ describe('NoteEditedText', () => { const findUserElement = () => wrapper.findComponent(GlLink); - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { beforeEach(() => { createWrapper(); diff --git a/spec/frontend/notes/components/note_form_spec.js b/spec/frontend/notes/components/note_form_spec.js index 90473e7ccba..59362e18098 100644 --- a/spec/frontend/notes/components/note_form_spec.js +++ b/spec/frontend/notes/components/note_form_spec.js @@ -48,10 +48,6 @@ describe('issue_note_form component', () => { }; }); - afterEach(() => { - wrapper.destroy(); - }); - describe('noteHash', () => { beforeEach(() => { wrapper = createComponentWrapper(); diff --git a/spec/frontend/notes/components/note_header_spec.js b/spec/frontend/notes/components/note_header_spec.js index 56c22b09e1b..b3d6fab7f91 100644 --- a/spec/frontend/notes/components/note_header_spec.js +++ b/spec/frontend/notes/components/note_header_spec.js @@ -44,11 +44,6 @@ describe('NoteHeader component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('does not render discussion actions when includeToggle is false', () => { createComponent({ includeToggle: false, diff --git a/spec/frontend/notes/components/note_signed_out_widget_spec.js b/spec/frontend/notes/components/note_signed_out_widget_spec.js index 84f20e4ad58..d56ee234cd9 100644 --- a/spec/frontend/notes/components/note_signed_out_widget_spec.js +++ b/spec/frontend/notes/components/note_signed_out_widget_spec.js @@ -12,10 +12,6 @@ describe('NoteSignedOutWidget component', () => { wrapper = shallowMount(NoteSignedOutWidget, { store }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders sign in link provided in the store', () => { expect(wrapper.find(`a[href="${notesDataMock.newSessionPath}"]`).text()).toBe('sign in'); }); diff --git a/spec/frontend/notes/components/noteable_discussion_spec.js b/spec/frontend/notes/components/noteable_discussion_spec.js index a90d8bdde06..e2d3ba6a0a0 100644 --- a/spec/frontend/notes/components/noteable_discussion_spec.js +++ b/spec/frontend/notes/components/noteable_discussion_spec.js @@ -36,10 +36,6 @@ describe('noteable_discussion component', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should not render thread header for non diff threads', () => { expect(wrapper.find('.discussion-header').exists()).toBe(false); }); @@ -173,7 +169,6 @@ describe('noteable_discussion component', () => { }); afterEach(() => { - wrapper.destroy(); window.gon = originalGon; }); diff --git a/spec/frontend/notes/components/noteable_note_spec.js b/spec/frontend/notes/components/noteable_note_spec.js index af1b4f64037..b158cfff10d 100644 --- a/spec/frontend/notes/components/noteable_note_spec.js +++ b/spec/frontend/notes/components/noteable_note_spec.js @@ -71,10 +71,6 @@ describe('issue_note', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('mutiline comments', () => { beforeEach(() => { createWrapper(); diff --git a/spec/frontend/notes/components/notes_activity_header_spec.js b/spec/frontend/notes/components/notes_activity_header_spec.js index 5b3165bf401..2de491477b6 100644 --- a/spec/frontend/notes/components/notes_activity_header_spec.js +++ b/spec/frontend/notes/components/notes_activity_header_spec.js @@ -24,10 +24,6 @@ describe('~/notes/components/notes_activity_header.vue', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/notes/components/notes_app_spec.js b/spec/frontend/notes/components/notes_app_spec.js index b08a22f8674..832264aa7d3 100644 --- a/spec/frontend/notes/components/notes_app_spec.js +++ b/spec/frontend/notes/components/notes_app_spec.js @@ -90,8 +90,9 @@ describe('note_app', () => { }); afterEach(() => { - wrapper.destroy(); axiosMock.restore(); + // eslint-disable-next-line @gitlab/vtu-no-explicit-wrapper-destroy + wrapper.destroy(); }); describe('render', () => { diff --git a/spec/frontend/notes/components/toggle_replies_widget_spec.js b/spec/frontend/notes/components/toggle_replies_widget_spec.js index 8c3696e88b7..ef5f06ad2fa 100644 --- a/spec/frontend/notes/components/toggle_replies_widget_spec.js +++ b/spec/frontend/notes/components/toggle_replies_widget_spec.js @@ -30,10 +30,6 @@ describe('toggle replies widget for notes', () => { const mountComponent = ({ collapsed = false }) => mountExtended(ToggleRepliesWidget, { propsData: { replies, collapsed } }); - afterEach(() => { - wrapper.destroy(); - }); - describe('collapsed state', () => { beforeEach(() => { wrapper = mountComponent({ collapsed: true }); diff --git a/spec/frontend/notifications/components/custom_notifications_modal_spec.js b/spec/frontend/notifications/components/custom_notifications_modal_spec.js index aee681e73c9..0fbd073191e 100644 --- a/spec/frontend/notifications/components/custom_notifications_modal_spec.js +++ b/spec/frontend/notifications/components/custom_notifications_modal_spec.js @@ -65,8 +65,6 @@ describe('CustomNotificationsModal', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; mockAxios.restore(); }); diff --git a/spec/frontend/notifications/components/notifications_dropdown_spec.js b/spec/frontend/notifications/components/notifications_dropdown_spec.js index 75e88d48ebd..bae9b028cf7 100644 --- a/spec/frontend/notifications/components/notifications_dropdown_spec.js +++ b/spec/frontend/notifications/components/notifications_dropdown_spec.js @@ -61,8 +61,6 @@ describe('NotificationsDropdown', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; mockAxios.restore(); }); diff --git a/spec/frontend/observability/observability_app_spec.js b/spec/frontend/observability/observability_app_spec.js index e3bcd140d60..1f8386b97db 100644 --- a/spec/frontend/observability/observability_app_spec.js +++ b/spec/frontend/observability/observability_app_spec.js @@ -48,10 +48,6 @@ describe('Observability root app', () => { const dispatchMessageEvent = (message) => window.dispatchEvent(new MessageEvent('message', message)); - afterEach(() => { - wrapper.destroy(); - }); - describe('iframe src', () => { const TEST_USERNAME = 'test-user'; diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/delete_button_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/delete_button_spec.js index ff11c8843bb..8ba7e40d728 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/delete_button_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/delete_button_spec.js @@ -27,11 +27,6 @@ describe('delete_button', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('tooltip', () => { it('the title is controlled by tooltipTitle prop', () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/delete_image_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/delete_image_spec.js index 620c96e8c9e..5a7cbdcff5b 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/delete_image_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/delete_image_spec.js @@ -46,11 +46,6 @@ describe('Delete Image', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('executes apollo mutate on doDelete', () => { const mutate = jest.fn().mockResolvedValue({}); mountComponent({ mutate }); diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/delete_alert_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/delete_alert_spec.js index d45b993b5a2..9d187439ca3 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/delete_alert_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/delete_alert_spec.js @@ -19,11 +19,6 @@ describe('Delete alert', () => { wrapper = shallowMount(component, { stubs: { GlSprintf }, propsData }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when deleteAlertType is null', () => { it('does not show the alert', () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/delete_modal_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/delete_modal_spec.js index 16c9485e69e..992e2eb6f3e 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/delete_modal_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/delete_modal_spec.js @@ -34,11 +34,6 @@ describe('Delete Modal', () => { }), ); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('contains a GlModal', () => { mountComponent(); expect(findModal().exists()).toBe(true); diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/details_header_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/details_header_spec.js index a825319f546..9e443234c34 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/details_header_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/details_header_spec.js @@ -85,9 +85,7 @@ describe('Details Header', () => { afterEach(() => { // if we want to mix createMockApollo and manual mocks we need to reset everything - wrapper.destroy(); apolloProvider = undefined; - wrapper = null; }); describe('image name', () => { diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/partial_cleanup_alert_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/partial_cleanup_alert_spec.js index ce5ecfe4608..d6c1b2c3f51 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/partial_cleanup_alert_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/partial_cleanup_alert_spec.js @@ -23,11 +23,6 @@ describe('Partial Cleanup alert', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it(`gl-alert has the correct properties`, () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/status_alert_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/status_alert_spec.js index d83a5099bcd..3e1fd14475d 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/status_alert_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/status_alert_spec.js @@ -27,11 +27,6 @@ describe('Status Alert', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it.each` status | title | variant | message | link ${DELETE_SCHEDULED} | ${SCHEDULED_FOR_DELETION_STATUS_TITLE} | ${'info'} | ${SCHEDULED_FOR_DELETION_STATUS_MESSAGE} | ${PACKAGE_DELETE_HELP_PAGE_PATH} diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_list_row_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_list_row_spec.js index d2d3be256e5..2d08cba5f7c 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_list_row_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_list_row_spec.js @@ -55,11 +55,6 @@ describe('tags list row', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('checkbox', () => { it('exists', () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_list_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_list_spec.js index 1017ff06a25..8501cbc2bae 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_list_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_list_spec.js @@ -68,10 +68,6 @@ describe('Tags List', () => { resolver = jest.fn().mockResolvedValue(imageTagsMock()); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('registry list', () => { beforeEach(() => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_loader_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_loader_spec.js index 88e79c513bc..8896185ce67 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_loader_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_loader_spec.js @@ -20,11 +20,6 @@ describe('TagsLoader component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('produces the correct amount of loaders', () => { mountComponent(); expect(findGlSkeletonLoaders().length).toBe(1); diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/cleanup_status_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/cleanup_status_spec.js index 535faebdd4e..0d1d2c53cab 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/cleanup_status_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/cleanup_status_spec.js @@ -36,10 +36,6 @@ describe('cleanup_status', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it.each` status | visible | text ${UNFINISHED_STATUS} | ${true} | ${CLEANUP_STATUS_UNFINISHED} diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/group_empty_state_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/group_empty_state_spec.js index d2086943e4f..900ea61e4ea 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/group_empty_state_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/group_empty_state_spec.js @@ -26,10 +26,6 @@ describe('Registry Group Empty state', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('to match the default snapshot', () => { expect(wrapper.element).toMatchSnapshot(); }); diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/image_list_row_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/image_list_row_spec.js index 7b20855bf4c..1bab8b51220 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/image_list_row_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/image_list_row_spec.js @@ -54,11 +54,6 @@ describe('Image List Row', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('image title and path', () => { it('renders shortened name of image and contains a link to the details page', () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/image_list_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/image_list_spec.js index 042b8383571..6c771887b88 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/image_list_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/image_list_spec.js @@ -21,11 +21,6 @@ describe('Image List', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('list', () => { it('contains one list element for each image', () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/project_empty_state_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/project_empty_state_spec.js index 8cfa8128021..e4d13143484 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/project_empty_state_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/project_empty_state_spec.js @@ -34,10 +34,6 @@ describe('Registry Project Empty state', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('to match the default snapshot', () => { expect(wrapper.element).toMatchSnapshot(); }); diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/registry_header_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/registry_header_spec.js index bcc8e41fce8..45304cc2329 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/registry_header_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/registry_header_spec.js @@ -35,11 +35,6 @@ describe('registry_header', () => { await nextTick(); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('header', () => { it('has a title', () => { mountComponent({ metadataLoading: true }); diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/pages/details_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/pages/details_spec.js index 26f0e506829..888c3e5bffa 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/pages/details_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/pages/details_spec.js @@ -127,11 +127,6 @@ describe('Details Page', () => { jest.spyOn(Tracking, 'event'); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when isLoading is true', () => { it('shows the loader', () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/pages/list_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/pages/list_spec.js index 1e514d85e82..acc61157ab5 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/pages/list_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/pages/list_spec.js @@ -113,10 +113,6 @@ describe('List Page', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('contains registry header', async () => { mountComponent(); fireFirstSortUpdate(); diff --git a/spec/frontend/packages_and_registries/dependency_proxy/app_spec.js b/spec/frontend/packages_and_registries/dependency_proxy/app_spec.js index 601f8abd34d..1060462327d 100644 --- a/spec/frontend/packages_and_registries/dependency_proxy/app_spec.js +++ b/spec/frontend/packages_and_registries/dependency_proxy/app_spec.js @@ -97,7 +97,6 @@ describe('DependencyProxyApp', () => { }); afterEach(() => { - wrapper.destroy(); window.gon = originalGon; mock.restore(); }); diff --git a/spec/frontend/packages_and_registries/dependency_proxy/components/manifest_list_spec.js b/spec/frontend/packages_and_registries/dependency_proxy/components/manifest_list_spec.js index 2f415bfd6f9..639a4fbb99d 100644 --- a/spec/frontend/packages_and_registries/dependency_proxy/components/manifest_list_spec.js +++ b/spec/frontend/packages_and_registries/dependency_proxy/components/manifest_list_spec.js @@ -25,10 +25,6 @@ describe('Manifests List', () => { const findRows = () => wrapper.findAllComponents(ManifestRow); const findPagination = () => wrapper.findComponent(GlKeysetPagination); - afterEach(() => { - wrapper.destroy(); - }); - it('has the correct title', () => { createComponent(); diff --git a/spec/frontend/packages_and_registries/dependency_proxy/components/manifest_row_spec.js b/spec/frontend/packages_and_registries/dependency_proxy/components/manifest_row_spec.js index be3236d1f9c..ace5ce3a58d 100644 --- a/spec/frontend/packages_and_registries/dependency_proxy/components/manifest_row_spec.js +++ b/spec/frontend/packages_and_registries/dependency_proxy/components/manifest_row_spec.js @@ -29,10 +29,6 @@ describe('Manifest Row', () => { const findTimeAgoTooltip = () => wrapper.findComponent(TimeagoTooltip); const findStatus = () => wrapper.findByTestId('status'); - afterEach(() => { - wrapper.destroy(); - }); - describe('With a manifest on the DEFAULT status', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/packages_and_registries/harbor_registry/components/details/artifacts_list_row_spec.js b/spec/frontend/packages_and_registries/harbor_registry/components/details/artifacts_list_row_spec.js index a2e5cbdce8b..1e9b9b1ce47 100644 --- a/spec/frontend/packages_and_registries/harbor_registry/components/details/artifacts_list_row_spec.js +++ b/spec/frontend/packages_and_registries/harbor_registry/components/details/artifacts_list_row_spec.js @@ -63,10 +63,6 @@ describe('Harbor artifact list row', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('list item', () => { beforeEach(() => { mountComponent({ diff --git a/spec/frontend/packages_and_registries/harbor_registry/components/details/artifacts_list_spec.js b/spec/frontend/packages_and_registries/harbor_registry/components/details/artifacts_list_spec.js index b9d6dc2679e..786a4715731 100644 --- a/spec/frontend/packages_and_registries/harbor_registry/components/details/artifacts_list_spec.js +++ b/spec/frontend/packages_and_registries/harbor_registry/components/details/artifacts_list_spec.js @@ -26,10 +26,6 @@ describe('Harbor artifacts list', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when isLoading is true', () => { beforeEach(() => { mountComponent({ diff --git a/spec/frontend/packages_and_registries/harbor_registry/components/details/details_header_spec.js b/spec/frontend/packages_and_registries/harbor_registry/components/details/details_header_spec.js index e8cc2b2e22d..d8fb91c085c 100644 --- a/spec/frontend/packages_and_registries/harbor_registry/components/details/details_header_spec.js +++ b/spec/frontend/packages_and_registries/harbor_registry/components/details/details_header_spec.js @@ -20,10 +20,6 @@ describe('Harbor Details Header', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('artifact name', () => { describe('missing image name', () => { beforeEach(() => { diff --git a/spec/frontend/packages_and_registries/harbor_registry/components/list/harbor_list_header_spec.js b/spec/frontend/packages_and_registries/harbor_registry/components/list/harbor_list_header_spec.js index 7a6169d300c..9a7ad759dba 100644 --- a/spec/frontend/packages_and_registries/harbor_registry/components/list/harbor_list_header_spec.js +++ b/spec/frontend/packages_and_registries/harbor_registry/components/list/harbor_list_header_spec.js @@ -29,10 +29,6 @@ describe('harbor_list_header', () => { await nextTick(); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('header', () => { it('has a title', () => { mountComponent({ metadataLoading: true }); diff --git a/spec/frontend/packages_and_registries/harbor_registry/components/list/harbor_list_row_spec.js b/spec/frontend/packages_and_registries/harbor_registry/components/list/harbor_list_row_spec.js index b62d4e8836b..1e031e0557a 100644 --- a/spec/frontend/packages_and_registries/harbor_registry/components/list/harbor_list_row_spec.js +++ b/spec/frontend/packages_and_registries/harbor_registry/components/list/harbor_list_row_spec.js @@ -28,10 +28,6 @@ describe('Harbor List Row', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('image title and path', () => { it('contains a link to the details page', () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/harbor_registry/components/list/harbor_list_spec.js b/spec/frontend/packages_and_registries/harbor_registry/components/list/harbor_list_spec.js index e7e74a0da58..a1803ecf7fb 100644 --- a/spec/frontend/packages_and_registries/harbor_registry/components/list/harbor_list_spec.js +++ b/spec/frontend/packages_and_registries/harbor_registry/components/list/harbor_list_spec.js @@ -20,10 +20,6 @@ describe('Harbor List', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('list', () => { it('contains one list element for each image', () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/harbor_registry/components/tags/tags_header_spec.js b/spec/frontend/packages_and_registries/harbor_registry/components/tags/tags_header_spec.js index 5e299a269e3..9370ff1fdd4 100644 --- a/spec/frontend/packages_and_registries/harbor_registry/components/tags/tags_header_spec.js +++ b/spec/frontend/packages_and_registries/harbor_registry/components/tags/tags_header_spec.js @@ -26,10 +26,6 @@ describe('Harbor Tags Header', () => { totalPages: 1, }; - afterEach(() => { - wrapper.destroy(); - }); - beforeEach(() => { mountComponent({ propsData: { artifactDetail: mockArtifactDetail, pageInfo: mockPageInfo, tagsLoading: false }, diff --git a/spec/frontend/packages_and_registries/harbor_registry/components/tags/tags_list_row_spec.js b/spec/frontend/packages_and_registries/harbor_registry/components/tags/tags_list_row_spec.js index 849215e286b..0b2ce01ebf6 100644 --- a/spec/frontend/packages_and_registries/harbor_registry/components/tags/tags_list_row_spec.js +++ b/spec/frontend/packages_and_registries/harbor_registry/components/tags/tags_list_row_spec.js @@ -37,10 +37,6 @@ describe('Harbor tag list row', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('list item', () => { beforeEach(() => { mountComponent({ diff --git a/spec/frontend/packages_and_registries/harbor_registry/components/tags/tags_list_spec.js b/spec/frontend/packages_and_registries/harbor_registry/components/tags/tags_list_spec.js index 4c6b2b6daaa..e2a2a584b7d 100644 --- a/spec/frontend/packages_and_registries/harbor_registry/components/tags/tags_list_spec.js +++ b/spec/frontend/packages_and_registries/harbor_registry/components/tags/tags_list_spec.js @@ -24,10 +24,6 @@ describe('Harbor Tags List', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when isLoading is true', () => { beforeEach(() => { mountComponent({ diff --git a/spec/frontend/packages_and_registries/harbor_registry/pages/details_spec.js b/spec/frontend/packages_and_registries/harbor_registry/pages/details_spec.js index 69765d31674..90c3d9082f7 100644 --- a/spec/frontend/packages_and_registries/harbor_registry/pages/details_spec.js +++ b/spec/frontend/packages_and_registries/harbor_registry/pages/details_spec.js @@ -74,10 +74,6 @@ describe('Harbor Details Page', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('when isLoading is true', () => { it('shows the loader', () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/harbor_registry/pages/list_spec.js b/spec/frontend/packages_and_registries/harbor_registry/pages/list_spec.js index 97d30e6fe99..63ea8feb1e7 100644 --- a/spec/frontend/packages_and_registries/harbor_registry/pages/list_spec.js +++ b/spec/frontend/packages_and_registries/harbor_registry/pages/list_spec.js @@ -60,10 +60,6 @@ describe('Harbor List Page', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('contains harbor registry header', async () => { mountComponent(); fireFirstSortUpdate(); diff --git a/spec/frontend/packages_and_registries/harbor_registry/pages/tags_spec.js b/spec/frontend/packages_and_registries/harbor_registry/pages/tags_spec.js index 10901c6ec1e..6002faa1fa3 100644 --- a/spec/frontend/packages_and_registries/harbor_registry/pages/tags_spec.js +++ b/spec/frontend/packages_and_registries/harbor_registry/pages/tags_spec.js @@ -60,10 +60,6 @@ describe('Harbor Tags page', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('contains tags header', () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/app_spec.js b/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/app_spec.js index e74375b7705..f8130287c12 100644 --- a/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/app_spec.js +++ b/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/app_spec.js @@ -86,10 +86,6 @@ describe('PackagesApp', () => { const findTerraformInstallation = () => wrapper.findComponent(TerraformInstallation); const findPackageFiles = () => wrapper.findComponent(PackageFiles); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the app and displays the package title', async () => { createComponent(); diff --git a/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/details_title_spec.js b/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/details_title_spec.js index b504f7489ab..148e87699f1 100644 --- a/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/details_title_spec.js +++ b/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/details_title_spec.js @@ -39,10 +39,6 @@ describe('PackageTitle', () => { const pipelineProject = () => wrapper.find('[data-testid="pipeline-project"]'); const packageRef = () => wrapper.find('[data-testid="package-ref"]'); - afterEach(() => { - wrapper.destroy(); - }); - describe('module title', () => { it('is correctly bound', async () => { await createComponent(); diff --git a/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/file_sha_spec.js b/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/file_sha_spec.js index d7caa8ca2d8..7352afff051 100644 --- a/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/file_sha_spec.js +++ b/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/file_sha_spec.js @@ -23,10 +23,6 @@ describe('FileSha', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - it('renders', () => { createComponent(); diff --git a/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/package_files_spec.js b/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/package_files_spec.js index b76d7c2b57b..c3e0818fc11 100644 --- a/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/package_files_spec.js +++ b/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/package_files_spec.js @@ -37,11 +37,6 @@ describe('Package Files', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('rows', () => { it('renders a single file for an npm package', () => { createComponent(); diff --git a/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/package_history_spec.js b/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/package_history_spec.js index 0cbe2755f7e..a650aba464e 100644 --- a/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/package_history_spec.js +++ b/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/package_history_spec.js @@ -30,11 +30,6 @@ describe('Package History', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findHistoryElement = (testId) => wrapper.find(`[data-testid="${testId}"]`); const findElementLink = (container) => container.findComponent(GlLink); const findElementTimeAgo = (container) => container.findComponent(TimeAgoTooltip); diff --git a/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/terraform_installation_spec.js b/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/terraform_installation_spec.js index 78c1b840dbc..94797f01d16 100644 --- a/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/terraform_installation_spec.js +++ b/spec/frontend/packages_and_registries/infrastructure_registry/components/details/components/terraform_installation_spec.js @@ -30,10 +30,6 @@ describe('TerraformInstallation', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders all the messages', () => { expect(wrapper.element).toMatchSnapshot(); }); diff --git a/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/infrastructure_search_spec.js b/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/infrastructure_search_spec.js index a086c20a5e7..a89247c0a97 100644 --- a/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/infrastructure_search_spec.js +++ b/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/infrastructure_search_spec.js @@ -55,11 +55,6 @@ describe('Infrastructure Search', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('has a registry search component', () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/infrastructure_title_spec.js b/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/infrastructure_title_spec.js index aca6b0942cc..7c7faa8a3b0 100644 --- a/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/infrastructure_title_spec.js +++ b/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/infrastructure_title_spec.js @@ -22,11 +22,6 @@ describe('Infrastructure Title', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('title area', () => { beforeEach(() => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/packages_list_app_spec.js b/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/packages_list_app_spec.js index 36763bdcbac..47d36d11e35 100644 --- a/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/packages_list_app_spec.js +++ b/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/packages_list_app_spec.js @@ -72,10 +72,6 @@ describe('packages_list_app', () => { mountComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders', () => { createStore({ packageCount: 1 }); mountComponent(); diff --git a/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/packages_list_spec.js b/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/packages_list_spec.js index 0164d92ce34..058fed302c9 100644 --- a/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/packages_list_spec.js +++ b/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/packages_list_spec.js @@ -72,11 +72,6 @@ describe('packages_list', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when is loading', () => { beforeEach(() => { mountComponent({ diff --git a/spec/frontend/packages_and_registries/infrastructure_registry/components/shared/package_list_row_spec.js b/spec/frontend/packages_and_registries/infrastructure_registry/components/shared/package_list_row_spec.js index 4a7542ca509..37ca420ae77 100644 --- a/spec/frontend/packages_and_registries/infrastructure_registry/components/shared/package_list_row_spec.js +++ b/spec/frontend/packages_and_registries/infrastructure_registry/components/shared/package_list_row_spec.js @@ -54,11 +54,6 @@ describe('packages_list_row', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders', () => { mountComponent(); expect(wrapper.element).toMatchSnapshot(); diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/additional_metadata_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/additional_metadata_spec.js index 4f3d780b149..2e59c27cc1b 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/additional_metadata_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/additional_metadata_spec.js @@ -65,11 +65,6 @@ describe('Package Additional metadata', () => { jest.spyOn(Sentry, 'captureException').mockImplementation(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findTitle = () => wrapper.findByTestId('title'); const findMainArea = () => wrapper.findByTestId('main'); const findComponentIs = () => wrapper.findByTestId('component-is'); diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/composer_installation_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/composer_installation_spec.js index 0aba8f7efc7..a6298ebdea7 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/composer_installation_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/composer_installation_spec.js @@ -34,10 +34,6 @@ describe('ComposerInstallation', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - describe('install command switch', () => { it('has the installation title component', () => { createComponent(); diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/conan_installation_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/conan_installation_spec.js index bf9425def9a..70534b1d0a6 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/conan_installation_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/conan_installation_spec.js @@ -33,10 +33,6 @@ describe('ConanInstallation', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders all the messages', () => { expect(wrapper.element).toMatchSnapshot(); }); diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/dependency_row_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/dependency_row_spec.js index 9aed5b90c73..19aedf120b2 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/dependency_row_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/dependency_row_spec.js @@ -19,10 +19,6 @@ describe('DependencyRow', () => { const dependencyVersion = () => wrapper.findByTestId('version-pattern'); const dependencyFramework = () => wrapper.findByTestId('target-framework'); - afterEach(() => { - wrapper.destroy(); - }); - describe('renders', () => { it('full dependency', () => { createComponent(); diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/file_sha_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/file_sha_spec.js index feed7a7c46c..a9428773a60 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/file_sha_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/file_sha_spec.js @@ -23,10 +23,6 @@ describe('FileSha', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - it('renders', () => { createComponent(); diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/installation_title_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/installation_title_spec.js index 5fe795f768e..a2d30be13c2 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/installation_title_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/installation_title_spec.js @@ -20,10 +20,6 @@ describe('InstallationTitle', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - it('has a title', () => { createComponent(); diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/installations_commands_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/installations_commands_spec.js index 8bb05b00e65..d35d95e319f 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/installations_commands_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/installations_commands_spec.js @@ -40,10 +40,6 @@ describe('InstallationCommands', () => { const pypiInstallation = () => wrapper.findComponent(PypiInstallation); const composerInstallation = () => wrapper.findComponent(ComposerInstallation); - afterEach(() => { - wrapper.destroy(); - }); - describe('installation instructions', () => { describe.each` packageEntity | selector diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/maven_installation_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/maven_installation_spec.js index fc60039db30..84b4dc841ac 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/maven_installation_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/maven_installation_spec.js @@ -79,10 +79,6 @@ describe('MavenInstallation', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - describe('install command switch', () => { it('has the installation title component', () => { createComponent(); diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/metadata/composer_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/metadata/composer_spec.js index bb6846d354f..f2f3b8507c3 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/metadata/composer_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/metadata/composer_spec.js @@ -18,11 +18,6 @@ describe('Composer Metadata', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findComposerTargetSha = () => wrapper.findByTestId('composer-target-sha'); const findComposerTargetShaCopyButton = () => wrapper.findComponent(ClipboardButton); const findComposerJson = () => wrapper.findByTestId('composer-json'); diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/metadata/conan_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/metadata/conan_spec.js index e7e47401aa1..2832dc3a712 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/metadata/conan_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/metadata/conan_spec.js @@ -19,11 +19,6 @@ describe('Conan Metadata', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findConanRecipe = () => wrapper.findByTestId('conan-recipe'); beforeEach(() => { diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/metadata/maven_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/metadata/maven_spec.js index 8680d983042..7b253a26fc7 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/metadata/maven_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/metadata/maven_spec.js @@ -19,11 +19,6 @@ describe('Maven Metadata', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findMavenApp = () => wrapper.findByTestId('maven-app'); const findMavenGroup = () => wrapper.findByTestId('maven-group'); diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/metadata/nuget_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/metadata/nuget_spec.js index af3692023f0..9fb467f9af1 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/metadata/nuget_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/metadata/nuget_spec.js @@ -19,11 +19,6 @@ describe('Nuget Metadata', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findNugetSource = () => wrapper.findByTestId('nuget-source'); const findNugetLicense = () => wrapper.findByTestId('nuget-license'); const findElementLink = (container) => container.findComponent(GlLink); diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/metadata/pypi_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/metadata/pypi_spec.js index d7c6ea8379d..67f5fbc9e80 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/metadata/pypi_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/metadata/pypi_spec.js @@ -20,11 +20,6 @@ describe('Package Additional Metadata', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findPypiRequiredPython = () => wrapper.findByTestId('pypi-required-python'); beforeEach(() => { diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/npm_installation_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/npm_installation_spec.js index 8c0e2d948ca..e711f9ee45d 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/npm_installation_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/npm_installation_spec.js @@ -51,10 +51,6 @@ describe('NpmInstallation', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders all the messages', () => { expect(wrapper.element).toMatchSnapshot(); }); diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/nuget_installation_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/nuget_installation_spec.js index 9449c40c7c6..bcc0b78bfce 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/nuget_installation_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/nuget_installation_spec.js @@ -36,10 +36,6 @@ describe('NugetInstallation', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders all the messages', () => { expect(wrapper.element).toMatchSnapshot(); }); diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/package_files_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/package_files_spec.js index 529a6a22ddf..1dcac017ccf 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/package_files_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/package_files_spec.js @@ -48,10 +48,6 @@ describe('Package Files', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('rows', () => { it('renders a single file for an npm package', () => { createComponent(); diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/package_history_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/package_history_spec.js index bb2fa9eb6f5..ed470f63b8a 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/package_history_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/package_history_spec.js @@ -63,11 +63,6 @@ describe('Package History', () => { jest.spyOn(Sentry, 'captureException').mockImplementation(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findPackageHistoryLoader = () => wrapper.findComponent(PackageHistoryLoader); const findHistoryElement = (testId) => wrapper.findByTestId(testId); const findElementLink = (container) => container.findComponent(GlLink); diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/package_title_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/package_title_spec.js index 142f8d03c5d..ba21cdaca3b 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/package_title_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/package_title_spec.js @@ -55,10 +55,6 @@ describe('PackageTitle', () => { const findSubHeaderText = () => wrapper.findByTestId('sub-header'); const findSubHeaderTimeAgo = () => wrapper.findComponent(TimeAgoTooltip); - afterEach(() => { - wrapper.destroy(); - }); - describe('renders', () => { it('without tags', async () => { await createComponent({ ...packageData(), packageFiles: { nodes: packageFiles() } }); diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/pypi_installation_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/pypi_installation_spec.js index 7eae5b77158..3f4358bb3b0 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/pypi_installation_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/pypi_installation_spec.js @@ -47,10 +47,6 @@ password = <your personal access token>`; createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('install command switch', () => { it('has the installation title component', () => { expect(findInstallationTitle().exists()).toBe(true); diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/version_row_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/version_row_spec.js index 9f3dcc18fb6..f7c8e909ff6 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/details/version_row_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/details/version_row_spec.js @@ -42,10 +42,6 @@ describe('VersionRow', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - it('has a link to the version detail', () => { createComponent(); diff --git a/spec/frontend/packages_and_registries/package_registry/components/functional/delete_packages_spec.js b/spec/frontend/packages_and_registries/package_registry/components/functional/delete_packages_spec.js index d21a7fcbeba..04546c4cea4 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/functional/delete_packages_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/functional/delete_packages_spec.js @@ -67,10 +67,6 @@ describe('DeletePackages', () => { mutationResolver = jest.fn().mockResolvedValue(packagesDestroyMutation()); }); - afterEach(() => { - wrapper.destroy(); - }); - it('binds deletePackages method to the default slot', () => { createComponent(); diff --git a/spec/frontend/packages_and_registries/package_registry/components/list/package_list_row_spec.js b/spec/frontend/packages_and_registries/package_registry/components/list/package_list_row_spec.js index 0d40cb4fde0..91417d2fc9f 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/list/package_list_row_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/list/package_list_row_spec.js @@ -72,10 +72,6 @@ describe('packages_list_row', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders', () => { mountComponent(); expect(wrapper.element).toMatchSnapshot(); diff --git a/spec/frontend/packages_and_registries/package_registry/components/list/packages_list_spec.js b/spec/frontend/packages_and_registries/package_registry/components/list/packages_list_spec.js index 610640e0ca3..ae990f3ea00 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/list/packages_list_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/list/packages_list_spec.js @@ -73,10 +73,6 @@ describe('packages_list', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when is loading', () => { beforeEach(() => { mountComponent({ isLoading: true }); diff --git a/spec/frontend/packages_and_registries/package_registry/components/list/packages_search_spec.js b/spec/frontend/packages_and_registries/package_registry/components/list/packages_search_spec.js index a884959ab62..1250ecaf61f 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/list/packages_search_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/list/packages_search_spec.js @@ -46,10 +46,6 @@ describe('Package Search', () => { extractFilterAndSorting.mockReturnValue(defaultQueryParamsMock); }); - afterEach(() => { - wrapper.destroy(); - }); - it('has a registry search component', async () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/package_registry/components/list/packages_title_spec.js b/spec/frontend/packages_and_registries/package_registry/components/list/packages_title_spec.js index b47515e15c3..1296458155a 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/list/packages_title_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/list/packages_title_spec.js @@ -20,11 +20,6 @@ describe('PackageTitle', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('title area', () => { it('exists', () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/package_registry/components/list/publish_method_spec.js b/spec/frontend/packages_and_registries/package_registry/components/list/publish_method_spec.js index fcbd7cc6a50..e9119b736c2 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/list/publish_method_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/list/publish_method_spec.js @@ -19,10 +19,6 @@ describe('publish_method', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders', () => { mountComponent(); expect(wrapper.element).toMatchSnapshot(); diff --git a/spec/frontend/packages_and_registries/package_registry/components/list/tokens/package_type_token_spec.js b/spec/frontend/packages_and_registries/package_registry/components/list/tokens/package_type_token_spec.js index 8f3c8667c47..c98f5f32344 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/list/tokens/package_type_token_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/list/tokens/package_type_token_spec.js @@ -19,11 +19,6 @@ describe('packages_filter', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('binds all of his attrs to filtered search token', () => { mountComponent({ attrs: { foo: 'bar' } }); diff --git a/spec/frontend/packages_and_registries/package_registry/pages/details_spec.js b/spec/frontend/packages_and_registries/package_registry/pages/details_spec.js index 8d0718a2c3b..49f69a46395 100644 --- a/spec/frontend/packages_and_registries/package_registry/pages/details_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/pages/details_spec.js @@ -131,10 +131,6 @@ describe('PackagesApp', () => { const findDeletePackageModal = () => wrapper.findAllComponents(DeletePackages).at(1); const findDeletePackages = () => wrapper.findComponent(DeletePackages); - afterEach(() => { - wrapper.destroy(); - }); - it('renders an empty state component', async () => { createComponent({ resolver: jest.fn().mockResolvedValue(emptyPackageDetailsQuery) }); diff --git a/spec/frontend/packages_and_registries/package_registry/pages/list_spec.js b/spec/frontend/packages_and_registries/package_registry/pages/list_spec.js index 33f009905a0..75a9770d5dd 100644 --- a/spec/frontend/packages_and_registries/package_registry/pages/list_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/pages/list_spec.js @@ -78,10 +78,6 @@ describe('PackagesListApp', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const waitForFirstRequest = async () => { // emit a search update so the query is executed findSearch().vm.$emit('update', { sort: 'NAME_DESC', filters: [] }); diff --git a/spec/frontend/packages_and_registries/settings/group/components/dependency_proxy_settings_spec.js b/spec/frontend/packages_and_registries/settings/group/components/dependency_proxy_settings_spec.js index 7836fe0ace9..6dd4b9f2d20 100644 --- a/spec/frontend/packages_and_registries/settings/group/components/dependency_proxy_settings_spec.js +++ b/spec/frontend/packages_and_registries/settings/group/components/dependency_proxy_settings_spec.js @@ -82,10 +82,6 @@ describe('DependencyProxySettings', () => { .mockResolvedValue(dependencyProxyUpdateTllPolicyMutationMock()); }); - afterEach(() => { - wrapper.destroy(); - }); - const findSettingsBlock = () => wrapper.findComponent(SettingsBlock); const findEnableProxyToggle = () => wrapper.findByTestId('dependency-proxy-setting-toggle'); const findEnableTtlPoliciesToggle = () => diff --git a/spec/frontend/packages_and_registries/settings/group/components/exceptions_input_spec.js b/spec/frontend/packages_and_registries/settings/group/components/exceptions_input_spec.js index 86f14961690..461200e6983 100644 --- a/spec/frontend/packages_and_registries/settings/group/components/exceptions_input_spec.js +++ b/spec/frontend/packages_and_registries/settings/group/components/exceptions_input_spec.js @@ -23,10 +23,6 @@ describe('Exceptions Input', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findInputGroup = () => wrapper.findComponent(GlFormGroup); const findInput = () => wrapper.findComponent(GlFormInput); diff --git a/spec/frontend/packages_and_registries/settings/group/components/group_settings_app_spec.js b/spec/frontend/packages_and_registries/settings/group/components/group_settings_app_spec.js index 6274fbdbb0c..3ce8e91d43d 100644 --- a/spec/frontend/packages_and_registries/settings/group/components/group_settings_app_spec.js +++ b/spec/frontend/packages_and_registries/settings/group/components/group_settings_app_spec.js @@ -55,10 +55,6 @@ describe('Group Settings App', () => { show = jest.fn(); }); - afterEach(() => { - wrapper.destroy(); - }); - const findAlert = () => wrapper.findComponent(GlAlert); const findPackageSettings = () => wrapper.findComponent(PackagesSettings); const findPackageForwardingSettings = () => wrapper.findComponent(PackagesForwardingSettings); diff --git a/spec/frontend/packages_and_registries/settings/group/components/package_settings_spec.js b/spec/frontend/packages_and_registries/settings/group/components/package_settings_spec.js index 7966fd40907..22e42f8c0ab 100644 --- a/spec/frontend/packages_and_registries/settings/group/components/package_settings_spec.js +++ b/spec/frontend/packages_and_registries/settings/group/components/package_settings_spec.js @@ -56,10 +56,6 @@ describe('Packages Settings', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findSettingsBlock = () => wrapper.findComponent(SettingsBlock); const findDescription = () => wrapper.findByTestId('description'); const findMavenSettings = () => wrapper.findByTestId('maven-settings'); diff --git a/spec/frontend/packages_and_registries/settings/project/settings/components/cleanup_image_tags_spec.js b/spec/frontend/packages_and_registries/settings/project/settings/components/cleanup_image_tags_spec.js index 2bb99fb8e8f..49e8601da88 100644 --- a/spec/frontend/packages_and_registries/settings/project/settings/components/cleanup_image_tags_spec.js +++ b/spec/frontend/packages_and_registries/settings/project/settings/components/cleanup_image_tags_spec.js @@ -61,10 +61,6 @@ describe('Cleanup image tags project settings', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('isEdited status', () => { it.each` description | apiResponse | workingCopy | result diff --git a/spec/frontend/packages_and_registries/settings/project/settings/components/container_expiration_policy_form_spec.js b/spec/frontend/packages_and_registries/settings/project/settings/components/container_expiration_policy_form_spec.js index cbb5aa52694..57b48407174 100644 --- a/spec/frontend/packages_and_registries/settings/project/settings/components/container_expiration_policy_form_spec.js +++ b/spec/frontend/packages_and_registries/settings/project/settings/components/container_expiration_policy_form_spec.js @@ -124,10 +124,6 @@ describe('Container Expiration Policy Settings Form', () => { jest.spyOn(Tracking, 'event'); }); - afterEach(() => { - wrapper.destroy(); - }); - describe.each` model | finder | fieldName | type | defaultValue ${'enabled'} | ${findEnableToggle} | ${'Enable'} | ${'toggle'} | ${false} diff --git a/spec/frontend/packages_and_registries/settings/project/settings/components/container_expiration_policy_spec.js b/spec/frontend/packages_and_registries/settings/project/settings/components/container_expiration_policy_spec.js index 43484d26d76..19f25d0aef7 100644 --- a/spec/frontend/packages_and_registries/settings/project/settings/components/container_expiration_policy_spec.js +++ b/spec/frontend/packages_and_registries/settings/project/settings/components/container_expiration_policy_spec.js @@ -63,10 +63,6 @@ describe('Container expiration policy project settings', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders the setting form', async () => { mountComponentWithApollo({ resolver: jest.fn().mockResolvedValue(expirationPolicyPayload()), diff --git a/spec/frontend/packages_and_registries/settings/project/settings/components/expiration_dropdown_spec.js b/spec/frontend/packages_and_registries/settings/project/settings/components/expiration_dropdown_spec.js index ae41fdf65e0..058fe427106 100644 --- a/spec/frontend/packages_and_registries/settings/project/settings/components/expiration_dropdown_spec.js +++ b/spec/frontend/packages_and_registries/settings/project/settings/components/expiration_dropdown_spec.js @@ -32,11 +32,6 @@ describe('ExpirationDropdown', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('structure', () => { it('has a form-select component', () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/settings/project/settings/components/expiration_input_spec.js b/spec/frontend/packages_and_registries/settings/project/settings/components/expiration_input_spec.js index 1cea0704154..be12d108d1e 100644 --- a/spec/frontend/packages_and_registries/settings/project/settings/components/expiration_input_spec.js +++ b/spec/frontend/packages_and_registries/settings/project/settings/components/expiration_input_spec.js @@ -38,11 +38,6 @@ describe('ExpirationInput', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('structure', () => { it('has a label', () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/settings/project/settings/components/expiration_run_text_spec.js b/spec/frontend/packages_and_registries/settings/project/settings/components/expiration_run_text_spec.js index 653f2a8b40e..f950a9d5add 100644 --- a/spec/frontend/packages_and_registries/settings/project/settings/components/expiration_run_text_spec.js +++ b/spec/frontend/packages_and_registries/settings/project/settings/components/expiration_run_text_spec.js @@ -23,11 +23,6 @@ describe('ExpirationToggle', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('structure', () => { it('has an input component', () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/settings/project/settings/components/expiration_toggle_spec.js b/spec/frontend/packages_and_registries/settings/project/settings/components/expiration_toggle_spec.js index 55a66cebd83..ec7b89aa927 100644 --- a/spec/frontend/packages_and_registries/settings/project/settings/components/expiration_toggle_spec.js +++ b/spec/frontend/packages_and_registries/settings/project/settings/components/expiration_toggle_spec.js @@ -23,11 +23,6 @@ describe('ExpirationToggle', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('structure', () => { it('has a toggle component', () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/settings/project/settings/components/packages_cleanup_policy_form_spec.js b/spec/frontend/packages_and_registries/settings/project/settings/components/packages_cleanup_policy_form_spec.js index 0fbbf4ae58f..b9c0c38bf9e 100644 --- a/spec/frontend/packages_and_registries/settings/project/settings/components/packages_cleanup_policy_form_spec.js +++ b/spec/frontend/packages_and_registries/settings/project/settings/components/packages_cleanup_policy_form_spec.js @@ -115,7 +115,6 @@ describe('Packages Cleanup Policy Settings Form', () => { }); afterEach(() => { - wrapper.destroy(); fakeApollo = null; }); diff --git a/spec/frontend/packages_and_registries/settings/project/settings/components/packages_cleanup_policy_spec.js b/spec/frontend/packages_and_registries/settings/project/settings/components/packages_cleanup_policy_spec.js index 6dfeeca6862..94277d34f30 100644 --- a/spec/frontend/packages_and_registries/settings/project/settings/components/packages_cleanup_policy_spec.js +++ b/spec/frontend/packages_and_registries/settings/project/settings/components/packages_cleanup_policy_spec.js @@ -47,7 +47,6 @@ describe('Packages cleanup policy project settings', () => { }; afterEach(() => { - wrapper.destroy(); fakeApollo = null; }); diff --git a/spec/frontend/packages_and_registries/settings/project/settings/components/registry_settings_app_spec.js b/spec/frontend/packages_and_registries/settings/project/settings/components/registry_settings_app_spec.js index 07d13839c61..54655acdf2a 100644 --- a/spec/frontend/packages_and_registries/settings/project/settings/components/registry_settings_app_spec.js +++ b/spec/frontend/packages_and_registries/settings/project/settings/components/registry_settings_app_spec.js @@ -20,11 +20,6 @@ describe('Registry Settings app', () => { const findPackagesCleanupPolicy = () => wrapper.findComponent(PackagesCleanupPolicy); const findAlert = () => wrapper.findComponent(GlAlert); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const defaultProvide = { showContainerRegistrySettings: true, showPackageRegistrySettings: true, diff --git a/spec/frontend/packages_and_registries/shared/components/cli_commands_spec.js b/spec/frontend/packages_and_registries/shared/components/cli_commands_spec.js index 18084766db9..41482e6e681 100644 --- a/spec/frontend/packages_and_registries/shared/components/cli_commands_spec.js +++ b/spec/frontend/packages_and_registries/shared/components/cli_commands_spec.js @@ -38,11 +38,6 @@ describe('cli_commands', () => { mountComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('shows the correct text on the button', () => { expect(findDropdownButton().text()).toContain(QUICK_START); }); diff --git a/spec/frontend/packages_and_registries/shared/components/delete_package_modal_spec.js b/spec/frontend/packages_and_registries/shared/components/delete_package_modal_spec.js index 357dab593e8..ba5ba8f9884 100644 --- a/spec/frontend/packages_and_registries/shared/components/delete_package_modal_spec.js +++ b/spec/frontend/packages_and_registries/shared/components/delete_package_modal_spec.js @@ -19,11 +19,6 @@ describe('DeletePackageModal', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when itemToBeDeleted prop is defined', () => { beforeEach(() => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/shared/components/package_path_spec.js b/spec/frontend/packages_and_registries/shared/components/package_path_spec.js index cce65d3d0bc..2490e9a1f6a 100644 --- a/spec/frontend/packages_and_registries/shared/components/package_path_spec.js +++ b/spec/frontend/packages_and_registries/shared/components/package_path_spec.js @@ -24,11 +24,6 @@ describe('PackagePath', () => { const findItem = (name) => wrapper.find(`[data-testid="${name}"]`); const findTooltip = (w) => getBinding(w.element, 'gl-tooltip'); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe.each` path | rootUrl | shouldExist | shouldNotExist ${'foo/bar'} | ${'/foo/bar'} | ${[]} | ${[ROOT_CHEVRON, ELLIPSIS_ICON, ELLIPSIS_CHEVRON, LEAF_LINK]} diff --git a/spec/frontend/packages_and_registries/shared/components/packages_list_loader_spec.js b/spec/frontend/packages_and_registries/shared/components/packages_list_loader_spec.js index 0005162e0bb..e43a9f57255 100644 --- a/spec/frontend/packages_and_registries/shared/components/packages_list_loader_spec.js +++ b/spec/frontend/packages_and_registries/shared/components/packages_list_loader_spec.js @@ -17,11 +17,6 @@ describe('PackagesListLoader', () => { beforeEach(createComponent); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('desktop loader', () => { it('produces the right loader', () => { expect(findDesktopShapes().findAll('rect[width="1000"]')).toHaveLength(20); diff --git a/spec/frontend/packages_and_registries/shared/components/persisted_search_spec.js b/spec/frontend/packages_and_registries/shared/components/persisted_search_spec.js index db9f96bff39..1484377a475 100644 --- a/spec/frontend/packages_and_registries/shared/components/persisted_search_spec.js +++ b/spec/frontend/packages_and_registries/shared/components/persisted_search_spec.js @@ -43,10 +43,6 @@ describe('Persisted Search', () => { extractFilterAndSorting.mockReturnValue(defaultQueryParamsMock); }); - afterEach(() => { - wrapper.destroy(); - }); - it('has a registry search component', async () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/shared/components/publish_method_spec.js b/spec/frontend/packages_and_registries/shared/components/publish_method_spec.js index fa8f8f7641a..167599a54ea 100644 --- a/spec/frontend/packages_and_registries/shared/components/publish_method_spec.js +++ b/spec/frontend/packages_and_registries/shared/components/publish_method_spec.js @@ -20,11 +20,6 @@ describe('publish_method', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders', () => { mountComponent(packageWithPipeline); expect(wrapper.element).toMatchSnapshot(); diff --git a/spec/frontend/packages_and_registries/shared/components/registry_breadcrumb_spec.js b/spec/frontend/packages_and_registries/shared/components/registry_breadcrumb_spec.js index 15db454ac68..c1f1a25d53b 100644 --- a/spec/frontend/packages_and_registries/shared/components/registry_breadcrumb_spec.js +++ b/spec/frontend/packages_and_registries/shared/components/registry_breadcrumb_spec.js @@ -31,10 +31,6 @@ describe('Registry Breadcrumb', () => { nameGenerator.mockClear(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('when is rootRoute', () => { beforeEach(() => { mountComponent(routes[0]); diff --git a/spec/frontend/packages_and_registries/shared/components/registry_list_spec.js b/spec/frontend/packages_and_registries/shared/components/registry_list_spec.js index 2e2d5e26d33..b821352922f 100644 --- a/spec/frontend/packages_and_registries/shared/components/registry_list_spec.js +++ b/spec/frontend/packages_and_registries/shared/components/registry_list_spec.js @@ -36,10 +36,6 @@ describe('Registry List', () => { const findScopedSlotFirstValue = (index) => findScopedSlots().at(index).find('span'); const findScopedSlotIsSelectedValue = (index) => findScopedSlots().at(index).find('p'); - afterEach(() => { - wrapper.destroy(); - }); - describe('header', () => { it('renders the title passed in the prop', () => { mountComponent(); diff --git a/spec/frontend/packages_and_registries/shared/components/settings_block_spec.js b/spec/frontend/packages_and_registries/shared/components/settings_block_spec.js index a4c1b989dac..664a821c275 100644 --- a/spec/frontend/packages_and_registries/shared/components/settings_block_spec.js +++ b/spec/frontend/packages_and_registries/shared/components/settings_block_spec.js @@ -15,10 +15,6 @@ describe('SettingsBlock', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findDefaultSlot = () => wrapper.findByTestId('default-slot'); const findTitleSlot = () => wrapper.findByTestId('title-slot'); const findDescriptionSlot = () => wrapper.findByTestId('description-slot'); diff --git a/spec/frontend/pages/groups/new/components/app_spec.js b/spec/frontend/pages/groups/new/components/app_spec.js index b5fbdd764ce..7ccded9b0f1 100644 --- a/spec/frontend/pages/groups/new/components/app_spec.js +++ b/spec/frontend/pages/groups/new/components/app_spec.js @@ -16,10 +16,6 @@ describe('App component', () => { .props('panels') .find((panel) => panel.name === 'create-group-pane'); - afterEach(() => { - wrapper.destroy(); - }); - it('creates correct component for group creation', () => { createComponent(); diff --git a/spec/frontend/pages/groups/new/components/create_group_description_details_spec.js b/spec/frontend/pages/groups/new/components/create_group_description_details_spec.js index 56a1fd03f71..35015d84085 100644 --- a/spec/frontend/pages/groups/new/components/create_group_description_details_spec.js +++ b/spec/frontend/pages/groups/new/components/create_group_description_details_spec.js @@ -15,10 +15,6 @@ describe('CreateGroupDescriptionDetails component', () => { const findLinkHref = (at) => wrapper.findAllComponents(GlLink).at(at); - afterEach(() => { - wrapper.destroy(); - }); - it('creates correct component for group creation', () => { createComponent(); diff --git a/spec/frontend/pages/import/bulk_imports/history/components/bulk_imports_history_app_spec.js b/spec/frontend/pages/import/bulk_imports/history/components/bulk_imports_history_app_spec.js index da3954b4918..79db288c19b 100644 --- a/spec/frontend/pages/import/bulk_imports/history/components/bulk_imports_history_app_spec.js +++ b/spec/frontend/pages/import/bulk_imports/history/components/bulk_imports_history_app_spec.js @@ -84,7 +84,6 @@ describe('BulkImportsHistoryApp', () => { afterEach(() => { mock.restore(); - wrapper.destroy(); }); describe('general behavior', () => { diff --git a/spec/frontend/pages/import/history/components/import_error_details_spec.js b/spec/frontend/pages/import/history/components/import_error_details_spec.js index 628ee8d7999..e51ace44fe6 100644 --- a/spec/frontend/pages/import/history/components/import_error_details_spec.js +++ b/spec/frontend/pages/import/history/components/import_error_details_spec.js @@ -36,7 +36,6 @@ describe('ImportErrorDetails', () => { afterEach(() => { mock.restore(); - wrapper.destroy(); }); describe('general behavior', () => { diff --git a/spec/frontend/pages/import/history/components/import_history_app_spec.js b/spec/frontend/pages/import/history/components/import_history_app_spec.js index 7d79583be19..07a031e5949 100644 --- a/spec/frontend/pages/import/history/components/import_history_app_spec.js +++ b/spec/frontend/pages/import/history/components/import_history_app_spec.js @@ -75,7 +75,6 @@ describe('ImportHistoryApp', () => { afterEach(() => { mock.restore(); - wrapper.destroy(); }); describe('general behavior', () => { diff --git a/spec/frontend/pages/profiles/password_prompt/password_prompt_modal_spec.js b/spec/frontend/pages/profiles/password_prompt/password_prompt_modal_spec.js index c30b996437d..439bb342d01 100644 --- a/spec/frontend/pages/profiles/password_prompt/password_prompt_modal_spec.js +++ b/spec/frontend/pages/profiles/password_prompt/password_prompt_modal_spec.js @@ -41,10 +41,6 @@ describe('Password prompt modal', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the password field', () => { expect(findField().exists()).toBe(true); }); diff --git a/spec/frontend/pages/projects/forks/new/components/app_spec.js b/spec/frontend/pages/projects/forks/new/components/app_spec.js index 0342b94a44d..e9a94878867 100644 --- a/spec/frontend/pages/projects/forks/new/components/app_spec.js +++ b/spec/frontend/pages/projects/forks/new/components/app_spec.js @@ -22,10 +22,6 @@ describe('App component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('displays the correct svg illustration', () => { expect(wrapper.find('img').attributes('src')).toBe('illustrations/project-create-new-sm.svg'); }); diff --git a/spec/frontend/pages/projects/forks/new/components/fork_form_spec.js b/spec/frontend/pages/projects/forks/new/components/fork_form_spec.js index f0593a854b2..8b906d76b9f 100644 --- a/spec/frontend/pages/projects/forks/new/components/fork_form_spec.js +++ b/spec/frontend/pages/projects/forks/new/components/fork_form_spec.js @@ -111,7 +111,6 @@ describe('ForkForm component', () => { }); afterEach(() => { - wrapper.destroy(); axiosMock.restore(); }); diff --git a/spec/frontend/pages/projects/graphs/code_coverage_spec.js b/spec/frontend/pages/projects/graphs/code_coverage_spec.js index 5356953060a..ecf88dbed08 100644 --- a/spec/frontend/pages/projects/graphs/code_coverage_spec.js +++ b/spec/frontend/pages/projects/graphs/code_coverage_spec.js @@ -41,11 +41,6 @@ describe('Code Coverage', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when fetching data is successful', () => { beforeEach(() => { mockAxios = new MockAdapter(axios); diff --git a/spec/frontend/pages/projects/pipeline_schedules/shared/components/interval_pattern_input_spec.js b/spec/frontend/pages/projects/pipeline_schedules/shared/components/interval_pattern_input_spec.js index 2d3b9afa8f6..07d05293a3c 100644 --- a/spec/frontend/pages/projects/pipeline_schedules/shared/components/interval_pattern_input_spec.js +++ b/spec/frontend/pages/projects/pipeline_schedules/shared/components/interval_pattern_input_spec.js @@ -37,10 +37,6 @@ describe('Interval Pattern Input Component', () => { const selectCustomRadio = () => findCustomRadio().setChecked(true); const createWrapper = (props = {}, data = {}) => { - if (wrapper) { - throw new Error('A wrapper already exists'); - } - wrapper = mount(IntervalPatternInput, { propsData: { ...props }, data() { @@ -64,8 +60,6 @@ describe('Interval Pattern Input Component', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; window.gl = oldWindowGl; }); diff --git a/spec/frontend/pages/projects/pipeline_schedules/shared/components/pipeline_schedule_callout_spec.js b/spec/frontend/pages/projects/pipeline_schedules/shared/components/pipeline_schedule_callout_spec.js index a633332ab65..e20c2fa47a7 100644 --- a/spec/frontend/pages/projects/pipeline_schedules/shared/components/pipeline_schedule_callout_spec.js +++ b/spec/frontend/pages/projects/pipeline_schedules/shared/components/pipeline_schedule_callout_spec.js @@ -31,10 +31,6 @@ describe('Pipeline Schedule Callout', () => { await nextTick(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('does not render the callout', () => { expect(findInnerContentOfCallout().exists()).toBe(false); }); @@ -46,10 +42,6 @@ describe('Pipeline Schedule Callout', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the callout container', () => { expect(findInnerContentOfCallout().exists()).toBe(true); }); diff --git a/spec/frontend/pages/projects/shared/permissions/components/project_feature_settings_spec.js b/spec/frontend/pages/projects/shared/permissions/components/project_feature_settings_spec.js index 5771e1b88e8..03c65ab4c9c 100644 --- a/spec/frontend/pages/projects/shared/permissions/components/project_feature_settings_spec.js +++ b/spec/frontend/pages/projects/shared/permissions/components/project_feature_settings_spec.js @@ -31,11 +31,6 @@ describe('Project Feature Settings', () => { }, }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('Hidden name input', () => { it('should set the hidden name input if the name exists', () => { wrapper = mountComponent(); diff --git a/spec/frontend/pages/projects/shared/permissions/components/project_setting_row_spec.js b/spec/frontend/pages/projects/shared/permissions/components/project_setting_row_spec.js index 6230809a6aa..91d3057aec5 100644 --- a/spec/frontend/pages/projects/shared/permissions/components/project_setting_row_spec.js +++ b/spec/frontend/pages/projects/shared/permissions/components/project_setting_row_spec.js @@ -15,10 +15,6 @@ describe('Project Setting Row', () => { wrapper = mountComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should show the label if it is set', async () => { wrapper.setProps({ label: 'Test label' }); diff --git a/spec/frontend/pages/projects/shared/permissions/components/settings_panel_spec.js b/spec/frontend/pages/projects/shared/permissions/components/settings_panel_spec.js index ff20b72c72c..0812be9745e 100644 --- a/spec/frontend/pages/projects/shared/permissions/components/settings_panel_spec.js +++ b/spec/frontend/pages/projects/shared/permissions/components/settings_panel_spec.js @@ -140,11 +140,6 @@ describe('Settings Panel', () => { const findMonitorVisibilityInput = () => findMonitorSettings().findComponent(ProjectFeatureSetting); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('Project Visibility', () => { it('should set the project visibility help path', () => { wrapper = mountComponent(); diff --git a/spec/frontend/pages/shared/wikis/components/wiki_alert_spec.js b/spec/frontend/pages/shared/wikis/components/wiki_alert_spec.js index 6a18473b1a7..1858a56b0e1 100644 --- a/spec/frontend/pages/shared/wikis/components/wiki_alert_spec.js +++ b/spec/frontend/pages/shared/wikis/components/wiki_alert_spec.js @@ -15,11 +15,6 @@ describe('WikiAlert', () => { }); } - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findGlAlert = () => wrapper.findComponent(GlAlert); const findGlLink = () => wrapper.findComponent(GlLink); const findGlSprintf = () => wrapper.findComponent(GlSprintf); diff --git a/spec/frontend/pages/shared/wikis/components/wiki_content_spec.js b/spec/frontend/pages/shared/wikis/components/wiki_content_spec.js index c8e9a31b526..8e26453b564 100644 --- a/spec/frontend/pages/shared/wikis/components/wiki_content_spec.js +++ b/spec/frontend/pages/shared/wikis/components/wiki_content_spec.js @@ -31,11 +31,6 @@ describe('pages/shared/wikis/components/wiki_content', () => { mock = new MockAdapter(axios); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findGlAlert = () => wrapper.findComponent(GlAlert); const findGlSkeletonLoader = () => wrapper.findComponent(GlSkeletonLoader); const findContent = () => wrapper.find('[data-testid="wiki-page-content"]'); diff --git a/spec/frontend/pages/shared/wikis/components/wiki_form_spec.js b/spec/frontend/pages/shared/wikis/components/wiki_form_spec.js index 53c87a62940..1be4a974f7a 100644 --- a/spec/frontend/pages/shared/wikis/components/wiki_form_spec.js +++ b/spec/frontend/pages/shared/wikis/components/wiki_form_spec.js @@ -103,8 +103,6 @@ describe('WikiForm', () => { afterEach(() => { mock.restore(); - wrapper.destroy(); - wrapper = null; }); it('displays markdown editor', () => { diff --git a/spec/frontend/pdf/index_spec.js b/spec/frontend/pdf/index_spec.js index 98946412264..23477c73ba0 100644 --- a/spec/frontend/pdf/index_spec.js +++ b/spec/frontend/pdf/index_spec.js @@ -7,10 +7,6 @@ describe('PDFLab component', () => { const mountComponent = ({ pdf }) => shallowMount(PDFLab, { propsData: { pdf } }); - afterEach(() => { - wrapper.destroy(); - }); - describe('without PDF data', () => { beforeEach(() => { wrapper = mountComponent({ pdf: '' }); diff --git a/spec/frontend/pdf/page_spec.js b/spec/frontend/pdf/page_spec.js index 4cf83a3252d..1d5c5cd98c4 100644 --- a/spec/frontend/pdf/page_spec.js +++ b/spec/frontend/pdf/page_spec.js @@ -9,10 +9,6 @@ jest.mock('pdfjs-dist/webpack', () => { describe('Page component', () => { let wrapper; - afterEach(() => { - wrapper.destroy(); - }); - it('renders the page when mounting', async () => { const testPage = { render: jest.fn().mockReturnValue({ promise: Promise.resolve() }), diff --git a/spec/frontend/performance_bar/components/add_request_spec.js b/spec/frontend/performance_bar/components/add_request_spec.js index 5460feb66fe..de9cc1e8008 100644 --- a/spec/frontend/performance_bar/components/add_request_spec.js +++ b/spec/frontend/performance_bar/components/add_request_spec.js @@ -13,10 +13,6 @@ describe('add request form', () => { wrapper = mount(AddRequest); }); - afterEach(() => { - wrapper.destroy(); - }); - it('hides the input on load', () => { expect(findGlFormInput().exists()).toBe(false); }); diff --git a/spec/frontend/performance_bar/components/detailed_metric_spec.js b/spec/frontend/performance_bar/components/detailed_metric_spec.js index 5ab2c9abe5d..4194639fffe 100644 --- a/spec/frontend/performance_bar/components/detailed_metric_spec.js +++ b/spec/frontend/performance_bar/components/detailed_metric_spec.js @@ -38,10 +38,6 @@ describe('detailedMetric', () => { const findAllSummaryItems = () => wrapper.findAllByTestId('performance-bar-summary-item').wrappers.map((w) => w.text()); - afterEach(() => { - wrapper.destroy(); - }); - describe('when the current request has no details', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/performance_bar/components/request_warning_spec.js b/spec/frontend/performance_bar/components/request_warning_spec.js index 9dd8ea9f933..7b6d8ff695d 100644 --- a/spec/frontend/performance_bar/components/request_warning_spec.js +++ b/spec/frontend/performance_bar/components/request_warning_spec.js @@ -5,10 +5,6 @@ describe('request warning', () => { let wrapper; const htmlId = 'request-123'; - afterEach(() => { - wrapper.destroy(); - }); - describe('when the request has warnings', () => { beforeEach(() => { wrapper = shallowMount(RequestWarning, { diff --git a/spec/frontend/pipeline_wizard/components/commit_spec.js b/spec/frontend/pipeline_wizard/components/commit_spec.js index fa30b9c2b97..8f44a6c085b 100644 --- a/spec/frontend/pipeline_wizard/components/commit_spec.js +++ b/spec/frontend/pipeline_wizard/components/commit_spec.js @@ -74,10 +74,6 @@ describe('Pipeline Wizard - Commit Page', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('shows a commit message input with the correct label', () => { expect(wrapper.findByTestId('commit_message').exists()).toBe(true); expect(wrapper.find('label[for="commit_message"]').text()).toBe(i18n.commitMessageLabel); @@ -121,10 +117,6 @@ describe('Pipeline Wizard - Commit Page', () => { expect(wrapper.findByTestId('load-error').exists()).toBe(true); expect(wrapper.findByTestId('load-error').text()).toBe(i18n.errors.loadError); }); - - afterEach(() => { - wrapper.destroy(); - }); }); describe('commit result handling', () => { @@ -151,7 +143,6 @@ describe('Pipeline Wizard - Commit Page', () => { }); afterEach(() => { - wrapper.destroy(); jest.clearAllMocks(); }); }); @@ -178,7 +169,6 @@ describe('Pipeline Wizard - Commit Page', () => { }); afterEach(() => { - wrapper.destroy(); jest.clearAllMocks(); }); }); @@ -246,10 +236,6 @@ describe('Pipeline Wizard - Commit Page', () => { await waitForPromises(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('sets up without error', async () => { expect(consoleSpy).not.toHaveBeenCalled(); }); diff --git a/spec/frontend/pipeline_wizard/components/editor_spec.js b/spec/frontend/pipeline_wizard/components/editor_spec.js index dd0a609043a..6d7d4363189 100644 --- a/spec/frontend/pipeline_wizard/components/editor_spec.js +++ b/spec/frontend/pipeline_wizard/components/editor_spec.js @@ -9,10 +9,6 @@ describe('Pages Yaml Editor wrapper', () => { propsData: { doc: new Document({ foo: 'bar' }), filename: 'foo.yml' }, }; - afterEach(() => { - wrapper.destroy(); - }); - describe('mount hook', () => { beforeEach(() => { wrapper = mount(YamlEditor, defaultOptions); diff --git a/spec/frontend/pipeline_wizard/components/input_wrapper_spec.js b/spec/frontend/pipeline_wizard/components/input_wrapper_spec.js index f288264a11e..7f521e2523e 100644 --- a/spec/frontend/pipeline_wizard/components/input_wrapper_spec.js +++ b/spec/frontend/pipeline_wizard/components/input_wrapper_spec.js @@ -33,10 +33,6 @@ describe('Pipeline Wizard -- Input Wrapper', () => { inputChild = wrapper.findComponent(TextWidget); }); - afterEach(() => { - wrapper.destroy(); - }); - it('will replace its value in compiled', async () => { await inputChild.vm.$emit('input', inputValue); const expected = new Document({ @@ -54,10 +50,6 @@ describe('Pipeline Wizard -- Input Wrapper', () => { }); describe('Target Path Discovery', () => { - afterEach(() => { - wrapper.destroy(); - }); - it.each` scenario | template | target | expected ${'simple nested object'} | ${{ foo: { bar: { baz: '$BOO' } } }} | ${'$BOO'} | ${['foo', 'bar', 'baz']} diff --git a/spec/frontend/pipeline_wizard/components/step_nav_spec.js b/spec/frontend/pipeline_wizard/components/step_nav_spec.js index c6eac1386fa..8e2f0ab0281 100644 --- a/spec/frontend/pipeline_wizard/components/step_nav_spec.js +++ b/spec/frontend/pipeline_wizard/components/step_nav_spec.js @@ -19,10 +19,6 @@ describe('Pipeline Wizard - Step Navigation Component', () => { nextButton = wrapper.findByTestId('next-button'); }; - afterEach(() => { - wrapper.destroy(); - }); - it.each` scenario | showBackButton | showNextButton ${'does not show prev button'} | ${false} | ${false} diff --git a/spec/frontend/pipeline_wizard/components/widgets/checklist_spec.js b/spec/frontend/pipeline_wizard/components/widgets/checklist_spec.js index b8e194015b0..52e5d49ec99 100644 --- a/spec/frontend/pipeline_wizard/components/widgets/checklist_spec.js +++ b/spec/frontend/pipeline_wizard/components/widgets/checklist_spec.js @@ -39,10 +39,6 @@ describe('Pipeline Wizard - Checklist Widget', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('creates the component', () => { createComponent(); expect(wrapper.exists()).toBe(true); diff --git a/spec/frontend/pipeline_wizard/components/widgets/list_spec.js b/spec/frontend/pipeline_wizard/components/widgets/list_spec.js index c9e9f5caebe..b0eb7279a94 100644 --- a/spec/frontend/pipeline_wizard/components/widgets/list_spec.js +++ b/spec/frontend/pipeline_wizard/components/widgets/list_spec.js @@ -39,10 +39,6 @@ describe('Pipeline Wizard - List Widget', () => { }; describe('component setup and interface', () => { - afterEach(() => { - wrapper.destroy(); - }); - it('prints the label inside the legend', () => { createComponent(); @@ -168,10 +164,6 @@ describe('Pipeline Wizard - List Widget', () => { }); describe('form validation', () => { - afterEach(() => { - wrapper.destroy(); - }); - it('does not show validation state when untouched', async () => { createComponent({}, mountExtended); expect(findGlFormGroup().classes()).not.toContain('is-valid'); diff --git a/spec/frontend/pipeline_wizard/components/wrapper_spec.js b/spec/frontend/pipeline_wizard/components/wrapper_spec.js index 33c6394eb41..1056602c912 100644 --- a/spec/frontend/pipeline_wizard/components/wrapper_spec.js +++ b/spec/frontend/pipeline_wizard/components/wrapper_spec.js @@ -48,10 +48,6 @@ describe('Pipeline Wizard - wrapper.vue', () => { wrapper.find(`[data-input-target="${target}"]`).find('input'); describe('display', () => { - afterEach(() => { - wrapper.destroy(); - }); - it('shows the steps', () => { createComponent(); @@ -145,10 +141,6 @@ describe('Pipeline Wizard - wrapper.vue', () => { } }); - afterEach(() => { - wrapper.destroy(); - }); - if (expectCommitStepShown) { it('does not show the step wrapper', async () => { expect(wrapper.findComponent(WizardStep).isVisible()).toBe(false); @@ -188,10 +180,6 @@ describe('Pipeline Wizard - wrapper.vue', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('initially shows a placeholder', async () => { const editorContent = getEditorContent(); @@ -240,10 +228,6 @@ describe('Pipeline Wizard - wrapper.vue', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('highlight requests by the step get passed on to the editor', async () => { const highlight = 'foo'; @@ -309,7 +293,6 @@ describe('Pipeline Wizard - wrapper.vue', () => { }); afterEach(() => { - wrapper.destroy(); inputField = undefined; }); @@ -331,10 +314,6 @@ describe('Pipeline Wizard - wrapper.vue', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('emits done', () => { expect(wrapper.emitted('done')).toBeUndefined(); diff --git a/spec/frontend/pipeline_wizard/pipeline_wizard_spec.js b/spec/frontend/pipeline_wizard/pipeline_wizard_spec.js index 13234525159..e7bd7f686b6 100644 --- a/spec/frontend/pipeline_wizard/pipeline_wizard_spec.js +++ b/spec/frontend/pipeline_wizard/pipeline_wizard_spec.js @@ -24,10 +24,6 @@ describe('PipelineWizard', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('mounts without error', () => { const consoleSpy = jest.spyOn(console, 'error'); diff --git a/spec/frontend/pipelines/components/dag/dag_annotations_spec.js b/spec/frontend/pipelines/components/dag/dag_annotations_spec.js index 28a08b6da0f..aecaa640266 100644 --- a/spec/frontend/pipelines/components/dag/dag_annotations_spec.js +++ b/spec/frontend/pipelines/components/dag/dag_annotations_spec.js @@ -28,11 +28,6 @@ describe('The DAG annotations', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when there is one annotation', () => { const currentNote = singleNote['dag-link103']; diff --git a/spec/frontend/pipelines/components/dag/dag_graph_spec.js b/spec/frontend/pipelines/components/dag/dag_graph_spec.js index 4619548d1bb..6b46be3dd49 100644 --- a/spec/frontend/pipelines/components/dag/dag_graph_spec.js +++ b/spec/frontend/pipelines/components/dag/dag_graph_spec.js @@ -36,11 +36,6 @@ describe('The DAG graph', () => { createComponent({ graphData: parsedData }); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('in the basic case', () => { beforeEach(() => { /* diff --git a/spec/frontend/pipelines/components/dag/dag_spec.js b/spec/frontend/pipelines/components/dag/dag_spec.js index b0c26976c85..e2dc8120309 100644 --- a/spec/frontend/pipelines/components/dag/dag_spec.js +++ b/spec/frontend/pipelines/components/dag/dag_spec.js @@ -51,11 +51,6 @@ describe('Pipeline DAG graph wrapper', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when a query argument is undefined', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/pipelines/components/jobs/failed_jobs_app_spec.js b/spec/frontend/pipelines/components/jobs/failed_jobs_app_spec.js index 24732e71d5d..169e3666cbd 100644 --- a/spec/frontend/pipelines/components/jobs/failed_jobs_app_spec.js +++ b/spec/frontend/pipelines/components/jobs/failed_jobs_app_spec.js @@ -44,10 +44,6 @@ describe('Failed Jobs App', () => { resolverSpy = jest.fn().mockResolvedValue(mockFailedJobsQueryResponse); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('loading spinner', () => { it('displays loading spinner when fetching failed jobs', () => { createComponent(resolverSpy); diff --git a/spec/frontend/pipelines/components/jobs/failed_jobs_table_spec.js b/spec/frontend/pipelines/components/jobs/failed_jobs_table_spec.js index e2bb8906128..0ac3b6c9074 100644 --- a/spec/frontend/pipelines/components/jobs/failed_jobs_table_spec.js +++ b/spec/frontend/pipelines/components/jobs/failed_jobs_table_spec.js @@ -45,10 +45,6 @@ describe('Failed Jobs Table', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('displays the failed jobs table', () => { createComponent(); diff --git a/spec/frontend/pipelines/components/jobs/jobs_app_spec.js b/spec/frontend/pipelines/components/jobs/jobs_app_spec.js index 26dee132690..52df7b4500b 100644 --- a/spec/frontend/pipelines/components/jobs/jobs_app_spec.js +++ b/spec/frontend/pipelines/components/jobs/jobs_app_spec.js @@ -45,10 +45,6 @@ describe('Jobs app', () => { resolverSpy = jest.fn().mockResolvedValue(mockPipelineJobsQueryResponse); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('loading spinner', () => { const setup = async () => { createComponent(resolverSpy); diff --git a/spec/frontend/pipelines/components/pipeline_mini_graph/linked_pipelines_mini_list_spec.js b/spec/frontend/pipelines/components/pipeline_mini_graph/linked_pipelines_mini_list_spec.js index 61dee1f5904..a4ecb9041c9 100644 --- a/spec/frontend/pipelines/components/pipeline_mini_graph/linked_pipelines_mini_list_spec.js +++ b/spec/frontend/pipelines/components/pipeline_mini_graph/linked_pipelines_mini_list_spec.js @@ -34,11 +34,6 @@ describe('Linked pipeline mini list', () => { }); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('should render one linked pipeline item', () => { expect(findLinkedPipelineMiniItem().exists()).toBe(true); }); @@ -102,11 +97,6 @@ describe('Linked pipeline mini list', () => { }); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('should render three linked pipeline items', () => { expect(findLinkedPipelineMiniItems().exists()).toBe(true); expect(findLinkedPipelineMiniItems().length).toBe(3); diff --git a/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_mini_graph_spec.js b/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_mini_graph_spec.js index 036b82530d5..e7415a6c596 100644 --- a/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_mini_graph_spec.js +++ b/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_mini_graph_spec.js @@ -33,11 +33,6 @@ describe('Pipeline Mini Graph', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('should render the pipeline stages', () => { expect(findPipelineStages().exists()).toBe(true); }); @@ -71,11 +66,6 @@ describe('Pipeline Mini Graph', () => { }); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('should have the correct props', () => { expect(findPipelineMiniGraph().props()).toMatchObject({ downstreamPipelines: [], @@ -118,11 +108,6 @@ describe('Pipeline Mini Graph', () => { }); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('should render the downstream linked pipelines mini list only', () => { expect(findLinkedPipelineDownstream().exists()).toBe(true); expect(findLinkedPipelineUpstream().exists()).toBe(false); diff --git a/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_stage_spec.js b/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_stage_spec.js index ab2056b4035..864f2d66f60 100644 --- a/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_stage_spec.js +++ b/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_stage_spec.js @@ -45,11 +45,10 @@ describe('Pipelines stage component', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; - eventHub.$emit.mockRestore(); mock.restore(); + // eslint-disable-next-line @gitlab/vtu-no-explicit-wrapper-destroy + wrapper.destroy(); }); const findCiActionBtn = () => wrapper.find('.js-ci-action'); diff --git a/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_stages_spec.js b/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_stages_spec.js index c123f53886e..73e810bde99 100644 --- a/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_stages_spec.js +++ b/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_stages_spec.js @@ -60,9 +60,4 @@ describe('Pipeline Stages', () => { expect(findPipelineStagesAt(0).props('isMergeTrain')).toBe(true); expect(findPipelineStagesAt(1).props('isMergeTrain')).toBe(true); }); - - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); }); diff --git a/spec/frontend/pipelines/components/pipeline_tabs_spec.js b/spec/frontend/pipelines/components/pipeline_tabs_spec.js index c2cb95d4320..337af6c1f60 100644 --- a/spec/frontend/pipelines/components/pipeline_tabs_spec.js +++ b/spec/frontend/pipelines/components/pipeline_tabs_spec.js @@ -39,10 +39,6 @@ describe('The Pipeline Tabs', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('Tabs', () => { it.each` tabName | tabComponent diff --git a/spec/frontend/pipelines/components/pipelines_filtered_search_spec.js b/spec/frontend/pipelines/components/pipelines_filtered_search_spec.js index ba7262353f0..51a4487a3ef 100644 --- a/spec/frontend/pipelines/components/pipelines_filtered_search_spec.js +++ b/spec/frontend/pipelines/components/pipelines_filtered_search_spec.js @@ -51,8 +51,6 @@ describe('Pipelines filtered search', () => { afterEach(() => { mock.restore(); - wrapper.destroy(); - wrapper = null; }); it('displays UI elements', () => { diff --git a/spec/frontend/pipelines/components/pipelines_list/empty_state/ci_templates_spec.js b/spec/frontend/pipelines/components/pipelines_list/empty_state/ci_templates_spec.js index 6531a15ab8e..b560eea4882 100644 --- a/spec/frontend/pipelines/components/pipelines_list/empty_state/ci_templates_spec.js +++ b/spec/frontend/pipelines/components/pipelines_list/empty_state/ci_templates_spec.js @@ -29,11 +29,6 @@ describe('CI Templates', () => { const findTemplateName = () => wrapper.findByTestId('template-name'); const findTemplateLogo = () => wrapper.findByTestId('template-logo'); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('renders template list', () => { beforeEach(() => { createWrapper(); diff --git a/spec/frontend/pipelines/components/pipelines_list/empty_state/ios_templates_spec.js b/spec/frontend/pipelines/components/pipelines_list/empty_state/ios_templates_spec.js index 0c2938921d6..700be076e0c 100644 --- a/spec/frontend/pipelines/components/pipelines_list/empty_state/ios_templates_spec.js +++ b/spec/frontend/pipelines/components/pipelines_list/empty_state/ios_templates_spec.js @@ -37,11 +37,6 @@ describe('iOS Templates', () => { const findSetupRunnerLink = () => wrapper.findByText('Set up a runner'); const configurePipelineLink = () => wrapper.findByTestId('configure-pipeline-link'); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when ios runners are not available', () => { beforeEach(() => { wrapper = createWrapper({ iosRunnersAvailable: false }); diff --git a/spec/frontend/pipelines/components/pipelines_list/empty_state/pipelines_ci_templates_spec.js b/spec/frontend/pipelines/components/pipelines_list/empty_state/pipelines_ci_templates_spec.js index f255e0d857f..0f4a2b1d02f 100644 --- a/spec/frontend/pipelines/components/pipelines_list/empty_state/pipelines_ci_templates_spec.js +++ b/spec/frontend/pipelines/components/pipelines_list/empty_state/pipelines_ci_templates_spec.js @@ -42,11 +42,6 @@ describe('Pipelines CI Templates', () => { const findDocumentationLink = () => wrapper.findByTestId('documentation-link'); const findSettingsButton = () => wrapper.findByTestId('settings-button'); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('renders test template', () => { beforeEach(() => { wrapper = createWrapper(); diff --git a/spec/frontend/pipelines/empty_state_spec.js b/spec/frontend/pipelines/empty_state_spec.js index 0abf7f59717..5465e4d77da 100644 --- a/spec/frontend/pipelines/empty_state_spec.js +++ b/spec/frontend/pipelines/empty_state_spec.js @@ -35,11 +35,6 @@ describe('Pipelines Empty State', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when user can configure CI', () => { describe('when the ios_specific_templates experiment is active', () => { beforeEach(() => { diff --git a/spec/frontend/pipelines/graph/action_component_spec.js b/spec/frontend/pipelines/graph/action_component_spec.js index e3eea503b46..890255f225e 100644 --- a/spec/frontend/pipelines/graph/action_component_spec.js +++ b/spec/frontend/pipelines/graph/action_component_spec.js @@ -33,7 +33,6 @@ describe('pipeline graph action component', () => { afterEach(() => { mock.restore(); - wrapper.destroy(); }); describe('render', () => { diff --git a/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js b/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js index 99bccd21656..42e47a23db8 100644 --- a/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js +++ b/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js @@ -101,10 +101,6 @@ describe('Pipeline graph wrapper', () => { createComponent({ apolloProvider, data, provide, mountFn }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when data is loading', () => { it('displays the loading icon', () => { createComponentWithApollo(); diff --git a/spec/frontend/pipelines/graph/graph_view_selector_spec.js b/spec/frontend/pipelines/graph/graph_view_selector_spec.js index 43587bebedf..78265165d1f 100644 --- a/spec/frontend/pipelines/graph/graph_view_selector_spec.js +++ b/spec/frontend/pipelines/graph/graph_view_selector_spec.js @@ -42,10 +42,6 @@ describe('the graph view selector component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when showing stage view', () => { beforeEach(() => { createComponent({ mountFn: mount }); diff --git a/spec/frontend/pipelines/graph/job_group_dropdown_spec.js b/spec/frontend/pipelines/graph/job_group_dropdown_spec.js index d8afb33e148..1419a7b9982 100644 --- a/spec/frontend/pipelines/graph/job_group_dropdown_spec.js +++ b/spec/frontend/pipelines/graph/job_group_dropdown_spec.js @@ -69,10 +69,6 @@ describe('job group dropdown component', () => { wrapper = mountFn(JobGroupDropdown, { propsData: { group } }); }; - afterEach(() => { - wrapper.destroy(); - }); - beforeEach(() => { createComponent({ mountFn: mount }); }); diff --git a/spec/frontend/pipelines/graph/linked_pipeline_spec.js b/spec/frontend/pipelines/graph/linked_pipeline_spec.js index f396fe2aff4..b5ef10dee12 100644 --- a/spec/frontend/pipelines/graph/linked_pipeline_spec.js +++ b/spec/frontend/pipelines/graph/linked_pipeline_spec.js @@ -58,10 +58,6 @@ describe('Linked pipeline', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('rendered output', () => { const props = { pipeline: mockPipeline, diff --git a/spec/frontend/pipelines/graph/linked_pipelines_column_spec.js b/spec/frontend/pipelines/graph/linked_pipelines_column_spec.js index 63e2d8707ea..6e4b9498918 100644 --- a/spec/frontend/pipelines/graph/linked_pipelines_column_spec.js +++ b/spec/frontend/pipelines/graph/linked_pipelines_column_spec.js @@ -65,10 +65,6 @@ describe('Linked Pipelines Column', () => { createComponent({ apolloProvider, mountFn, props }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('it renders correctly', () => { beforeEach(() => { createComponentWithApollo(); diff --git a/spec/frontend/pipelines/graph/stage_column_component_spec.js b/spec/frontend/pipelines/graph/stage_column_component_spec.js index 19f597a7267..d4d7f1618c5 100644 --- a/spec/frontend/pipelines/graph/stage_column_component_spec.js +++ b/spec/frontend/pipelines/graph/stage_column_component_spec.js @@ -54,10 +54,6 @@ describe('stage column component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when mounted', () => { beforeEach(() => { createComponent({ method: mount }); diff --git a/spec/frontend/pipelines/graph_shared/links_inner_spec.js b/spec/frontend/pipelines/graph_shared/links_inner_spec.js index 2c6d126e12c..50f754393fe 100644 --- a/spec/frontend/pipelines/graph_shared/links_inner_spec.js +++ b/spec/frontend/pipelines/graph_shared/links_inner_spec.js @@ -81,7 +81,6 @@ describe('Links Inner component', () => { afterEach(() => { jest.restoreAllMocks(); - wrapper.destroy(); resetHTMLFixture(); }); diff --git a/spec/frontend/pipelines/graph_shared/links_layer_spec.js b/spec/frontend/pipelines/graph_shared/links_layer_spec.js index e2699d6ff2e..9d39c86ed5e 100644 --- a/spec/frontend/pipelines/graph_shared/links_layer_spec.js +++ b/spec/frontend/pipelines/graph_shared/links_layer_spec.js @@ -35,10 +35,6 @@ describe('links layer component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('with show links off', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/pipelines/header_component_spec.js b/spec/frontend/pipelines/header_component_spec.js index e583c0798f5..a4d7d0e30f8 100644 --- a/spec/frontend/pipelines/header_component_spec.js +++ b/spec/frontend/pipelines/header_component_spec.js @@ -71,11 +71,6 @@ describe('Pipeline details header', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('initial loading', () => { beforeEach(() => { wrapper = createComponent(null, { isLoading: true }); diff --git a/spec/frontend/pipelines/nav_controls_spec.js b/spec/frontend/pipelines/nav_controls_spec.js index 2c4740df174..f789df74f92 100644 --- a/spec/frontend/pipelines/nav_controls_spec.js +++ b/spec/frontend/pipelines/nav_controls_spec.js @@ -15,10 +15,6 @@ describe('Pipelines Nav Controls', () => { const findRunPipeline = () => wrapper.find('.js-run-pipeline'); - afterEach(() => { - wrapper.destroy(); - }); - it('should render link to create a new pipeline', () => { const mockData = { newPipelinePath: 'foo', diff --git a/spec/frontend/pipelines/pipeline_graph/pipeline_graph_spec.js b/spec/frontend/pipelines/pipeline_graph/pipeline_graph_spec.js index df10742fd93..123f2e011c3 100644 --- a/spec/frontend/pipelines/pipeline_graph/pipeline_graph_spec.js +++ b/spec/frontend/pipelines/pipeline_graph/pipeline_graph_spec.js @@ -39,10 +39,6 @@ describe('pipeline graph component', () => { const findLinksLayer = () => wrapper.findComponent(LinksLayer); const findPipelineGraph = () => wrapper.find('[data-testid="graph-container"]'); - afterEach(() => { - wrapper.destroy(); - }); - describe('with `VALID` status', () => { beforeEach(() => { wrapper = createComponent({ diff --git a/spec/frontend/pipelines/pipeline_labels_spec.js b/spec/frontend/pipelines/pipeline_labels_spec.js index ca0229b1cbe..6a37e36352b 100644 --- a/spec/frontend/pipelines/pipeline_labels_spec.js +++ b/spec/frontend/pipelines/pipeline_labels_spec.js @@ -30,10 +30,6 @@ describe('Pipeline label component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('should not render tags when flags are not set', () => { createComponent(); diff --git a/spec/frontend/pipelines/pipeline_multi_actions_spec.js b/spec/frontend/pipelines/pipeline_multi_actions_spec.js index bedde71c48d..e3c9983aa52 100644 --- a/spec/frontend/pipelines/pipeline_multi_actions_spec.js +++ b/spec/frontend/pipelines/pipeline_multi_actions_spec.js @@ -67,8 +67,6 @@ describe('Pipeline Multi Actions Dropdown', () => { afterEach(() => { mockAxios.restore(); - - wrapper.destroy(); }); it('should render the dropdown', () => { diff --git a/spec/frontend/pipelines/pipeline_triggerer_spec.js b/spec/frontend/pipelines/pipeline_triggerer_spec.js index 671f193dcf0..856c0484075 100644 --- a/spec/frontend/pipelines/pipeline_triggerer_spec.js +++ b/spec/frontend/pipelines/pipeline_triggerer_spec.js @@ -27,10 +27,6 @@ describe('Pipelines Triggerer', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findAvatarLink = () => wrapper.findComponent(GlAvatarLink); const findAvatar = () => wrapper.findComponent(GlAvatar); const findTriggerer = () => wrapper.findByText('API'); diff --git a/spec/frontend/pipelines/pipeline_url_spec.js b/spec/frontend/pipelines/pipeline_url_spec.js index c62898f0c83..f00ee4a6367 100644 --- a/spec/frontend/pipelines/pipeline_url_spec.js +++ b/spec/frontend/pipelines/pipeline_url_spec.js @@ -35,10 +35,6 @@ describe('Pipeline Url Component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('should render pipeline url table cell', () => { createComponent(); diff --git a/spec/frontend/pipelines/pipelines_actions_spec.js b/spec/frontend/pipelines/pipelines_actions_spec.js index 3b2a7c0a76d..2db9f5c2a83 100644 --- a/spec/frontend/pipelines/pipelines_actions_spec.js +++ b/spec/frontend/pipelines/pipelines_actions_spec.js @@ -37,9 +37,6 @@ describe('Pipelines Actions dropdown', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; - mock.restore(); confirmAction.mockReset(); }); diff --git a/spec/frontend/pipelines/pipelines_artifacts_spec.js b/spec/frontend/pipelines/pipelines_artifacts_spec.js index e3e54716a7b..9fedbaf9b56 100644 --- a/spec/frontend/pipelines/pipelines_artifacts_spec.js +++ b/spec/frontend/pipelines/pipelines_artifacts_spec.js @@ -34,11 +34,6 @@ describe('Pipelines Artifacts dropdown', () => { const findAllGlDropdownItems = () => wrapper.findComponent(GlDropdown).findAllComponents(GlDropdownItem); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('should render a dropdown with all the provided artifacts', () => { createComponent(); diff --git a/spec/frontend/pipelines/pipelines_spec.js b/spec/frontend/pipelines/pipelines_spec.js index 67478f9307f..48539d84024 100644 --- a/spec/frontend/pipelines/pipelines_spec.js +++ b/spec/frontend/pipelines/pipelines_spec.js @@ -114,7 +114,6 @@ describe('Pipelines', () => { }); afterEach(() => { - wrapper.destroy(); mock.reset(); window.history.pushState.mockReset(); }); diff --git a/spec/frontend/pipelines/pipelines_table_spec.js b/spec/frontend/pipelines/pipelines_table_spec.js index 6ec8901038b..8d2a52eb6d0 100644 --- a/spec/frontend/pipelines/pipelines_table_spec.js +++ b/spec/frontend/pipelines/pipelines_table_spec.js @@ -69,12 +69,6 @@ describe('Pipelines Table', () => { pipeline = createMockPipeline(); }); - afterEach(() => { - wrapper.destroy(); - - wrapper = null; - }); - describe('Pipelines Table', () => { beforeEach(() => { createComponent({ pipelines: [pipeline], viewType: 'root' }); diff --git a/spec/frontend/pipelines/test_reports/test_case_details_spec.js b/spec/frontend/pipelines/test_reports/test_case_details_spec.js index f194864447c..f8663408817 100644 --- a/spec/frontend/pipelines/test_reports/test_case_details_spec.js +++ b/spec/frontend/pipelines/test_reports/test_case_details_spec.js @@ -45,11 +45,6 @@ describe('Test case details', () => { ); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('required details', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/pipelines/test_reports/test_reports_spec.js b/spec/frontend/pipelines/test_reports/test_reports_spec.js index 9b9ee4172f9..c8c917a1b9e 100644 --- a/spec/frontend/pipelines/test_reports/test_reports_spec.js +++ b/spec/frontend/pipelines/test_reports/test_reports_spec.js @@ -60,10 +60,6 @@ describe('Test reports app', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when component is created', () => { it('should call fetchSummary when pipeline has test report', () => { createComponent(); diff --git a/spec/frontend/pipelines/test_reports/test_suite_table_spec.js b/spec/frontend/pipelines/test_reports/test_suite_table_spec.js index da13df833e7..8eb83f17f4d 100644 --- a/spec/frontend/pipelines/test_reports/test_suite_table_spec.js +++ b/spec/frontend/pipelines/test_reports/test_suite_table_spec.js @@ -65,10 +65,6 @@ describe('Test reports suite table', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('should render a message when there are no test cases', () => { createComponent({ suite: [] }); diff --git a/spec/frontend/pipelines/time_ago_spec.js b/spec/frontend/pipelines/time_ago_spec.js index f0da0df2ba6..efb1bf09d20 100644 --- a/spec/frontend/pipelines/time_ago_spec.js +++ b/spec/frontend/pipelines/time_ago_spec.js @@ -30,11 +30,6 @@ describe('Timeago component', () => { ); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const duration = () => wrapper.find('.duration'); const finishedAt = () => wrapper.find('.finished-at'); const findInProgress = () => wrapper.findByTestId('pipeline-in-progress'); diff --git a/spec/frontend/pipelines/tokens/pipeline_branch_name_token_spec.js b/spec/frontend/pipelines/tokens/pipeline_branch_name_token_spec.js index caa66502e11..d518519a424 100644 --- a/spec/frontend/pipelines/tokens/pipeline_branch_name_token_spec.js +++ b/spec/frontend/pipelines/tokens/pipeline_branch_name_token_spec.js @@ -71,11 +71,6 @@ describe('Pipeline Branch Name Token', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('passes config correctly', () => { expect(findFilteredSearchToken().props('config')).toEqual(defaultProps.config); }); diff --git a/spec/frontend/pipelines/tokens/pipeline_status_token_spec.js b/spec/frontend/pipelines/tokens/pipeline_status_token_spec.js index c090fd353f7..cf4ccb5ce43 100644 --- a/spec/frontend/pipelines/tokens/pipeline_status_token_spec.js +++ b/spec/frontend/pipelines/tokens/pipeline_status_token_spec.js @@ -45,11 +45,6 @@ describe('Pipeline Status Token', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('passes config correctly', () => { expect(findFilteredSearchToken().props('config')).toEqual(defaultProps.config); }); diff --git a/spec/frontend/pipelines/tokens/pipeline_tag_name_token_spec.js b/spec/frontend/pipelines/tokens/pipeline_tag_name_token_spec.js index 7311a5d2f5a..88c88d8f16f 100644 --- a/spec/frontend/pipelines/tokens/pipeline_tag_name_token_spec.js +++ b/spec/frontend/pipelines/tokens/pipeline_tag_name_token_spec.js @@ -53,11 +53,6 @@ describe('Pipeline Branch Name Token', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('passes config correctly', () => { expect(findFilteredSearchToken().props('config')).toEqual(defaultProps.config); }); diff --git a/spec/frontend/pipelines/tokens/pipeline_trigger_author_token_spec.js b/spec/frontend/pipelines/tokens/pipeline_trigger_author_token_spec.js index c763bfe1b27..e9ec684a350 100644 --- a/spec/frontend/pipelines/tokens/pipeline_trigger_author_token_spec.js +++ b/spec/frontend/pipelines/tokens/pipeline_trigger_author_token_spec.js @@ -52,11 +52,6 @@ describe('Pipeline Trigger Author Token', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('passes config correctly', () => { expect(findFilteredSearchToken().props('config')).toEqual(defaultProps.config); }); diff --git a/spec/frontend/popovers/components/popovers_spec.js b/spec/frontend/popovers/components/popovers_spec.js index 1299e7277d1..7f247fbbd4f 100644 --- a/spec/frontend/popovers/components/popovers_spec.js +++ b/spec/frontend/popovers/components/popovers_spec.js @@ -33,11 +33,6 @@ describe('popovers/components/popovers.vue', () => { const allPopovers = () => wrapper.findAllComponents(GlPopover); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('addPopovers', () => { it('attaches popovers to the targets specified', async () => { const target = createPopoverTarget(); diff --git a/spec/frontend/profile/account/components/delete_account_modal_spec.js b/spec/frontend/profile/account/components/delete_account_modal_spec.js index e4a316e1ee7..9a8f82f0028 100644 --- a/spec/frontend/profile/account/components/delete_account_modal_spec.js +++ b/spec/frontend/profile/account/components/delete_account_modal_spec.js @@ -40,12 +40,6 @@ describe('DeleteAccountModal component', () => { vm = wrapper.vm; }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - vm = null; - }); - const findElements = () => { const confirmation = vm.confirmWithPassword ? 'password' : 'username'; return { diff --git a/spec/frontend/profile/account/components/update_username_spec.js b/spec/frontend/profile/account/components/update_username_spec.js index 6b325d70561..d922820601e 100644 --- a/spec/frontend/profile/account/components/update_username_spec.js +++ b/spec/frontend/profile/account/components/update_username_spec.js @@ -42,7 +42,6 @@ describe('UpdateUsername component', () => { }); afterEach(() => { - wrapper.destroy(); axiosMock.restore(); Vue.config.errorHandler = null; }); diff --git a/spec/frontend/profile/preferences/components/diffs_colors_preview_spec.js b/spec/frontend/profile/preferences/components/diffs_colors_preview_spec.js index e60602ab336..e69bfad765a 100644 --- a/spec/frontend/profile/preferences/components/diffs_colors_preview_spec.js +++ b/spec/frontend/profile/preferences/components/diffs_colors_preview_spec.js @@ -12,11 +12,6 @@ describe('DiffsColorsPreview component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders diff colors preview', () => { expect(wrapper.element).toMatchSnapshot(); }); diff --git a/spec/frontend/profile/preferences/components/diffs_colors_spec.js b/spec/frontend/profile/preferences/components/diffs_colors_spec.js index 02f501a0b06..e80851d0629 100644 --- a/spec/frontend/profile/preferences/components/diffs_colors_spec.js +++ b/spec/frontend/profile/preferences/components/diffs_colors_spec.js @@ -29,11 +29,6 @@ describe('DiffsColors component', () => { }); } - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('mounts', () => { createComponent(); diff --git a/spec/frontend/profile/preferences/components/integration_view_spec.js b/spec/frontend/profile/preferences/components/integration_view_spec.js index f650bee7fda..b809f2f4aed 100644 --- a/spec/frontend/profile/preferences/components/integration_view_spec.js +++ b/spec/frontend/profile/preferences/components/integration_view_spec.js @@ -38,11 +38,6 @@ describe('IntegrationView component', () => { const findHiddenField = () => wrapper.findByTestId('profile-preferences-integration-hidden-field'); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('should render the form group legend correctly', () => { wrapper = createComponent(); diff --git a/spec/frontend/profile/preferences/components/profile_preferences_spec.js b/spec/frontend/profile/preferences/components/profile_preferences_spec.js index 808e2cf41c9..21167dccda9 100644 --- a/spec/frontend/profile/preferences/components/profile_preferences_spec.js +++ b/spec/frontend/profile/preferences/components/profile_preferences_spec.js @@ -83,11 +83,6 @@ describe('ProfilePreferences component', () => { document.body.classList.add('content-wrapper'); } - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('should not render Integrations section', () => { wrapper = createComponent(); const views = wrapper.findAllComponents(IntegrationView); diff --git a/spec/frontend/projects/clusters_deprecation_slert/components/clusters_deprecation_alert_spec.js b/spec/frontend/projects/clusters_deprecation_slert/components/clusters_deprecation_alert_spec.js index d230b96ad82..68ea3a4dc4d 100644 --- a/spec/frontend/projects/clusters_deprecation_slert/components/clusters_deprecation_alert_spec.js +++ b/spec/frontend/projects/clusters_deprecation_slert/components/clusters_deprecation_alert_spec.js @@ -26,10 +26,6 @@ describe('ClustersDeprecationAlert', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { it('should render a non-dismissible warning alert', () => { expect(findAlert().props()).toMatchObject({ diff --git a/spec/frontend/projects/commit/components/branches_dropdown_spec.js b/spec/frontend/projects/commit/components/branches_dropdown_spec.js index f034c7b800f..0e68bd21cd4 100644 --- a/spec/frontend/projects/commit/components/branches_dropdown_spec.js +++ b/spec/frontend/projects/commit/components/branches_dropdown_spec.js @@ -41,8 +41,6 @@ describe('BranchesDropdown', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; spyFetchBranches.mockReset(); }); diff --git a/spec/frontend/projects/commit/components/form_modal_spec.js b/spec/frontend/projects/commit/components/form_modal_spec.js index 691be6f2d51..84cb30953c3 100644 --- a/spec/frontend/projects/commit/components/form_modal_spec.js +++ b/spec/frontend/projects/commit/components/form_modal_spec.js @@ -55,7 +55,6 @@ describe('CommitFormModal', () => { }); afterEach(() => { - wrapper.destroy(); axiosMock.restore(); }); diff --git a/spec/frontend/projects/commit/components/projects_dropdown_spec.js b/spec/frontend/projects/commit/components/projects_dropdown_spec.js index f14ec258e4b..baf2ea2656f 100644 --- a/spec/frontend/projects/commit/components/projects_dropdown_spec.js +++ b/spec/frontend/projects/commit/components/projects_dropdown_spec.js @@ -38,7 +38,6 @@ describe('ProjectsDropdown', () => { const findDropdown = () => wrapper.findComponent(GlCollapsibleListbox); afterEach(() => { - wrapper.destroy(); spyFetchProjects.mockReset(); }); diff --git a/spec/frontend/projects/commits/components/author_select_spec.js b/spec/frontend/projects/commits/components/author_select_spec.js index 907e0e226b6..ff1d860fd53 100644 --- a/spec/frontend/projects/commits/components/author_select_spec.js +++ b/spec/frontend/projects/commits/components/author_select_spec.js @@ -54,7 +54,6 @@ describe('Author Select', () => { }); afterEach(() => { - wrapper.destroy(); resetHTMLFixture(); }); diff --git a/spec/frontend/projects/compare/components/app_spec.js b/spec/frontend/projects/compare/components/app_spec.js index 9b052a17caa..ee96f46ea0c 100644 --- a/spec/frontend/projects/compare/components/app_spec.js +++ b/spec/frontend/projects/compare/components/app_spec.js @@ -21,11 +21,6 @@ describe('CompareApp component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - beforeEach(() => { createComponent(); }); diff --git a/spec/frontend/projects/compare/components/repo_dropdown_spec.js b/spec/frontend/projects/compare/components/repo_dropdown_spec.js index 21cca857c6a..0b1085470b8 100644 --- a/spec/frontend/projects/compare/components/repo_dropdown_spec.js +++ b/spec/frontend/projects/compare/components/repo_dropdown_spec.js @@ -16,11 +16,6 @@ describe('RepoDropdown component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findGlDropdown = () => wrapper.findComponent(GlDropdown); const findHiddenInput = () => wrapper.find('input[type="hidden"]'); diff --git a/spec/frontend/projects/compare/components/revision_card_spec.js b/spec/frontend/projects/compare/components/revision_card_spec.js index b23bd91ceda..3c9c61c8903 100644 --- a/spec/frontend/projects/compare/components/revision_card_spec.js +++ b/spec/frontend/projects/compare/components/revision_card_spec.js @@ -16,11 +16,6 @@ describe('RepoDropdown component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - beforeEach(() => { createComponent(); }); diff --git a/spec/frontend/projects/compare/components/revision_dropdown_legacy_spec.js b/spec/frontend/projects/compare/components/revision_dropdown_legacy_spec.js index 892e43afd94..645d0483a5f 100644 --- a/spec/frontend/projects/compare/components/revision_dropdown_legacy_spec.js +++ b/spec/frontend/projects/compare/components/revision_dropdown_legacy_spec.js @@ -35,7 +35,6 @@ describe('RevisionDropdown component', () => { }); afterEach(() => { - wrapper.destroy(); axiosMock.restore(); }); diff --git a/spec/frontend/projects/compare/components/revision_dropdown_spec.js b/spec/frontend/projects/compare/components/revision_dropdown_spec.js index 455cd84afd4..3a256682549 100644 --- a/spec/frontend/projects/compare/components/revision_dropdown_spec.js +++ b/spec/frontend/projects/compare/components/revision_dropdown_spec.js @@ -33,7 +33,6 @@ describe('RevisionDropdown component', () => { }); afterEach(() => { - wrapper.destroy(); axiosMock.restore(); }); diff --git a/spec/frontend/projects/components/project_delete_button_spec.js b/spec/frontend/projects/components/project_delete_button_spec.js index 49e3218e5bc..bae76e7eeb6 100644 --- a/spec/frontend/projects/components/project_delete_button_spec.js +++ b/spec/frontend/projects/components/project_delete_button_spec.js @@ -33,11 +33,6 @@ describe('Project remove modal', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('initialized', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/projects/components/shared/delete_button_spec.js b/spec/frontend/projects/components/shared/delete_button_spec.js index 097b18025a3..364a29d0e41 100644 --- a/spec/frontend/projects/components/shared/delete_button_spec.js +++ b/spec/frontend/projects/components/shared/delete_button_spec.js @@ -45,11 +45,6 @@ describe('Project remove modal', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('intialized', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/projects/details/upload_button_spec.js b/spec/frontend/projects/details/upload_button_spec.js index 50638755260..e9b11ce544a 100644 --- a/spec/frontend/projects/details/upload_button_spec.js +++ b/spec/frontend/projects/details/upload_button_spec.js @@ -27,10 +27,6 @@ describe('UploadButton', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('displays an upload button', () => { expect(wrapper.findComponent(GlButton).exists()).toBe(true); }); diff --git a/spec/frontend/projects/new/components/app_spec.js b/spec/frontend/projects/new/components/app_spec.js index 42ef7837fa6..5b2dc25077e 100644 --- a/spec/frontend/projects/new/components/app_spec.js +++ b/spec/frontend/projects/new/components/app_spec.js @@ -13,10 +13,6 @@ describe('Experimental new project creation app', () => { const findNewNamespacePage = () => wrapper.findComponent(NewNamespacePage); - afterEach(() => { - wrapper.destroy(); - }); - it('passes custom new project guideline text to underlying component', () => { const DEMO_GUIDELINES = 'Demo guidelines'; const guidelineSelector = '#new-project-guideline'; diff --git a/spec/frontend/projects/new/components/deployment_target_select_spec.js b/spec/frontend/projects/new/components/deployment_target_select_spec.js index f3b22d4a1b9..bec738f7765 100644 --- a/spec/frontend/projects/new/components/deployment_target_select_spec.js +++ b/spec/frontend/projects/new/components/deployment_target_select_spec.js @@ -47,7 +47,6 @@ describe('Deployment target select', () => { }); afterEach(() => { - wrapper.destroy(); resetHTMLFixture(); }); diff --git a/spec/frontend/projects/new/components/new_project_push_tip_popover_spec.js b/spec/frontend/projects/new/components/new_project_push_tip_popover_spec.js index 16b4493c622..1a43dcb682b 100644 --- a/spec/frontend/projects/new/components/new_project_push_tip_popover_spec.js +++ b/spec/frontend/projects/new/components/new_project_push_tip_popover_spec.js @@ -37,7 +37,6 @@ describe('New project push tip popover', () => { }); afterEach(() => { - wrapper.destroy(); resetHTMLFixture(); }); diff --git a/spec/frontend/projects/new/components/new_project_url_select_spec.js b/spec/frontend/projects/new/components/new_project_url_select_spec.js index 0970b51745a..fa720f4487c 100644 --- a/spec/frontend/projects/new/components/new_project_url_select_spec.js +++ b/spec/frontend/projects/new/components/new_project_url_select_spec.js @@ -118,10 +118,6 @@ describe('NewProjectUrlSelect component', () => { await waitForPromises(); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders the root url as a label', () => { wrapper = mountComponent(); diff --git a/spec/frontend/projects/pipelines/charts/components/app_spec.js b/spec/frontend/projects/pipelines/charts/components/app_spec.js index d8876349c5e..94f421239da 100644 --- a/spec/frontend/projects/pipelines/charts/components/app_spec.js +++ b/spec/frontend/projects/pipelines/charts/components/app_spec.js @@ -49,10 +49,6 @@ describe('ProjectsPipelinesChartsApp', () => { ); } - afterEach(() => { - wrapper.destroy(); - }); - const findGlTabs = () => wrapper.findComponent(GlTabs); const findAllGlTabs = () => wrapper.findAllComponents(GlTab); const findGlTabAtIndex = (index) => findAllGlTabs().at(index); diff --git a/spec/frontend/projects/pipelines/charts/components/ci_cd_analytics_area_chart_spec.js b/spec/frontend/projects/pipelines/charts/components/ci_cd_analytics_area_chart_spec.js index 2b523467379..5fc121b5c9f 100644 --- a/spec/frontend/projects/pipelines/charts/components/ci_cd_analytics_area_chart_spec.js +++ b/spec/frontend/projects/pipelines/charts/components/ci_cd_analytics_area_chart_spec.js @@ -28,11 +28,6 @@ describe('CiCdAnalyticsAreaChart', () => { }); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('matches the snapshot', () => { expect(wrapper.element).toMatchSnapshot(); }); diff --git a/spec/frontend/projects/pipelines/charts/components/pipeline_charts_spec.js b/spec/frontend/projects/pipelines/charts/components/pipeline_charts_spec.js index 8fb59f38ee1..ab2a12219e5 100644 --- a/spec/frontend/projects/pipelines/charts/components/pipeline_charts_spec.js +++ b/spec/frontend/projects/pipelines/charts/components/pipeline_charts_spec.js @@ -37,11 +37,6 @@ describe('~/projects/pipelines/charts/components/pipeline_charts.vue', () => { await waitForPromises(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('overall statistics', () => { it('displays the statistics list', () => { const list = wrapper.findComponent(StatisticsList); diff --git a/spec/frontend/projects/pipelines/charts/components/statistics_list_spec.js b/spec/frontend/projects/pipelines/charts/components/statistics_list_spec.js index 57a864cb2c4..24dbc628ce6 100644 --- a/spec/frontend/projects/pipelines/charts/components/statistics_list_spec.js +++ b/spec/frontend/projects/pipelines/charts/components/statistics_list_spec.js @@ -21,10 +21,6 @@ describe('StatisticsList', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('displays the counts data with labels', () => { expect(wrapper.element).toMatchSnapshot(); }); diff --git a/spec/frontend/projects/prune_unreachable_objects_button_spec.js b/spec/frontend/projects/prune_unreachable_objects_button_spec.js index 0471e213fba..012b19ea3d3 100644 --- a/spec/frontend/projects/prune_unreachable_objects_button_spec.js +++ b/spec/frontend/projects/prune_unreachable_objects_button_spec.js @@ -27,11 +27,6 @@ describe('Project remove modal', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('intialized', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/projects/settings/branch_rules/components/edit/branch_dropdown_spec.js b/spec/frontend/projects/settings/branch_rules/components/edit/branch_dropdown_spec.js index 12b92db9427..6d3317a5f78 100644 --- a/spec/frontend/projects/settings/branch_rules/components/edit/branch_dropdown_spec.js +++ b/spec/frontend/projects/settings/branch_rules/components/edit/branch_dropdown_spec.js @@ -46,10 +46,6 @@ describe('Branch dropdown', () => { beforeEach(() => createComponent()); - afterEach(() => { - wrapper.destroy(); - }); - it('renders a GlDropdown component with the correct props', () => { expect(findGlDropdown().props()).toMatchObject({ text: value }); }); diff --git a/spec/frontend/projects/settings/branch_rules/components/edit/index_spec.js b/spec/frontend/projects/settings/branch_rules/components/edit/index_spec.js index 21e63fdb24d..e9982872e03 100644 --- a/spec/frontend/projects/settings/branch_rules/components/edit/index_spec.js +++ b/spec/frontend/projects/settings/branch_rules/components/edit/index_spec.js @@ -24,10 +24,6 @@ describe('Edit branch rule', () => { beforeEach(() => createComponent()); - afterEach(() => { - wrapper.destroy(); - }); - it('gets the branch param from url', () => { expect(getParameterByName).toHaveBeenCalledWith('branch'); }); diff --git a/spec/frontend/projects/settings/branch_rules/components/edit/protections/index_spec.js b/spec/frontend/projects/settings/branch_rules/components/edit/protections/index_spec.js index ee90ff8318f..14edaf31a1f 100644 --- a/spec/frontend/projects/settings/branch_rules/components/edit/protections/index_spec.js +++ b/spec/frontend/projects/settings/branch_rules/components/edit/protections/index_spec.js @@ -26,10 +26,6 @@ describe('Branch Protections', () => { beforeEach(() => createComponent()); - afterEach(() => { - wrapper.destroy(); - }); - it('renders a heading', () => { expect(findHeading().text()).toBe(i18n.protections); }); diff --git a/spec/frontend/projects/settings/branch_rules/components/edit/protections/merge_protections_spec.js b/spec/frontend/projects/settings/branch_rules/components/edit/protections/merge_protections_spec.js index b5fdc46d600..ca561ef87ec 100644 --- a/spec/frontend/projects/settings/branch_rules/components/edit/protections/merge_protections_spec.js +++ b/spec/frontend/projects/settings/branch_rules/components/edit/protections/merge_protections_spec.js @@ -24,10 +24,6 @@ describe('Merge Protections', () => { beforeEach(() => createComponent()); - afterEach(() => { - wrapper.destroy(); - }); - it('renders a form group with the correct label', () => { expect(findFormGroup().text()).toContain(i18n.allowedToMerge); }); diff --git a/spec/frontend/projects/settings/branch_rules/components/edit/protections/push_protections_spec.js b/spec/frontend/projects/settings/branch_rules/components/edit/protections/push_protections_spec.js index 60bb7a51dcb..82998640f17 100644 --- a/spec/frontend/projects/settings/branch_rules/components/edit/protections/push_protections_spec.js +++ b/spec/frontend/projects/settings/branch_rules/components/edit/protections/push_protections_spec.js @@ -24,10 +24,6 @@ describe('Push Protections', () => { beforeEach(() => createComponent()); - afterEach(() => { - wrapper.destroy(); - }); - it('renders a form group with the correct label', () => { expect(findFormGroup().attributes('label')).toBe(i18n.allowedToPush); }); diff --git a/spec/frontend/projects/settings/branch_rules/components/view/index_spec.js b/spec/frontend/projects/settings/branch_rules/components/view/index_spec.js index 005a019ddaa..579fe7d3b67 100644 --- a/spec/frontend/projects/settings/branch_rules/components/view/index_spec.js +++ b/spec/frontend/projects/settings/branch_rules/components/view/index_spec.js @@ -62,8 +62,6 @@ describe('View branch rules', () => { beforeEach(() => createComponent()); - afterEach(() => wrapper.destroy()); - const findBranchName = () => wrapper.findByTestId('branch'); const findBranchTitle = () => wrapper.findByTestId('branch-title'); const findBranchProtectionTitle = () => wrapper.findByText(I18N.protectBranchTitle); diff --git a/spec/frontend/projects/settings/branch_rules/components/view/protection_row_spec.js b/spec/frontend/projects/settings/branch_rules/components/view/protection_row_spec.js index a98b156f94e..1bfd04e10a1 100644 --- a/spec/frontend/projects/settings/branch_rules/components/view/protection_row_spec.js +++ b/spec/frontend/projects/settings/branch_rules/components/view/protection_row_spec.js @@ -18,8 +18,6 @@ describe('Branch rule protection row', () => { beforeEach(() => createComponent()); - afterEach(() => wrapper.destroy()); - const findTitle = () => wrapper.findByText(protectionRowPropsMock.title); const findAvatarsInline = () => wrapper.findComponent(GlAvatarsInline); const findAvatarLinks = () => wrapper.findAllComponents(GlAvatarLink); diff --git a/spec/frontend/projects/settings/branch_rules/components/view/protection_spec.js b/spec/frontend/projects/settings/branch_rules/components/view/protection_spec.js index caf967b4257..f10d8d6d770 100644 --- a/spec/frontend/projects/settings/branch_rules/components/view/protection_spec.js +++ b/spec/frontend/projects/settings/branch_rules/components/view/protection_spec.js @@ -16,8 +16,6 @@ describe('Branch rule protection', () => { beforeEach(() => createComponent()); - afterEach(() => wrapper.destroy()); - const findCard = () => wrapper.findComponent(GlCard); const findHeader = () => wrapper.findByText(protectionPropsMock.header); const findLink = () => wrapper.findComponent(GlLink); diff --git a/spec/frontend/projects/settings/components/default_branch_selector_spec.js b/spec/frontend/projects/settings/components/default_branch_selector_spec.js index ca9a72663d2..c1412d01b53 100644 --- a/spec/frontend/projects/settings/components/default_branch_selector_spec.js +++ b/spec/frontend/projects/settings/components/default_branch_selector_spec.js @@ -19,10 +19,6 @@ describe('projects/settings/components/default_branch_selector', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - beforeEach(() => { buildWrapper(); }); diff --git a/spec/frontend/projects/settings/components/new_access_dropdown_spec.js b/spec/frontend/projects/settings/components/new_access_dropdown_spec.js index 26297d0c3ff..b4b6603888c 100644 --- a/spec/frontend/projects/settings/components/new_access_dropdown_spec.js +++ b/spec/frontend/projects/settings/components/new_access_dropdown_spec.js @@ -89,10 +89,6 @@ describe('Access Level Dropdown', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findDropdown = () => wrapper.findComponent(GlDropdown); const findDropdownToggleLabel = () => findDropdown().props('text'); const findAllDropdownItems = () => findDropdown().findAllComponents(GlDropdownItem); diff --git a/spec/frontend/projects/settings/components/shared_runners_toggle_spec.js b/spec/frontend/projects/settings/components/shared_runners_toggle_spec.js index e53b6b76534..0ec0e981d65 100644 --- a/spec/frontend/projects/settings/components/shared_runners_toggle_spec.js +++ b/spec/frontend/projects/settings/components/shared_runners_toggle_spec.js @@ -41,8 +41,6 @@ describe('projects/settings/components/shared_runners', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; mockAxios.restore(); }); diff --git a/spec/frontend/projects/settings/components/transfer_project_form_spec.js b/spec/frontend/projects/settings/components/transfer_project_form_spec.js index e091f3e25c3..d8c2cf83f38 100644 --- a/spec/frontend/projects/settings/components/transfer_project_form_spec.js +++ b/spec/frontend/projects/settings/components/transfer_project_form_spec.js @@ -31,10 +31,6 @@ describe('Transfer project form', () => { const findTransferLocations = () => wrapper.findComponent(TransferLocations); const findConfirmDanger = () => wrapper.findComponent(ConfirmDanger); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the namespace selector and passes `groupTransferLocationsApiMethod` prop', () => { createComponent(); diff --git a/spec/frontend/projects/settings/topics/components/topics_token_selector_spec.js b/spec/frontend/projects/settings/topics/components/topics_token_selector_spec.js index 8b8e7d1454d..4b94c179f74 100644 --- a/spec/frontend/projects/settings/topics/components/topics_token_selector_spec.js +++ b/spec/frontend/projects/settings/topics/components/topics_token_selector_spec.js @@ -64,7 +64,6 @@ describe('TopicsTokenSelector', () => { }); afterEach(() => { - wrapper.destroy(); div.remove(); input.remove(); }); diff --git a/spec/frontend/projects/settings_service_desk/components/service_desk_root_spec.js b/spec/frontend/projects/settings_service_desk/components/service_desk_root_spec.js index 5fc9f9ba629..4d0d2191176 100644 --- a/spec/frontend/projects/settings_service_desk/components/service_desk_root_spec.js +++ b/spec/frontend/projects/settings_service_desk/components/service_desk_root_spec.js @@ -41,7 +41,6 @@ describe('ServiceDeskRoot', () => { afterEach(() => { axiosMock.restore(); - wrapper.destroy(); if (spy) { spy.mockRestore(); } diff --git a/spec/frontend/projects/terraform_notification/terraform_notification_spec.js b/spec/frontend/projects/terraform_notification/terraform_notification_spec.js index 6576ce70d60..1d0faebbcb2 100644 --- a/spec/frontend/projects/terraform_notification/terraform_notification_spec.js +++ b/spec/frontend/projects/terraform_notification/terraform_notification_spec.js @@ -41,10 +41,6 @@ describe('TerraformNotificationBanner', () => { trackingSpy = mockTracking(undefined, wrapper.element, jest.spyOn); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('when user has already dismissed the banner', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/ref/components/ref_selector_spec.js b/spec/frontend/ref/components/ref_selector_spec.js index 4767ca48f0f..6b90827f9c2 100644 --- a/spec/frontend/ref/components/ref_selector_spec.js +++ b/spec/frontend/ref/components/ref_selector_spec.js @@ -4,9 +4,9 @@ import axios from 'axios'; import MockAdapter from 'axios-mock-adapter'; import { merge, last } from 'lodash'; import Vuex from 'vuex'; +import tags from 'test_fixtures/api/tags/tags.json'; import commit from 'test_fixtures/api/commits/commit.json'; import branches from 'test_fixtures/api/branches/branches.json'; -import tags from 'test_fixtures/api/tags/tags.json'; import { mountExtended } from 'helpers/vue_test_utils_helper'; import { trimText } from 'helpers/text_helper'; import { diff --git a/spec/frontend/releases/components/app_show_spec.js b/spec/frontend/releases/components/app_show_spec.js index d8e9ff8c59d..942280cb6a2 100644 --- a/spec/frontend/releases/components/app_show_spec.js +++ b/spec/frontend/releases/components/app_show_spec.js @@ -33,11 +33,6 @@ describe('Release show component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findLoadingSkeleton = () => wrapper.findComponent(ReleaseSkeletonLoader); const findReleaseBlock = () => wrapper.findComponent(ReleaseBlock); diff --git a/spec/frontend/releases/components/asset_links_form_spec.js b/spec/frontend/releases/components/asset_links_form_spec.js index b1e9d8d1256..8eee9acd808 100644 --- a/spec/frontend/releases/components/asset_links_form_spec.js +++ b/spec/frontend/releases/components/asset_links_form_spec.js @@ -60,11 +60,6 @@ describe('Release edit component', () => { release = commonUtils.convertObjectPropsToCamelCase(originalRelease, { deep: true }); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('with a basic store state', () => { beforeEach(() => { factory(); diff --git a/spec/frontend/releases/components/confirm_delete_modal_spec.js b/spec/frontend/releases/components/confirm_delete_modal_spec.js index f7c526c1ced..b4699302779 100644 --- a/spec/frontend/releases/components/confirm_delete_modal_spec.js +++ b/spec/frontend/releases/components/confirm_delete_modal_spec.js @@ -42,10 +42,6 @@ describe('~/releases/components/confirm_delete_modal.vue', () => { factory(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('button', () => { it('should open the modal on click', async () => { await wrapper.findByRole('button', { name: 'Delete' }).trigger('click'); diff --git a/spec/frontend/releases/components/evidence_block_spec.js b/spec/frontend/releases/components/evidence_block_spec.js index 69443cb7a11..42eac31e5ac 100644 --- a/spec/frontend/releases/components/evidence_block_spec.js +++ b/spec/frontend/releases/components/evidence_block_spec.js @@ -27,10 +27,6 @@ describe('Evidence Block', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the evidence icon', () => { expect(wrapper.findComponent(GlIcon).props('name')).toBe('review-list'); }); diff --git a/spec/frontend/releases/components/issuable_stats_spec.js b/spec/frontend/releases/components/issuable_stats_spec.js index 3ac75e138ee..c8cdf9cb951 100644 --- a/spec/frontend/releases/components/issuable_stats_spec.js +++ b/spec/frontend/releases/components/issuable_stats_spec.js @@ -34,11 +34,6 @@ describe('~/releases/components/issuable_stats.vue', () => { }; }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('matches snapshot', () => { createComponent(); diff --git a/spec/frontend/releases/components/release_block_footer_spec.js b/spec/frontend/releases/components/release_block_footer_spec.js index 19b41d05a44..12e3807c9fa 100644 --- a/spec/frontend/releases/components/release_block_footer_spec.js +++ b/spec/frontend/releases/components/release_block_footer_spec.js @@ -33,11 +33,6 @@ describe('Release block footer', () => { release = cloneDeep(originalRelease); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const commitInfoSection = () => wrapper.find('.js-commit-info'); const commitInfoSectionLink = () => commitInfoSection().findComponent(GlLink); const tagInfoSection = () => wrapper.find('.js-tag-info'); diff --git a/spec/frontend/releases/components/release_block_header_spec.js b/spec/frontend/releases/components/release_block_header_spec.js index fc421776d60..dd39a1bce53 100644 --- a/spec/frontend/releases/components/release_block_header_spec.js +++ b/spec/frontend/releases/components/release_block_header_spec.js @@ -25,10 +25,6 @@ describe('Release block header', () => { release = convertObjectPropsToCamelCase(originalRelease, { deep: true }); }); - afterEach(() => { - wrapper.destroy(); - }); - const findHeader = () => wrapper.find('h2'); const findHeaderLink = () => findHeader().findComponent(GlLink); const findEditButton = () => wrapper.find('.js-edit-button'); diff --git a/spec/frontend/releases/components/release_block_milestone_info_spec.js b/spec/frontend/releases/components/release_block_milestone_info_spec.js index 541d487091c..b8030ae1fd2 100644 --- a/spec/frontend/releases/components/release_block_milestone_info_spec.js +++ b/spec/frontend/releases/components/release_block_milestone_info_spec.js @@ -25,11 +25,6 @@ describe('Release block milestone info', () => { milestones = convertObjectPropsToCamelCase(originalMilestones, { deep: true }); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const milestoneProgressBarContainer = () => wrapper.find('.js-milestone-progress-bar-container'); const milestoneListContainer = () => wrapper.find('.js-milestone-list-container'); const issuesContainer = () => wrapper.find('[data-testid="issue-stats"]'); diff --git a/spec/frontend/releases/components/release_block_spec.js b/spec/frontend/releases/components/release_block_spec.js index f1b8554fbc3..3355b5ab2c3 100644 --- a/spec/frontend/releases/components/release_block_spec.js +++ b/spec/frontend/releases/components/release_block_spec.js @@ -39,10 +39,6 @@ describe('Release block', () => { release = convertOneReleaseGraphQLResponse(originalOneReleaseQueryResponse).data; }); - afterEach(() => { - wrapper.destroy(); - }); - describe('with default props', () => { beforeEach(() => factory(release)); diff --git a/spec/frontend/releases/components/releases_pagination_spec.js b/spec/frontend/releases/components/releases_pagination_spec.js index 59be808c802..923d84ae2b3 100644 --- a/spec/frontend/releases/components/releases_pagination_spec.js +++ b/spec/frontend/releases/components/releases_pagination_spec.js @@ -29,10 +29,6 @@ describe('releases_pagination.vue', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const singlePageInfo = { hasPreviousPage: false, hasNextPage: false, diff --git a/spec/frontend/releases/components/releases_sort_spec.js b/spec/frontend/releases/components/releases_sort_spec.js index c6e1846d252..92199896ab4 100644 --- a/spec/frontend/releases/components/releases_sort_spec.js +++ b/spec/frontend/releases/components/releases_sort_spec.js @@ -17,10 +17,6 @@ describe('releases_sort.vue', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findSorting = () => wrapper.findComponent(GlSorting); const findSortingItems = () => wrapper.findAllComponents(GlSortingItem); const findReleasedDateItem = () => diff --git a/spec/frontend/releases/components/tag_field_exsting_spec.js b/spec/frontend/releases/components/tag_field_exsting_spec.js index 8105aa4f6f2..0e896eb645c 100644 --- a/spec/frontend/releases/components/tag_field_exsting_spec.js +++ b/spec/frontend/releases/components/tag_field_exsting_spec.js @@ -37,11 +37,6 @@ describe('releases/components/tag_field_existing', () => { }; }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('default', () => { it('shows the tag name', () => { createComponent(); diff --git a/spec/frontend/releases/components/tag_field_new_spec.js b/spec/frontend/releases/components/tag_field_new_spec.js index 58c01ca0348..2508495429c 100644 --- a/spec/frontend/releases/components/tag_field_new_spec.js +++ b/spec/frontend/releases/components/tag_field_new_spec.js @@ -82,7 +82,6 @@ describe('releases/components/tag_field_new', () => { }); afterEach(() => { - wrapper.destroy(); mock.restore(); }); diff --git a/spec/frontend/releases/components/tag_field_spec.js b/spec/frontend/releases/components/tag_field_spec.js index 85a40f02c53..8509c347291 100644 --- a/spec/frontend/releases/components/tag_field_spec.js +++ b/spec/frontend/releases/components/tag_field_spec.js @@ -24,11 +24,6 @@ describe('releases/components/tag_field', () => { const findTagFieldNew = () => wrapper.findComponent(TagFieldNew); const findTagFieldExisting = () => wrapper.findComponent(TagFieldExisting); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when an existing release is being edited', () => { beforeEach(() => { createComponent({ isExistingRelease: true }); diff --git a/spec/frontend/repository/components/blob_button_group_spec.js b/spec/frontend/repository/components/blob_button_group_spec.js index 33a85c04fcf..96dedd54126 100644 --- a/spec/frontend/repository/components/blob_button_group_spec.js +++ b/spec/frontend/repository/components/blob_button_group_spec.js @@ -38,10 +38,6 @@ describe('BlobButtonGroup component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findDeleteBlobModal = () => wrapper.findComponent(DeleteBlobModal); const findUploadBlobModal = () => wrapper.findComponent(UploadBlobModal); const findDeleteButton = () => wrapper.findByTestId('delete'); diff --git a/spec/frontend/repository/components/blob_content_viewer_spec.js b/spec/frontend/repository/components/blob_content_viewer_spec.js index 03a8ee6ac5d..f19952f58ab 100644 --- a/spec/frontend/repository/components/blob_content_viewer_spec.js +++ b/spec/frontend/repository/components/blob_content_viewer_spec.js @@ -175,7 +175,6 @@ describe('Blob content viewer component', () => { }); afterEach(() => { - wrapper.destroy(); mockAxios.reset(); }); diff --git a/spec/frontend/repository/components/blob_controls_spec.js b/spec/frontend/repository/components/blob_controls_spec.js index 0d52542397f..3ced5f6c4d2 100644 --- a/spec/frontend/repository/components/blob_controls_spec.js +++ b/spec/frontend/repository/components/blob_controls_spec.js @@ -50,8 +50,6 @@ describe('Blob controls component', () => { beforeEach(() => createComponent()); - afterEach(() => wrapper.destroy()); - it('renders a find button with the correct href', () => { expect(findFindButton().attributes('href')).toBe('find/file.js'); }); diff --git a/spec/frontend/repository/components/blob_viewers/lfs_viewer_spec.js b/spec/frontend/repository/components/blob_viewers/lfs_viewer_spec.js index 599443bf862..b4f4b0058de 100644 --- a/spec/frontend/repository/components/blob_viewers/lfs_viewer_spec.js +++ b/spec/frontend/repository/components/blob_viewers/lfs_viewer_spec.js @@ -21,8 +21,6 @@ describe('LFS Viewer', () => { beforeEach(() => createComponent()); - afterEach(() => wrapper.destroy()); - it('renders the correct text', () => { expect(wrapper.text()).toBe( 'This content could not be displayed because it is stored in LFS. You can download it instead.', diff --git a/spec/frontend/repository/components/breadcrumbs_spec.js b/spec/frontend/repository/components/breadcrumbs_spec.js index c2f34f79f89..8b7a7d91125 100644 --- a/spec/frontend/repository/components/breadcrumbs_spec.js +++ b/spec/frontend/repository/components/breadcrumbs_spec.js @@ -42,10 +42,6 @@ describe('Repository breadcrumbs component', () => { const findUploadBlobModal = () => wrapper.findComponent(UploadBlobModal); const findNewDirectoryModal = () => wrapper.findComponent(NewDirectoryModal); - afterEach(() => { - wrapper.destroy(); - }); - it.each` path | linkCount ${'/'} | ${1} diff --git a/spec/frontend/repository/components/delete_blob_modal_spec.js b/spec/frontend/repository/components/delete_blob_modal_spec.js index b5996816ad8..5846174296a 100644 --- a/spec/frontend/repository/components/delete_blob_modal_spec.js +++ b/spec/frontend/repository/components/delete_blob_modal_spec.js @@ -49,10 +49,6 @@ describe('DeleteBlobModal', () => { await findCommitTextarea().vm.$emit('input', commitText); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders Modal component', () => { createComponent(); diff --git a/spec/frontend/repository/components/directory_download_links_spec.js b/spec/frontend/repository/components/directory_download_links_spec.js index 72c4165c2e9..3739829c759 100644 --- a/spec/frontend/repository/components/directory_download_links_spec.js +++ b/spec/frontend/repository/components/directory_download_links_spec.js @@ -16,10 +16,6 @@ function factory(currentPath) { } describe('Repository directory download links component', () => { - afterEach(() => { - vm.destroy(); - }); - it.each` path ${'app'} diff --git a/spec/frontend/repository/components/fork_suggestion_spec.js b/spec/frontend/repository/components/fork_suggestion_spec.js index 36a48a3fdb8..a9e5c18c0a9 100644 --- a/spec/frontend/repository/components/fork_suggestion_spec.js +++ b/spec/frontend/repository/components/fork_suggestion_spec.js @@ -14,8 +14,6 @@ describe('ForkSuggestion component', () => { beforeEach(() => createComponent()); - afterEach(() => wrapper.destroy()); - const { i18n } = ForkSuggestion; const findMessage = () => wrapper.findByTestId('message'); const findForkButton = () => wrapper.findByTestId('fork'); diff --git a/spec/frontend/repository/components/last_commit_spec.js b/spec/frontend/repository/components/last_commit_spec.js index 7226e7baa36..2ef93a4565a 100644 --- a/spec/frontend/repository/components/last_commit_spec.js +++ b/spec/frontend/repository/components/last_commit_spec.js @@ -114,7 +114,6 @@ const createComponent = async (data = {}) => { }; afterEach(() => { - wrapper.destroy(); mockResolver = null; }); diff --git a/spec/frontend/repository/components/new_directory_modal_spec.js b/spec/frontend/repository/components/new_directory_modal_spec.js index 06e3dcbe9ea..d70021650ed 100644 --- a/spec/frontend/repository/components/new_directory_modal_spec.js +++ b/spec/frontend/repository/components/new_directory_modal_spec.js @@ -76,10 +76,6 @@ describe('NewDirectoryModal', () => { await waitForPromises(); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders modal component', () => { createComponent(); diff --git a/spec/frontend/repository/components/preview/index_spec.js b/spec/frontend/repository/components/preview/index_spec.js index 416cc7d360a..8a88c5b9c61 100644 --- a/spec/frontend/repository/components/preview/index_spec.js +++ b/spec/frontend/repository/components/preview/index_spec.js @@ -49,10 +49,6 @@ describe('Repository file preview component', () => { mockReadmeData.mockResolvedValue(MOCK_README_DATA); }); - afterEach(() => { - wrapper.destroy(); - }); - it('handles hash after render', async () => { await waitForPromises(); expect(handleLocationHash).toHaveBeenCalled(); diff --git a/spec/frontend/repository/components/table/index_spec.js b/spec/frontend/repository/components/table/index_spec.js index 8b987551b33..f7be367887c 100644 --- a/spec/frontend/repository/components/table/index_spec.js +++ b/spec/frontend/repository/components/table/index_spec.js @@ -88,10 +88,6 @@ function factory({ path, isLoading = false, hasMore = true, entries = {}, commit const findTableRows = () => vm.findAllComponents(TableRow); describe('Repository table component', () => { - afterEach(() => { - vm.destroy(); - }); - it.each` path | ref ${'/'} | ${'main'} diff --git a/spec/frontend/repository/components/table/parent_row_spec.js b/spec/frontend/repository/components/table/parent_row_spec.js index 03fb4242e40..77822a148b7 100644 --- a/spec/frontend/repository/components/table/parent_row_spec.js +++ b/spec/frontend/repository/components/table/parent_row_spec.js @@ -26,10 +26,6 @@ function factory(path, loadingPath) { } describe('Repository parent row component', () => { - afterEach(() => { - vm.destroy(); - }); - it.each` path | to ${'app'} | ${'/-/tree/main/'} diff --git a/spec/frontend/repository/components/table/row_spec.js b/spec/frontend/repository/components/table/row_spec.js index 02796d487df..055616d6e8e 100644 --- a/spec/frontend/repository/components/table/row_spec.js +++ b/spec/frontend/repository/components/table/row_spec.js @@ -47,10 +47,6 @@ describe('Repository table row component', () => { const findRouterLink = () => vm.findComponent(RouterLinkStub); const findIntersectionObserver = () => vm.findComponent(GlIntersectionObserver); - afterEach(() => { - vm.destroy(); - }); - it('renders table row', async () => { factory({ id: '1', diff --git a/spec/frontend/repository/components/tree_content_spec.js b/spec/frontend/repository/components/tree_content_spec.js index 4f49fe2fa65..76a50c41a66 100644 --- a/spec/frontend/repository/components/tree_content_spec.js +++ b/spec/frontend/repository/components/tree_content_spec.js @@ -45,10 +45,6 @@ function factory(path, appoloMockResponse = mockResponse) { describe('Repository table component', () => { const findFileTable = () => vm.findComponent(FileTable); - afterEach(() => { - vm.destroy(); - }); - it('renders file preview', async () => { factory('/'); diff --git a/spec/frontend/repository/components/upload_blob_modal_spec.js b/spec/frontend/repository/components/upload_blob_modal_spec.js index 2397fe000cf..21699f81900 100644 --- a/spec/frontend/repository/components/upload_blob_modal_spec.js +++ b/spec/frontend/repository/components/upload_blob_modal_spec.js @@ -57,11 +57,6 @@ describe('UploadBlobModal', () => { const cancelButtonDisabledState = () => findModal().props('actionCancel').attributes[0].disabled; const actionButtonLoadingState = () => findModal().props('actionPrimary').attributes[0].loading; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe.each` canPushCode | displayBranchName | displayForkedBranchMessage ${true} | ${true} | ${false} diff --git a/spec/frontend/repository/mixins/highlight_mixin_spec.js b/spec/frontend/repository/mixins/highlight_mixin_spec.js index 7c48fe440d2..5f872749581 100644 --- a/spec/frontend/repository/mixins/highlight_mixin_spec.js +++ b/spec/frontend/repository/mixins/highlight_mixin_spec.js @@ -44,8 +44,6 @@ describe('HighlightMixin', () => { beforeEach(() => createComponent()); - afterEach(() => wrapper.destroy()); - describe('initHighlightWorker', () => { const firstSeventyLines = contentArray.slice(0, LINES_PER_CHUNK).join('\n'); diff --git a/spec/frontend/repository/pages/blob_spec.js b/spec/frontend/repository/pages/blob_spec.js index 4fe6188370e..366523e2b8b 100644 --- a/spec/frontend/repository/pages/blob_spec.js +++ b/spec/frontend/repository/pages/blob_spec.js @@ -16,10 +16,6 @@ describe('Repository blob page component', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('has a Blob Content Viewer component', () => { expect(findBlobContentViewer().exists()).toBe(true); expect(findBlobContentViewer().props('path')).toBe(path); diff --git a/spec/frontend/repository/pages/index_spec.js b/spec/frontend/repository/pages/index_spec.js index 559257d414c..e50557e7d61 100644 --- a/spec/frontend/repository/pages/index_spec.js +++ b/spec/frontend/repository/pages/index_spec.js @@ -13,8 +13,6 @@ describe('Repository index page component', () => { } afterEach(() => { - wrapper.destroy(); - updateElementsVisibility.mockClear(); }); diff --git a/spec/frontend/repository/pages/tree_spec.js b/spec/frontend/repository/pages/tree_spec.js index 36662696c91..b1529d77c7d 100644 --- a/spec/frontend/repository/pages/tree_spec.js +++ b/spec/frontend/repository/pages/tree_spec.js @@ -12,8 +12,6 @@ describe('Repository tree page component', () => { } afterEach(() => { - wrapper.destroy(); - updateElementsVisibility.mockClear(); }); diff --git a/spec/frontend/saved_replies/components/list_item_spec.js b/spec/frontend/saved_replies/components/list_item_spec.js index 1d80844f30a..f1ecdfecb15 100644 --- a/spec/frontend/saved_replies/components/list_item_spec.js +++ b/spec/frontend/saved_replies/components/list_item_spec.js @@ -30,10 +30,6 @@ function createComponent(propsData = {}) { } describe('Saved replies list item component', () => { - afterEach(() => { - wrapper.destroy(); - }); - it('renders list item', async () => { wrapper = createComponent({ reply: { name: 'test', content: '/assign_reviewer' } }); diff --git a/spec/frontend/saved_replies/components/list_spec.js b/spec/frontend/saved_replies/components/list_spec.js index 19063767766..bc69cb852e0 100644 --- a/spec/frontend/saved_replies/components/list_spec.js +++ b/spec/frontend/saved_replies/components/list_spec.js @@ -19,10 +19,6 @@ function createComponent(res = {}) { } describe('Saved replies list component', () => { - afterEach(() => { - wrapper.destroy(); - }); - it('does not render any list items when response is empty', () => { wrapper = createComponent(noSavedRepliesResponse); diff --git a/spec/frontend/saved_replies/pages/index_spec.js b/spec/frontend/saved_replies/pages/index_spec.js index fe47e778d44..771025d64ec 100644 --- a/spec/frontend/saved_replies/pages/index_spec.js +++ b/spec/frontend/saved_replies/pages/index_spec.js @@ -27,10 +27,6 @@ function createComponent(options = {}) { } describe('Saved replies index page component', () => { - afterEach(() => { - wrapper.destroy(); - }); - it('renders list of saved replies', async () => { const mockApollo = createMockApolloProvider(savedRepliesResponse); const savedReplies = savedRepliesResponse.data.currentUser.savedReplies.nodes; diff --git a/spec/frontend/search/sidebar/components/filters_spec.js b/spec/frontend/search/sidebar/components/filters_spec.js index 7e564bfa005..3162f769abc 100644 --- a/spec/frontend/search/sidebar/components/filters_spec.js +++ b/spec/frontend/search/sidebar/components/filters_spec.js @@ -31,10 +31,6 @@ describe('GlobalSearchSidebarFilters', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findSidebarForm = () => wrapper.find('form'); const findStatusFilter = () => wrapper.findComponent(StatusFilter); const findConfidentialityFilter = () => wrapper.findComponent(ConfidentialityFilter); diff --git a/spec/frontend/search/sidebar/components/radio_filter_spec.js b/spec/frontend/search/sidebar/components/radio_filter_spec.js index 94d529348a9..c01311d72e1 100644 --- a/spec/frontend/search/sidebar/components/radio_filter_spec.js +++ b/spec/frontend/search/sidebar/components/radio_filter_spec.js @@ -38,11 +38,6 @@ describe('RadioFilter', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findGlRadioButtonGroup = () => wrapper.findComponent(GlFormRadioGroup); const findGlRadioButtons = () => findGlRadioButtonGroup().findAllComponents(GlFormRadio); const findGlRadioButtonsText = () => findGlRadioButtons().wrappers.map((w) => w.text()); diff --git a/spec/frontend/search/sidebar/components/scope_navigation_spec.js b/spec/frontend/search/sidebar/components/scope_navigation_spec.js index 1018fae56e1..3b2d528e1d7 100644 --- a/spec/frontend/search/sidebar/components/scope_navigation_spec.js +++ b/spec/frontend/search/sidebar/components/scope_navigation_spec.js @@ -34,10 +34,6 @@ describe('ScopeNavigation', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findNavElement = () => wrapper.find('nav'); const findGlNav = () => wrapper.findComponent(GlNav); const findGlNavItems = () => wrapper.findAllComponents(GlNavItem); diff --git a/spec/frontend/search/sort/components/app_spec.js b/spec/frontend/search/sort/components/app_spec.js index a566b9b99d3..322ce1b16ef 100644 --- a/spec/frontend/search/sort/components/app_spec.js +++ b/spec/frontend/search/sort/components/app_spec.js @@ -38,11 +38,6 @@ describe('GlobalSearchSort', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findSortButtonGroup = () => wrapper.findComponent(GlButtonGroup); const findSortDropdown = () => wrapper.findComponent(GlDropdown); const findSortDirectionButton = () => wrapper.findComponent(GlButton); diff --git a/spec/frontend/search/topbar/components/app_spec.js b/spec/frontend/search/topbar/components/app_spec.js index 3975887cfff..423ec6ff63b 100644 --- a/spec/frontend/search/topbar/components/app_spec.js +++ b/spec/frontend/search/topbar/components/app_spec.js @@ -36,10 +36,6 @@ describe('GlobalSearchTopbar', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findGlSearchBox = () => wrapper.findComponent(GlSearchBoxByClick); const findGroupFilter = () => wrapper.findComponent(GroupFilter); const findProjectFilter = () => wrapper.findComponent(ProjectFilter); diff --git a/spec/frontend/search/topbar/components/group_filter_spec.js b/spec/frontend/search/topbar/components/group_filter_spec.js index b2d0297fdc2..78d9efbd686 100644 --- a/spec/frontend/search/topbar/components/group_filter_spec.js +++ b/spec/frontend/search/topbar/components/group_filter_spec.js @@ -49,10 +49,6 @@ describe('GroupFilter', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findSearchableDropdown = () => wrapper.findComponent(SearchableDropdown); describe('template', () => { diff --git a/spec/frontend/search/topbar/components/project_filter_spec.js b/spec/frontend/search/topbar/components/project_filter_spec.js index 297a536e075..9eda34b1633 100644 --- a/spec/frontend/search/topbar/components/project_filter_spec.js +++ b/spec/frontend/search/topbar/components/project_filter_spec.js @@ -49,10 +49,6 @@ describe('ProjectFilter', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findSearchableDropdown = () => wrapper.findComponent(SearchableDropdown); describe('template', () => { diff --git a/spec/frontend/search/topbar/components/searchable_dropdown_item_spec.js b/spec/frontend/search/topbar/components/searchable_dropdown_item_spec.js index e51fe9a4cf9..c911fe53d40 100644 --- a/spec/frontend/search/topbar/components/searchable_dropdown_item_spec.js +++ b/spec/frontend/search/topbar/components/searchable_dropdown_item_spec.js @@ -24,10 +24,6 @@ describe('Global Search Searchable Dropdown Item', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findGlDropdownItem = () => wrapper.findComponent(GlDropdownItem); const findGlAvatar = () => wrapper.findComponent(GlAvatar); const findDropdownTitle = () => wrapper.findByTestId('item-title'); diff --git a/spec/frontend/search/topbar/components/searchable_dropdown_spec.js b/spec/frontend/search/topbar/components/searchable_dropdown_spec.js index de1cefa9e9d..2d5557b65f1 100644 --- a/spec/frontend/search/topbar/components/searchable_dropdown_spec.js +++ b/spec/frontend/search/topbar/components/searchable_dropdown_spec.js @@ -40,10 +40,6 @@ describe('Global Search Searchable Dropdown', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - const findGlDropdown = () => wrapper.findComponent(GlDropdown); const findGlDropdownSearch = () => findGlDropdown().findComponent(GlSearchBoxByType); const findDropdownText = () => findGlDropdown().find('.dropdown-toggle-text'); diff --git a/spec/frontend/search_settings/components/search_settings_spec.js b/spec/frontend/search_settings/components/search_settings_spec.js index 3f856968db6..fe761049a70 100644 --- a/spec/frontend/search_settings/components/search_settings_spec.js +++ b/spec/frontend/search_settings/components/search_settings_spec.js @@ -79,10 +79,6 @@ describe('search_settings/components/search_settings.vue', () => { buildWrapper(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('hides sections that do not match the search term', () => { const hiddenSection = document.querySelector(`#${GENERAL_SETTINGS_ID}`); search(SEARCH_TERM); diff --git a/spec/frontend/security_configuration/components/app_spec.js b/spec/frontend/security_configuration/components/app_spec.js index ee1121abbee..5ef387adf39 100644 --- a/spec/frontend/security_configuration/components/app_spec.js +++ b/spec/frontend/security_configuration/components/app_spec.js @@ -129,10 +129,6 @@ describe('App component', () => { const findAutoDevopsEnabledAlert = () => wrapper.findComponent(AutoDevopsEnabledAlert); const findVulnerabilityManagementTab = () => wrapper.findByTestId('vulnerability-management-tab'); - afterEach(() => { - wrapper.destroy(); - }); - describe('basic structure', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/security_configuration/components/auto_dev_ops_alert_spec.js b/spec/frontend/security_configuration/components/auto_dev_ops_alert_spec.js index 467ae35408c..df1fa1a8084 100644 --- a/spec/frontend/security_configuration/components/auto_dev_ops_alert_spec.js +++ b/spec/frontend/security_configuration/components/auto_dev_ops_alert_spec.js @@ -23,10 +23,6 @@ describe('AutoDevopsAlert component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('contains correct body text', () => { expect(wrapper.text()).toContain('Quickly enable all'); }); diff --git a/spec/frontend/security_configuration/components/auto_dev_ops_enabled_alert_spec.js b/spec/frontend/security_configuration/components/auto_dev_ops_enabled_alert_spec.js index 778fea2896a..22f45a92f70 100644 --- a/spec/frontend/security_configuration/components/auto_dev_ops_enabled_alert_spec.js +++ b/spec/frontend/security_configuration/components/auto_dev_ops_enabled_alert_spec.js @@ -21,10 +21,6 @@ describe('AutoDevopsEnabledAlert component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('contains correct body text', () => { expect(wrapper.text()).toMatchInterpolatedText(AutoDevopsEnabledAlert.i18n.body); }); diff --git a/spec/frontend/security_configuration/components/feature_card_spec.js b/spec/frontend/security_configuration/components/feature_card_spec.js index d10722be8ea..7c91c13c6d7 100644 --- a/spec/frontend/security_configuration/components/feature_card_spec.js +++ b/spec/frontend/security_configuration/components/feature_card_spec.js @@ -78,7 +78,6 @@ describe('FeatureCard component', () => { }; afterEach(() => { - wrapper.destroy(); feature = undefined; }); diff --git a/spec/frontend/security_configuration/components/training_provider_list_spec.js b/spec/frontend/security_configuration/components/training_provider_list_spec.js index f378c600ce1..1f8f306c931 100644 --- a/spec/frontend/security_configuration/components/training_provider_list_spec.js +++ b/spec/frontend/security_configuration/components/training_provider_list_spec.js @@ -132,7 +132,6 @@ describe('TrainingProviderList component', () => { const toggleFirstProvider = () => findFirstToggle().vm.$emit('change', testProviderIds[0]); afterEach(() => { - wrapper.destroy(); apolloProvider = null; }); diff --git a/spec/frontend/security_configuration/components/upgrade_banner_spec.js b/spec/frontend/security_configuration/components/upgrade_banner_spec.js index c34d8e47a6c..97087877224 100644 --- a/spec/frontend/security_configuration/components/upgrade_banner_spec.js +++ b/spec/frontend/security_configuration/components/upgrade_banner_spec.js @@ -44,7 +44,6 @@ describe('UpgradeBanner component', () => { }); afterEach(() => { - wrapper.destroy(); unmockTracking(); }); diff --git a/spec/frontend/set_status_modal/set_status_modal_wrapper_spec.js b/spec/frontend/set_status_modal/set_status_modal_wrapper_spec.js index 13670fac0ca..b5bf739b35a 100644 --- a/spec/frontend/set_status_modal/set_status_modal_wrapper_spec.js +++ b/spec/frontend/set_status_modal/set_status_modal_wrapper_spec.js @@ -72,7 +72,6 @@ describe('SetStatusModalWrapper', () => { }; afterEach(() => { - wrapper.destroy(); clearEmojiMock(); }); diff --git a/spec/frontend/set_status_modal/user_profile_set_status_wrapper_spec.js b/spec/frontend/set_status_modal/user_profile_set_status_wrapper_spec.js index a4a2a86dc73..a6ad90123b7 100644 --- a/spec/frontend/set_status_modal/user_profile_set_status_wrapper_spec.js +++ b/spec/frontend/set_status_modal/user_profile_set_status_wrapper_spec.js @@ -37,10 +37,6 @@ describe('UserProfileSetStatusWrapper', () => { const findInput = (name) => wrapper.find(`[name="${name}"]`); const findSetStatusForm = () => wrapper.findComponent(SetStatusForm); - afterEach(() => { - wrapper.destroy(); - }); - it('renders `SetStatusForm` component and passes expected props', () => { createComponent(); diff --git a/spec/frontend/sidebar/components/assignees/assignee_avatar_link_spec.js b/spec/frontend/sidebar/components/assignees/assignee_avatar_link_spec.js index 60edab8766a..81b65f4f050 100644 --- a/spec/frontend/sidebar/components/assignees/assignee_avatar_link_spec.js +++ b/spec/frontend/sidebar/components/assignees/assignee_avatar_link_spec.js @@ -30,10 +30,6 @@ describe('AssigneeAvatarLink component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - const findTooltipText = () => wrapper.attributes('title'); const findUserLink = () => wrapper.findComponent(GlLink); diff --git a/spec/frontend/sidebar/components/assignees/assignee_avatar_spec.js b/spec/frontend/sidebar/components/assignees/assignee_avatar_spec.js index 7df37d11987..b672bc292bf 100644 --- a/spec/frontend/sidebar/components/assignees/assignee_avatar_spec.js +++ b/spec/frontend/sidebar/components/assignees/assignee_avatar_spec.js @@ -30,7 +30,6 @@ describe('AssigneeAvatar', () => { afterEach(() => { window.gon = origGon; - wrapper.destroy(); }); const findImg = () => wrapper.find('img'); diff --git a/spec/frontend/sidebar/components/assignees/assignee_title_spec.js b/spec/frontend/sidebar/components/assignees/assignee_title_spec.js index 14a6bdbf907..d561c761c99 100644 --- a/spec/frontend/sidebar/components/assignees/assignee_title_spec.js +++ b/spec/frontend/sidebar/components/assignees/assignee_title_spec.js @@ -17,11 +17,6 @@ describe('AssigneeTitle component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('assignee title', () => { it('renders assignee', () => { wrapper = createComponent({ diff --git a/spec/frontend/sidebar/components/assignees/assignees_realtime_spec.js b/spec/frontend/sidebar/components/assignees/assignees_realtime_spec.js index 080171fb2ea..0501c1bae23 100644 --- a/spec/frontend/sidebar/components/assignees/assignees_realtime_spec.js +++ b/spec/frontend/sidebar/components/assignees/assignees_realtime_spec.js @@ -49,7 +49,6 @@ describe('Assignees Realtime', () => { }); afterEach(() => { - wrapper.destroy(); fakeApollo = null; SidebarMediator.singleton = null; }); diff --git a/spec/frontend/sidebar/components/assignees/assignees_spec.js b/spec/frontend/sidebar/components/assignees/assignees_spec.js index d422292ed9e..1661e28abd2 100644 --- a/spec/frontend/sidebar/components/assignees/assignees_spec.js +++ b/spec/frontend/sidebar/components/assignees/assignees_spec.js @@ -25,10 +25,6 @@ describe('Assignee component', () => { const findComponentTextNoUsers = () => wrapper.find('[data-testid="no-value"]'); const findCollapsedChildren = () => wrapper.findAll('.sidebar-collapsed-icon > *'); - afterEach(() => { - wrapper.destroy(); - }); - describe('No assignees/users', () => { it('displays no assignee icon when collapsed', () => { createWrapper(); diff --git a/spec/frontend/sidebar/components/assignees/collapsed_assignee_list_spec.js b/spec/frontend/sidebar/components/assignees/collapsed_assignee_list_spec.js index 7e7d4921cfa..40d3d090bb4 100644 --- a/spec/frontend/sidebar/components/assignees/collapsed_assignee_list_spec.js +++ b/spec/frontend/sidebar/components/assignees/collapsed_assignee_list_spec.js @@ -26,10 +26,6 @@ describe('CollapsedAssigneeList component', () => { const findAssignees = () => wrapper.findAllComponents(CollapsedAssignee); const getTooltipTitle = () => wrapper.attributes('title'); - afterEach(() => { - wrapper.destroy(); - }); - describe('No assignees/users', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/sidebar/components/assignees/collapsed_assignee_spec.js b/spec/frontend/sidebar/components/assignees/collapsed_assignee_spec.js index 4db95114b96..851eaedf0bd 100644 --- a/spec/frontend/sidebar/components/assignees/collapsed_assignee_spec.js +++ b/spec/frontend/sidebar/components/assignees/collapsed_assignee_spec.js @@ -21,10 +21,6 @@ describe('CollapsedAssignee assignee component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - it('has author name', () => { createComponent(); diff --git a/spec/frontend/sidebar/components/assignees/issuable_assignees_spec.js b/spec/frontend/sidebar/components/assignees/issuable_assignees_spec.js index 1161fefcc64..82145b82e21 100644 --- a/spec/frontend/sidebar/components/assignees/issuable_assignees_spec.js +++ b/spec/frontend/sidebar/components/assignees/issuable_assignees_spec.js @@ -20,11 +20,6 @@ describe('IssuableAssignees', () => { const findUncollapsedAssigneeList = () => wrapper.findComponent(UncollapsedAssigneeList); const findEmptyAssignee = () => wrapper.find('[data-testid="none"]'); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when no assignees are present', () => { it.each` signedIn | editable | message diff --git a/spec/frontend/sidebar/components/assignees/sidebar_assignees_spec.js b/spec/frontend/sidebar/components/assignees/sidebar_assignees_spec.js index 58b174059fa..a189d3656a2 100644 --- a/spec/frontend/sidebar/components/assignees/sidebar_assignees_spec.js +++ b/spec/frontend/sidebar/components/assignees/sidebar_assignees_spec.js @@ -39,9 +39,6 @@ describe('sidebar assignees', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; - SidebarService.singleton = null; SidebarStore.singleton = null; SidebarMediator.singleton = null; diff --git a/spec/frontend/sidebar/components/assignees/sidebar_assignees_widget_spec.js b/spec/frontend/sidebar/components/assignees/sidebar_assignees_widget_spec.js index 20792494d75..bec6f9e26ab 100644 --- a/spec/frontend/sidebar/components/assignees/sidebar_assignees_widget_spec.js +++ b/spec/frontend/sidebar/components/assignees/sidebar_assignees_widget_spec.js @@ -98,8 +98,6 @@ describe('Sidebar assignees widget', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; fakeApollo = null; delete gon.current_username; }); diff --git a/spec/frontend/sidebar/components/assignees/sidebar_editable_item_spec.js b/spec/frontend/sidebar/components/assignees/sidebar_editable_item_spec.js index 6c22d2f687d..27c31ac56c9 100644 --- a/spec/frontend/sidebar/components/assignees/sidebar_editable_item_spec.js +++ b/spec/frontend/sidebar/components/assignees/sidebar_editable_item_spec.js @@ -21,11 +21,6 @@ describe('boards sidebar remove issue', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('template', () => { it('renders title', () => { const title = 'Sidebar item title'; diff --git a/spec/frontend/sidebar/components/assignees/sidebar_invite_members_spec.js b/spec/frontend/sidebar/components/assignees/sidebar_invite_members_spec.js index b738d931040..501048bf056 100644 --- a/spec/frontend/sidebar/components/assignees/sidebar_invite_members_spec.js +++ b/spec/frontend/sidebar/components/assignees/sidebar_invite_members_spec.js @@ -16,10 +16,6 @@ describe('Sidebar invite members component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when directly inviting members', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/sidebar/components/assignees/sidebar_participant_spec.js b/spec/frontend/sidebar/components/assignees/sidebar_participant_spec.js index c43b8938ade..7895274ab6d 100644 --- a/spec/frontend/sidebar/components/assignees/sidebar_participant_spec.js +++ b/spec/frontend/sidebar/components/assignees/sidebar_participant_spec.js @@ -32,10 +32,6 @@ describe('Sidebar participant component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('does not show `Busy` status when user is not busy', () => { createComponent(); diff --git a/spec/frontend/sidebar/components/assignees/uncollapsed_assignee_list_spec.js b/spec/frontend/sidebar/components/assignees/uncollapsed_assignee_list_spec.js index 03c2e1a37a9..c74a714cca4 100644 --- a/spec/frontend/sidebar/components/assignees/uncollapsed_assignee_list_spec.js +++ b/spec/frontend/sidebar/components/assignees/uncollapsed_assignee_list_spec.js @@ -24,10 +24,6 @@ describe('UncollapsedAssigneeList component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - const findMoreButton = () => wrapper.find('.user-list-more button'); describe('One assignee/user', () => { diff --git a/spec/frontend/sidebar/components/assignees/user_name_with_status_spec.js b/spec/frontend/sidebar/components/assignees/user_name_with_status_spec.js index 37c16bc9235..877d7cd61ee 100644 --- a/spec/frontend/sidebar/components/assignees/user_name_with_status_spec.js +++ b/spec/frontend/sidebar/components/assignees/user_name_with_status_spec.js @@ -18,10 +18,6 @@ describe('UserNameWithStatus', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('will render the users name', () => { expect(wrapper.html()).toContain(name); }); diff --git a/spec/frontend/sidebar/components/confidential/sidebar_confidentiality_content_spec.js b/spec/frontend/sidebar/components/confidential/sidebar_confidentiality_content_spec.js index 81354d64a90..4a2b3b30e6d 100644 --- a/spec/frontend/sidebar/components/confidential/sidebar_confidentiality_content_spec.js +++ b/spec/frontend/sidebar/components/confidential/sidebar_confidentiality_content_spec.js @@ -18,10 +18,6 @@ describe('Sidebar Confidentiality Content', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('emits `expandSidebar` event on collapsed icon click', () => { createComponent(); findCollapsedIcon().trigger('click'); diff --git a/spec/frontend/sidebar/components/confidential/sidebar_confidentiality_form_spec.js b/spec/frontend/sidebar/components/confidential/sidebar_confidentiality_form_spec.js index 53640f668a4..1ca20dad1c6 100644 --- a/spec/frontend/sidebar/components/confidential/sidebar_confidentiality_form_spec.js +++ b/spec/frontend/sidebar/components/confidential/sidebar_confidentiality_form_spec.js @@ -38,10 +38,6 @@ describe('Sidebar Confidentiality Form', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('emits a `closeForm` event when Cancel button is clicked', () => { createComponent(); findCancelButton().vm.$emit('click'); diff --git a/spec/frontend/sidebar/components/confidential/sidebar_confidentiality_widget_spec.js b/spec/frontend/sidebar/components/confidential/sidebar_confidentiality_widget_spec.js index a6b094ad6ec..39b30307dd7 100644 --- a/spec/frontend/sidebar/components/confidential/sidebar_confidentiality_widget_spec.js +++ b/spec/frontend/sidebar/components/confidential/sidebar_confidentiality_widget_spec.js @@ -48,7 +48,6 @@ describe('Sidebar Confidentiality Widget', () => { }; afterEach(() => { - wrapper.destroy(); fakeApollo = null; }); diff --git a/spec/frontend/sidebar/components/copy/copyable_field_spec.js b/spec/frontend/sidebar/components/copy/copyable_field_spec.js index 7790d77bc65..03e131aab35 100644 --- a/spec/frontend/sidebar/components/copy/copyable_field_spec.js +++ b/spec/frontend/sidebar/components/copy/copyable_field_spec.js @@ -20,10 +20,6 @@ describe('SidebarCopyableField', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findClipboardButton = () => wrapper.findComponent(ClipboardButton); const findLoadingIcon = () => wrapper.findComponent(GlLoadingIcon); diff --git a/spec/frontend/sidebar/components/copy/sidebar_reference_widget_spec.js b/spec/frontend/sidebar/components/copy/sidebar_reference_widget_spec.js index 169e2f37248..2ae80b2c97b 100644 --- a/spec/frontend/sidebar/components/copy/sidebar_reference_widget_spec.js +++ b/spec/frontend/sidebar/components/copy/sidebar_reference_widget_spec.js @@ -39,10 +39,6 @@ describe('Sidebar Reference Widget', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when reference is loading', () => { it('sets CopyableField `is-loading` prop to `true`', () => { createComponent({ referenceQueryHandler: jest.fn().mockReturnValue(new Promise(() => {})) }); diff --git a/spec/frontend/sidebar/components/crm_contacts/crm_contacts_spec.js b/spec/frontend/sidebar/components/crm_contacts/crm_contacts_spec.js index 6ed6d0276fa..546cabd07d3 100644 --- a/spec/frontend/sidebar/components/crm_contacts/crm_contacts_spec.js +++ b/spec/frontend/sidebar/components/crm_contacts/crm_contacts_spec.js @@ -39,7 +39,6 @@ describe('Issue crm contacts component', () => { }; afterEach(() => { - wrapper.destroy(); fakeApollo = null; }); diff --git a/spec/frontend/sidebar/components/date/sidebar_date_widget_spec.js b/spec/frontend/sidebar/components/date/sidebar_date_widget_spec.js index e0bac8785e1..4246cc15ee3 100644 --- a/spec/frontend/sidebar/components/date/sidebar_date_widget_spec.js +++ b/spec/frontend/sidebar/components/date/sidebar_date_widget_spec.js @@ -62,7 +62,6 @@ describe('Sidebar date Widget', () => { }; afterEach(() => { - wrapper.destroy(); fakeApollo = null; }); diff --git a/spec/frontend/sidebar/components/date/sidebar_formatted_date_spec.js b/spec/frontend/sidebar/components/date/sidebar_formatted_date_spec.js index cbe01263dcd..1bb910c53ea 100644 --- a/spec/frontend/sidebar/components/date/sidebar_formatted_date_spec.js +++ b/spec/frontend/sidebar/components/date/sidebar_formatted_date_spec.js @@ -27,10 +27,6 @@ describe('SidebarFormattedDate', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('displays formatted date', () => { expect(findFormattedDate().text()).toBe('Apr 15, 2021'); }); diff --git a/spec/frontend/sidebar/components/date/sidebar_inherit_date_spec.js b/spec/frontend/sidebar/components/date/sidebar_inherit_date_spec.js index a7556b9110c..97debe3088d 100644 --- a/spec/frontend/sidebar/components/date/sidebar_inherit_date_spec.js +++ b/spec/frontend/sidebar/components/date/sidebar_inherit_date_spec.js @@ -31,10 +31,6 @@ describe('SidebarInheritDate', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('displays formatted fixed and inherited dates with radio buttons', () => { expect(wrapper.findAllComponents(SidebarFormattedDate)).toHaveLength(2); expect(wrapper.findAllComponents(GlFormRadio)).toHaveLength(2); diff --git a/spec/frontend/sidebar/components/incidents/escalation_status_spec.js b/spec/frontend/sidebar/components/incidents/escalation_status_spec.js index 1a78ce4ddee..e356f02a36b 100644 --- a/spec/frontend/sidebar/components/incidents/escalation_status_spec.js +++ b/spec/frontend/sidebar/components/incidents/escalation_status_spec.js @@ -17,10 +17,6 @@ describe('EscalationStatus', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - const findDropdownComponent = () => wrapper.findComponent(GlDropdown); const findDropdownItems = () => wrapper.findAllComponents(GlDropdownItem); const findDropdownMenu = () => findDropdownComponent().find('.dropdown-menu'); diff --git a/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_button_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_button_spec.js index 4f2a89e20db..084ca5ed3fc 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_button_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_button_spec.js @@ -29,10 +29,6 @@ describe('DropdownButton', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - const findDropdownButton = () => wrapper.findComponent(GlButton); const findDropdownText = () => wrapper.find('.dropdown-toggle-text'); const findDropdownIcon = () => wrapper.findComponent(GlIcon); diff --git a/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_create_view_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_create_view_spec.js index 59e95edfa20..bb687720582 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_create_view_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_create_view_spec.js @@ -32,10 +32,6 @@ describe('DropdownContentsCreateView', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('computed', () => { describe('disableCreate', () => { it('returns `true` when label title and color is not defined', () => { diff --git a/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_labels_view_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_labels_view_spec.js index 865dc8fe8fb..7940518f1e8 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_labels_view_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_labels_view_spec.js @@ -51,10 +51,6 @@ describe('DropdownContentsLabelsView', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - const findDropdownContent = () => wrapper.find('[data-testid="dropdown-content"]'); const findDropdownTitle = () => wrapper.find('[data-testid="dropdown-title"]'); const findDropdownFooter = () => wrapper.find('[data-testid="dropdown-footer"]'); diff --git a/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_spec.js index e9ffda7c251..0a17c5f8721 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_spec.js @@ -28,10 +28,6 @@ describe('DropdownContent', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('computed', () => { describe('dropdownContentsView', () => { it('returns string "dropdown-contents-create-view" when `showDropdownContentsCreateView` prop is `true`', () => { diff --git a/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_title_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_title_spec.js index 6c3fda421ff..367f6007194 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_title_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_title_spec.js @@ -31,10 +31,6 @@ describe('DropdownTitle', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { it('renders component container element with string "Labels"', () => { expect(wrapper.text()).toContain('Labels'); diff --git a/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_value_collapsed_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_value_collapsed_spec.js index b33a890b9e3..6684cf0c5f4 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_value_collapsed_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_value_collapsed_spec.js @@ -24,10 +24,6 @@ describe('DropdownValueCollapsedComponent', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findGlIcon = () => wrapper.findComponent(GlIcon); const getTooltip = () => getBinding(wrapper.element, 'gl-tooltip'); diff --git a/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_value_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_value_spec.js index a1ccc9d2ab1..70aafceb00c 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_value_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_value_spec.js @@ -28,10 +28,6 @@ describe('DropdownValue', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('methods', () => { describe('labelFilterUrl', () => { it('returns a label filter URL based on provided label param', () => { diff --git a/spec/frontend/sidebar/components/labels/labels_select_vue/label_item_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/label_item_spec.js index e14c0e308ce..468dd14c9ee 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_vue/label_item_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/label_item_spec.js @@ -26,10 +26,6 @@ describe('LabelItem', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { it('renders gl-link component', () => { expect(wrapper.findComponent(GlLink).exists()).toBe(true); diff --git a/spec/frontend/sidebar/components/labels/labels_select_vue/labels_select_root_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/labels_select_root_spec.js index a3b10c18374..806064b2202 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_vue/labels_select_root_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/labels_select_root_spec.js @@ -40,10 +40,6 @@ describe('LabelsSelectRoot', () => { store = new Vuex.Store(labelsSelectModule()); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('methods', () => { describe('handleVuexActionDispatch', () => { const touchedLabels = [ diff --git a/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_contents_create_view_spec.js b/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_contents_create_view_spec.js index 0615ca1453f..42096d0626d 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_contents_create_view_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_contents_create_view_spec.js @@ -87,10 +87,6 @@ describe('DropdownContentsCreateView', () => { gon.suggested_label_colors = mockSuggestedColors; }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders a palette of 21 colors', () => { createComponent(); expect(findAllColors()).toHaveLength(21); diff --git a/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_contents_labels_view_spec.js b/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_contents_labels_view_spec.js index 5c49b66216c..c351a60735b 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_contents_labels_view_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_contents_labels_view_spec.js @@ -64,10 +64,6 @@ describe('DropdownContentsLabelsView', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findLabels = () => wrapper.findAllComponents(LabelItem); const findLoadingIcon = () => wrapper.findComponent(GlLoadingIcon); const findObserver = () => wrapper.findComponent(GlIntersectionObserver); diff --git a/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_contents_spec.js b/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_contents_spec.js index 9bbb1413ee9..e9023cb9ff6 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_contents_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_contents_spec.js @@ -66,10 +66,6 @@ describe('DropdownContent', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findCreateView = () => wrapper.findComponent(DropdownContentsCreateView); const findLabelsView = () => wrapper.findComponent(DropdownContentsLabelsView); const findDropdownHeader = () => wrapper.findComponent(DropdownHeaderStub); diff --git a/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_footer_spec.js b/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_footer_spec.js index 9a6e0ca3ccd..ad1edaa6671 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_footer_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_footer_spec.js @@ -20,10 +20,6 @@ describe('DropdownFooter', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findCreateLabelButton = () => wrapper.find('[data-testid="create-label-button"]'); describe('Labels view', () => { diff --git a/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_header_spec.js b/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_header_spec.js index d9001dface4..824f91812fb 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_header_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_header_spec.js @@ -28,10 +28,6 @@ describe('DropdownHeader', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - const findSearchInput = () => wrapper.findComponent(GlSearchBoxByType); const findGoBackButton = () => wrapper.findByTestId('go-back-button'); const findDropdownTitle = () => wrapper.findByTestId('dropdown-header-title'); diff --git a/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_value_spec.js b/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_value_spec.js index 585048983c9..d70b989b493 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_value_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_value_spec.js @@ -30,10 +30,6 @@ describe('DropdownValue', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when there are no labels', () => { beforeEach(() => { createComponent( diff --git a/spec/frontend/sidebar/components/labels/labels_select_widget/embedded_labels_list_spec.js b/spec/frontend/sidebar/components/labels/labels_select_widget/embedded_labels_list_spec.js index 4fa65c752f9..715dd4e034e 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_widget/embedded_labels_list_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_widget/embedded_labels_list_spec.js @@ -30,10 +30,6 @@ describe('EmbeddedLabelsList', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when there are no labels', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/sidebar/components/labels/labels_select_widget/label_item_spec.js b/spec/frontend/sidebar/components/labels/labels_select_widget/label_item_spec.js index 74188a77994..377d1894411 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_widget/label_item_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_widget/label_item_spec.js @@ -19,10 +19,6 @@ describe('LabelItem', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { it('renders label color element', () => { const colorEl = wrapper.find('[data-testid="label-color-box"]'); diff --git a/spec/frontend/sidebar/components/labels/labels_select_widget/labels_select_root_spec.js b/spec/frontend/sidebar/components/labels/labels_select_widget/labels_select_root_spec.js index 4dcab4b1b5b..3101fd90f2e 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_widget/labels_select_root_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_widget/labels_select_root_spec.js @@ -83,10 +83,6 @@ describe('LabelsSelectRoot', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders component with classes `labels-select-wrapper gl-relative`', () => { createComponent(); expect(wrapper.classes()).toEqual(['labels-select-wrapper', 'gl-relative']); diff --git a/spec/frontend/sidebar/components/lock/edit_form_buttons_spec.js b/spec/frontend/sidebar/components/lock/edit_form_buttons_spec.js index 9151c5e60ab..ad9efc371f0 100644 --- a/spec/frontend/sidebar/components/lock/edit_form_buttons_spec.js +++ b/spec/frontend/sidebar/components/lock/edit_form_buttons_spec.js @@ -51,11 +51,6 @@ describe('EditFormButtons', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe.each` pageType ${ISSUABLE_TYPE_ISSUE} | ${ISSUABLE_TYPE_MR} diff --git a/spec/frontend/sidebar/components/lock/edit_form_spec.js b/spec/frontend/sidebar/components/lock/edit_form_spec.js index 4ae9025ee39..06cce7bd7ca 100644 --- a/spec/frontend/sidebar/components/lock/edit_form_spec.js +++ b/spec/frontend/sidebar/components/lock/edit_form_spec.js @@ -24,11 +24,6 @@ describe('Edit Form Dropdown', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe.each` pageType ${ISSUABLE_TYPE_ISSUE} | ${ISSUABLE_TYPE_MR} diff --git a/spec/frontend/sidebar/components/lock/issuable_lock_form_spec.js b/spec/frontend/sidebar/components/lock/issuable_lock_form_spec.js index eecab45b3e5..d26ef7298ce 100644 --- a/spec/frontend/sidebar/components/lock/issuable_lock_form_spec.js +++ b/spec/frontend/sidebar/components/lock/issuable_lock_form_spec.js @@ -67,11 +67,6 @@ describe('IssuableLockForm', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe.each` pageType ${ISSUABLE_TYPE_ISSUE} | ${ISSUABLE_TYPE_MR} diff --git a/spec/frontend/sidebar/components/move/issuable_move_dropdown_spec.js b/spec/frontend/sidebar/components/move/issuable_move_dropdown_spec.js index 72279f44e80..e247f5d27fa 100644 --- a/spec/frontend/sidebar/components/move/issuable_move_dropdown_spec.js +++ b/spec/frontend/sidebar/components/move/issuable_move_dropdown_spec.js @@ -63,7 +63,6 @@ describe('IssuableMoveDropdown', () => { }); afterEach(() => { - wrapper.destroy(); mock.restore(); }); diff --git a/spec/frontend/sidebar/components/move/move_issues_button_spec.js b/spec/frontend/sidebar/components/move/move_issues_button_spec.js index a5d46293c38..662a39c829d 100644 --- a/spec/frontend/sidebar/components/move/move_issues_button_spec.js +++ b/spec/frontend/sidebar/components/move/move_issues_button_spec.js @@ -159,7 +159,6 @@ describe('MoveIssuesButton', () => { }); afterEach(() => { - wrapper.destroy(); fakeApollo = null; }); diff --git a/spec/frontend/sidebar/components/participants/sidebar_participants_widget_spec.js b/spec/frontend/sidebar/components/participants/sidebar_participants_widget_spec.js index 859e63b3df6..914e848eced 100644 --- a/spec/frontend/sidebar/components/participants/sidebar_participants_widget_spec.js +++ b/spec/frontend/sidebar/components/participants/sidebar_participants_widget_spec.js @@ -35,7 +35,6 @@ describe('Sidebar Participants Widget', () => { }; afterEach(() => { - wrapper.destroy(); fakeApollo = null; }); diff --git a/spec/frontend/sidebar/components/reviewers/reviewer_title_spec.js b/spec/frontend/sidebar/components/reviewers/reviewer_title_spec.js index 68ecd62e4c6..0f595ab21a5 100644 --- a/spec/frontend/sidebar/components/reviewers/reviewer_title_spec.js +++ b/spec/frontend/sidebar/components/reviewers/reviewer_title_spec.js @@ -16,11 +16,6 @@ describe('ReviewerTitle component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('reviewer title', () => { it('renders reviewer', () => { wrapper = createComponent({ diff --git a/spec/frontend/sidebar/components/reviewers/reviewers_spec.js b/spec/frontend/sidebar/components/reviewers/reviewers_spec.js index 229f7ffbe04..016ec9225da 100644 --- a/spec/frontend/sidebar/components/reviewers/reviewers_spec.js +++ b/spec/frontend/sidebar/components/reviewers/reviewers_spec.js @@ -35,10 +35,6 @@ describe('Reviewer component', () => { const findCollapsedChildren = () => wrapper.findAll('.sidebar-collapsed-icon > *'); - afterEach(() => { - wrapper.destroy(); - }); - describe('No reviewers/users', () => { it('displays no reviewer icon when collapsed', () => { createWrapper(); diff --git a/spec/frontend/sidebar/components/reviewers/sidebar_reviewers_spec.js b/spec/frontend/sidebar/components/reviewers/sidebar_reviewers_spec.js index 57ae146a27a..a221d28704b 100644 --- a/spec/frontend/sidebar/components/reviewers/sidebar_reviewers_spec.js +++ b/spec/frontend/sidebar/components/reviewers/sidebar_reviewers_spec.js @@ -44,9 +44,6 @@ describe('sidebar reviewers', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; - SidebarService.singleton = null; SidebarStore.singleton = null; SidebarMediator.singleton = null; diff --git a/spec/frontend/sidebar/components/reviewers/uncollapsed_reviewer_list_spec.js b/spec/frontend/sidebar/components/reviewers/uncollapsed_reviewer_list_spec.js index d00c8dcb653..483449f924b 100644 --- a/spec/frontend/sidebar/components/reviewers/uncollapsed_reviewer_list_spec.js +++ b/spec/frontend/sidebar/components/reviewers/uncollapsed_reviewer_list_spec.js @@ -38,10 +38,6 @@ describe('UncollapsedReviewerList component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - describe('single reviewer', () => { const user = userDataMock(); diff --git a/spec/frontend/sidebar/components/severity/sidebar_severity_spec.js b/spec/frontend/sidebar/components/severity/sidebar_severity_spec.js index 9ffb0da3f68..8a27e82093d 100644 --- a/spec/frontend/sidebar/components/severity/sidebar_severity_spec.js +++ b/spec/frontend/sidebar/components/severity/sidebar_severity_spec.js @@ -48,10 +48,6 @@ describe('SidebarSeverity', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - const findSeverityToken = () => wrapper.findAllComponents(SeverityToken); const findEditBtn = () => wrapper.findByTestId('edit-button'); const findDropdown = () => wrapper.findComponent(GlDropdown); diff --git a/spec/frontend/sidebar/components/sidebar_dropdown_widget_spec.js b/spec/frontend/sidebar/components/sidebar_dropdown_widget_spec.js index 388a59eb6d2..53d81e3fcaf 100644 --- a/spec/frontend/sidebar/components/sidebar_dropdown_widget_spec.js +++ b/spec/frontend/sidebar/components/sidebar_dropdown_widget_spec.js @@ -157,11 +157,6 @@ describe('SidebarDropdownWidget', () => { jest.spyOn(wrapper.vm, 'showDropdown').mockImplementation(); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when not editing', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/sidebar/components/status/status_dropdown_spec.js b/spec/frontend/sidebar/components/status/status_dropdown_spec.js index 5a75299c3a4..229b51ea568 100644 --- a/spec/frontend/sidebar/components/status/status_dropdown_spec.js +++ b/spec/frontend/sidebar/components/status/status_dropdown_spec.js @@ -14,10 +14,6 @@ describe('SubscriptionsDropdown component', () => { wrapper = shallowMount(StatusDropdown); } - afterEach(() => { - wrapper.destroy(); - }); - describe('with no value selected', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/sidebar/components/subscriptions/sidebar_subscriptions_widget_spec.js b/spec/frontend/sidebar/components/subscriptions/sidebar_subscriptions_widget_spec.js index 6247da3a7df..7275557e7f2 100644 --- a/spec/frontend/sidebar/components/subscriptions/sidebar_subscriptions_widget_spec.js +++ b/spec/frontend/sidebar/components/subscriptions/sidebar_subscriptions_widget_spec.js @@ -62,7 +62,6 @@ describe('Sidebar Subscriptions Widget', () => { }; afterEach(() => { - wrapper.destroy(); fakeApollo = null; }); diff --git a/spec/frontend/sidebar/components/subscriptions/subscriptions_dropdown_spec.js b/spec/frontend/sidebar/components/subscriptions/subscriptions_dropdown_spec.js index 3fb8214606c..eaf7bc13d20 100644 --- a/spec/frontend/sidebar/components/subscriptions/subscriptions_dropdown_spec.js +++ b/spec/frontend/sidebar/components/subscriptions/subscriptions_dropdown_spec.js @@ -15,10 +15,6 @@ describe('SubscriptionsDropdown component', () => { wrapper = shallowMount(SubscriptionsDropdown); } - afterEach(() => { - wrapper.destroy(); - }); - describe('with no value selected', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/sidebar/components/subscriptions/subscriptions_spec.js b/spec/frontend/sidebar/components/subscriptions/subscriptions_spec.js index 1a1aa370eef..cae21189ee0 100644 --- a/spec/frontend/sidebar/components/subscriptions/subscriptions_spec.js +++ b/spec/frontend/sidebar/components/subscriptions/subscriptions_spec.js @@ -16,11 +16,6 @@ describe('Subscriptions', () => { }), ); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('shows loading spinner when loading', () => { wrapper = mountComponent({ loading: true, diff --git a/spec/frontend/sidebar/components/time_tracking/report_spec.js b/spec/frontend/sidebar/components/time_tracking/report_spec.js index f87889658b6..713ae83cbf1 100644 --- a/spec/frontend/sidebar/components/time_tracking/report_spec.js +++ b/spec/frontend/sidebar/components/time_tracking/report_spec.js @@ -51,7 +51,6 @@ describe('Issuable Time Tracking Report', () => { }; afterEach(() => { - wrapper.destroy(); fakeApollo = null; }); diff --git a/spec/frontend/sidebar/components/time_tracking/time_tracker_spec.js b/spec/frontend/sidebar/components/time_tracking/time_tracker_spec.js index ed060ca2705..91c013596d7 100644 --- a/spec/frontend/sidebar/components/time_tracking/time_tracker_spec.js +++ b/spec/frontend/sidebar/components/time_tracking/time_tracker_spec.js @@ -53,10 +53,6 @@ describe('Issuable Time Tracker', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('Initialization', () => { beforeEach(() => { wrapper = mountComponent(); diff --git a/spec/frontend/sidebar/components/todo_toggle/sidebar_todo_widget_spec.js b/spec/frontend/sidebar/components/todo_toggle/sidebar_todo_widget_spec.js index cea14c39a37..39b480b295c 100644 --- a/spec/frontend/sidebar/components/todo_toggle/sidebar_todo_widget_spec.js +++ b/spec/frontend/sidebar/components/todo_toggle/sidebar_todo_widget_spec.js @@ -41,7 +41,6 @@ describe('Sidebar Todo Widget', () => { }; afterEach(() => { - wrapper.destroy(); fakeApollo = null; }); diff --git a/spec/frontend/sidebar/components/todo_toggle/todo_button_spec.js b/spec/frontend/sidebar/components/todo_toggle/todo_button_spec.js index fb07029a249..472a89e9b21 100644 --- a/spec/frontend/sidebar/components/todo_toggle/todo_button_spec.js +++ b/spec/frontend/sidebar/components/todo_toggle/todo_button_spec.js @@ -22,7 +22,6 @@ describe('Todo Button', () => { }); afterEach(() => { - wrapper.destroy(); dispatchEventSpy = null; jest.clearAllMocks(); }); diff --git a/spec/frontend/sidebar/components/todo_toggle/todo_spec.js b/spec/frontend/sidebar/components/todo_toggle/todo_spec.js index 8e6597bf80f..4da915f0dd3 100644 --- a/spec/frontend/sidebar/components/todo_toggle/todo_spec.js +++ b/spec/frontend/sidebar/components/todo_toggle/todo_spec.js @@ -21,10 +21,6 @@ describe('SidebarTodo', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it.each` state | classes ${false} | ${['gl-button', 'btn', 'btn-default', 'btn-todo', 'issuable-header-btn', 'float-right']} diff --git a/spec/frontend/sidebar/components/toggle/toggle_sidebar_spec.js b/spec/frontend/sidebar/components/toggle/toggle_sidebar_spec.js index cf9b2828dde..0370d5e337d 100644 --- a/spec/frontend/sidebar/components/toggle/toggle_sidebar_spec.js +++ b/spec/frontend/sidebar/components/toggle/toggle_sidebar_spec.js @@ -17,10 +17,6 @@ describe('ToggleSidebar', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findGlButton = () => wrapper.findComponent(GlButton); it('should render the "chevron-double-lg-left" icon when collapsed', () => { diff --git a/spec/frontend/snippets/components/edit_spec.js b/spec/frontend/snippets/components/edit_spec.js index e24f96e22ad..5662892d83e 100644 --- a/spec/frontend/snippets/components/edit_spec.js +++ b/spec/frontend/snippets/components/edit_spec.js @@ -109,8 +109,6 @@ describe('Snippet Edit app', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; gon.relative_url_root = originalRelativeUrlRoot; }); @@ -132,10 +130,6 @@ describe('Snippet Edit app', () => { props = {}, selectedLevel = VISIBILITY_LEVEL_PRIVATE_STRING, } = {}) => { - if (wrapper) { - throw new Error('wrapper already created'); - } - const requestHandlers = [ [GetSnippetQuery, getSpy], // See `mutateSpy` declaration comment for why we send a key diff --git a/spec/frontend/snippets/components/embed_dropdown_spec.js b/spec/frontend/snippets/components/embed_dropdown_spec.js index ed5ea6cab8a..d8c6ad3278a 100644 --- a/spec/frontend/snippets/components/embed_dropdown_spec.js +++ b/spec/frontend/snippets/components/embed_dropdown_spec.js @@ -17,11 +17,6 @@ describe('snippets/components/embed_dropdown', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findSectionsData = () => { const sections = []; let current = {}; diff --git a/spec/frontend/snippets/components/show_spec.js b/spec/frontend/snippets/components/show_spec.js index 032dcf8e5f5..45a7c7b0b4a 100644 --- a/spec/frontend/snippets/components/show_spec.js +++ b/spec/frontend/snippets/components/show_spec.js @@ -50,10 +50,6 @@ describe('Snippet view app', () => { stubPerformanceWebAPI(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders loader while the query is in flight', () => { createComponent({ loading: true }); expect(findLoadingIcon().exists()).toBe(true); diff --git a/spec/frontend/snippets/components/snippet_blob_actions_edit_spec.js b/spec/frontend/snippets/components/snippet_blob_actions_edit_spec.js index a650353093d..58f47e8b0dc 100644 --- a/spec/frontend/snippets/components/snippet_blob_actions_edit_spec.js +++ b/spec/frontend/snippets/components/snippet_blob_actions_edit_spec.js @@ -56,11 +56,6 @@ describe('snippets/components/snippet_blob_actions_edit', () => { const triggerBlobDelete = (idx) => findBlobEdits().at(idx).vm.$emit('delete'); const triggerBlobUpdate = (idx, props) => findBlobEdits().at(idx).vm.$emit('blob-updated', props); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('multi-file snippets rendering', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/snippets/components/snippet_blob_edit_spec.js b/spec/frontend/snippets/components/snippet_blob_edit_spec.js index ec8e6517058..b699e056576 100644 --- a/spec/frontend/snippets/components/snippet_blob_edit_spec.js +++ b/spec/frontend/snippets/components/snippet_blob_edit_spec.js @@ -62,8 +62,6 @@ describe('Snippet Blob Edit component', () => { }); afterEach(() => { - wrapper.destroy(); - wrapper = null; axiosMock.restore(); }); diff --git a/spec/frontend/snippets/components/snippet_blob_view_spec.js b/spec/frontend/snippets/components/snippet_blob_view_spec.js index c7ff8c21d80..840bca8c9c8 100644 --- a/spec/frontend/snippets/components/snippet_blob_view_spec.js +++ b/spec/frontend/snippets/components/snippet_blob_view_spec.js @@ -62,10 +62,6 @@ describe('Blob Embeddable', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - describe('rendering', () => { it('renders correct components', () => { createComponent(); diff --git a/spec/frontend/snippets/components/snippet_description_edit_spec.js b/spec/frontend/snippets/components/snippet_description_edit_spec.js index ff75515e71a..2b42eba19c2 100644 --- a/spec/frontend/snippets/components/snippet_description_edit_spec.js +++ b/spec/frontend/snippets/components/snippet_description_edit_spec.js @@ -30,10 +30,6 @@ describe('Snippet Description Edit component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('rendering', () => { it('matches the snapshot', () => { expect(wrapper.element).toMatchSnapshot(); diff --git a/spec/frontend/snippets/components/snippet_description_view_spec.js b/spec/frontend/snippets/components/snippet_description_view_spec.js index 14f116f2aaf..3c5d50ccaa6 100644 --- a/spec/frontend/snippets/components/snippet_description_view_spec.js +++ b/spec/frontend/snippets/components/snippet_description_view_spec.js @@ -17,10 +17,6 @@ describe('Snippet Description component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('matches the snapshot', () => { expect(wrapper.element).toMatchSnapshot(); }); diff --git a/spec/frontend/snippets/components/snippet_title_spec.js b/spec/frontend/snippets/components/snippet_title_spec.js index 7c40735d64e..0a3b57c9244 100644 --- a/spec/frontend/snippets/components/snippet_title_spec.js +++ b/spec/frontend/snippets/components/snippet_title_spec.js @@ -26,10 +26,6 @@ describe('Snippet header component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - it('renders itself', () => { createComponent(); expect(wrapper.find('.snippet-header').exists()).toBe(true); diff --git a/spec/frontend/snippets/components/snippet_visibility_edit_spec.js b/spec/frontend/snippets/components/snippet_visibility_edit_spec.js index 29eb002ef4a..70eb719f706 100644 --- a/spec/frontend/snippets/components/snippet_visibility_edit_spec.js +++ b/spec/frontend/snippets/components/snippet_visibility_edit_spec.js @@ -51,10 +51,6 @@ describe('Snippet Visibility Edit component', () => { }; }); - afterEach(() => { - wrapper.destroy(); - }); - describe('rendering', () => { it('matches the snapshot', () => { createComponent(); diff --git a/spec/frontend/tags/components/delete_tag_modal_spec.js b/spec/frontend/tags/components/delete_tag_modal_spec.js index b1726a2c0ef..8438bdb7db0 100644 --- a/spec/frontend/tags/components/delete_tag_modal_spec.js +++ b/spec/frontend/tags/components/delete_tag_modal_spec.js @@ -44,10 +44,6 @@ const findFormInput = () => wrapper.findComponent(GlFormInput); const findForm = () => wrapper.find('form'); describe('Delete tag modal', () => { - afterEach(() => { - wrapper.destroy(); - }); - describe('Deleting a regular tag', () => { const expectedTitle = 'Delete tag. Are you ABSOLUTELY SURE?'; const expectedMessage = "You're about to permanently delete the tag test-tag."; diff --git a/spec/frontend/terms/components/app_spec.js b/spec/frontend/terms/components/app_spec.js index 99f61a31dbd..c60c6c79f17 100644 --- a/spec/frontend/terms/components/app_spec.js +++ b/spec/frontend/terms/components/app_spec.js @@ -37,10 +37,6 @@ describe('TermsApp', () => { isLoggedIn.mockReturnValue(true); }); - afterEach(() => { - wrapper.destroy(); - }); - const findFormWithAction = (path) => wrapper.find(`form[action="${path}"]`); const findButton = (path) => findFormWithAction(path).find('button[type="submit"]'); const findScrollableViewport = () => wrapper.findByTestId('scrollable-viewport'); diff --git a/spec/frontend/terraform/components/empty_state_spec.js b/spec/frontend/terraform/components/empty_state_spec.js index 21bfff5f1be..db3de556244 100644 --- a/spec/frontend/terraform/components/empty_state_spec.js +++ b/spec/frontend/terraform/components/empty_state_spec.js @@ -16,10 +16,6 @@ describe('EmptyStateComponent', () => { wrapper = shallowMount(EmptyState, { propsData }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should render content', () => { expect(findEmptyState().props('title')).toBe( "Your project doesn't have any Terraform state files", diff --git a/spec/frontend/terraform/components/init_command_modal_spec.js b/spec/frontend/terraform/components/init_command_modal_spec.js index 911bb8878da..ca9aa26a776 100644 --- a/spec/frontend/terraform/components/init_command_modal_spec.js +++ b/spec/frontend/terraform/components/init_command_modal_spec.js @@ -49,10 +49,6 @@ describe('InitCommandModal', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('on rendering', () => { it('renders the explanatory text', () => { expect(findExplanatoryText().text()).toContain('personal access token'); diff --git a/spec/frontend/terraform/components/states_table_actions_spec.js b/spec/frontend/terraform/components/states_table_actions_spec.js index 40b7448d78d..004cd480c42 100644 --- a/spec/frontend/terraform/components/states_table_actions_spec.js +++ b/spec/frontend/terraform/components/states_table_actions_spec.js @@ -96,7 +96,6 @@ describe('StatesTableActions', () => { toast = null; unlockResponse = null; updateStateResponse = null; - wrapper.destroy(); }); describe('when the state is loading', () => { diff --git a/spec/frontend/terraform/components/states_table_spec.js b/spec/frontend/terraform/components/states_table_spec.js index 697e52e45ea..7c783c9f717 100644 --- a/spec/frontend/terraform/components/states_table_spec.js +++ b/spec/frontend/terraform/components/states_table_spec.js @@ -140,11 +140,6 @@ describe('StatesTable', () => { return createComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it.each` name | toolTipText | hasBadge | loading | lineNumber ${'state-1'} | ${'Locked by user-1 2 days ago'} | ${true} | ${false} | ${0} diff --git a/spec/frontend/terraform/components/terraform_list_spec.js b/spec/frontend/terraform/components/terraform_list_spec.js index 580951e799a..dc59e2769f6 100644 --- a/spec/frontend/terraform/components/terraform_list_spec.js +++ b/spec/frontend/terraform/components/terraform_list_spec.js @@ -63,11 +63,6 @@ describe('TerraformList', () => { const findStatesTable = () => wrapper.findComponent(StatesTable); const findTab = () => wrapper.findComponent(GlTab); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when the terraform query has succeeded', () => { describe('when there is a list of terraform states', () => { const states = [ diff --git a/spec/frontend/toggles/index_spec.js b/spec/frontend/toggles/index_spec.js index f8c43e0ad0c..89e35991914 100644 --- a/spec/frontend/toggles/index_spec.js +++ b/spec/frontend/toggles/index_spec.js @@ -44,7 +44,6 @@ describe('toggles/index.js', () => { afterEach(() => { document.body.innerHTML = ''; instance = null; - toggleWrapper = null; }); describe('initToggle', () => { diff --git a/spec/frontend/tooltips/components/tooltips_spec.js b/spec/frontend/tooltips/components/tooltips_spec.js index d5a63a99601..e473091f405 100644 --- a/spec/frontend/tooltips/components/tooltips_spec.js +++ b/spec/frontend/tooltips/components/tooltips_spec.js @@ -30,11 +30,6 @@ describe('tooltips/components/tooltips.vue', () => { const allTooltips = () => wrapper.findAllComponents(GlTooltip); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('addTooltips', () => { let target; diff --git a/spec/frontend/usage_quotas/components/usage_quotas_app_spec.js b/spec/frontend/usage_quotas/components/usage_quotas_app_spec.js index cb70ea4e72d..3508bf7cfde 100644 --- a/spec/frontend/usage_quotas/components/usage_quotas_app_spec.js +++ b/spec/frontend/usage_quotas/components/usage_quotas_app_spec.js @@ -23,10 +23,6 @@ describe('UsageQuotasApp', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - const findSubTitle = () => wrapper.findByTestId('usage-quotas-page-subtitle'); it('renders the view title', () => { diff --git a/spec/frontend/usage_quotas/storage/components/project_storage_app_spec.js b/spec/frontend/usage_quotas/storage/components/project_storage_app_spec.js index 3379af3f41c..1a200090805 100644 --- a/spec/frontend/usage_quotas/storage/components/project_storage_app_spec.js +++ b/spec/frontend/usage_quotas/storage/components/project_storage_app_spec.js @@ -53,10 +53,6 @@ describe('ProjectStorageApp', () => { const findUsageQuotasHelpLink = () => wrapper.findByTestId('usage-quotas-help-link'); const findUsageGraph = () => wrapper.findComponent(UsageGraph); - afterEach(() => { - wrapper.destroy(); - }); - describe('with apollo fetching successful', () => { let mockApollo; diff --git a/spec/frontend/usage_quotas/storage/components/project_storage_detail_spec.js b/spec/frontend/usage_quotas/storage/components/project_storage_detail_spec.js index ce489f69cad..6065ec9e4bf 100644 --- a/spec/frontend/usage_quotas/storage/components/project_storage_detail_spec.js +++ b/spec/frontend/usage_quotas/storage/components/project_storage_detail_spec.js @@ -54,9 +54,6 @@ describe('ProjectStorageDetail', () => { beforeEach(() => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); describe('with storage types', () => { it.each(storageTypes)( diff --git a/spec/frontend/usage_quotas/storage/components/storage_type_icon_spec.js b/spec/frontend/usage_quotas/storage/components/storage_type_icon_spec.js index 1eb3386bfb8..364cf1e587b 100644 --- a/spec/frontend/usage_quotas/storage/components/storage_type_icon_spec.js +++ b/spec/frontend/usage_quotas/storage/components/storage_type_icon_spec.js @@ -16,10 +16,6 @@ describe('StorageTypeIcon', () => { const findGlIcon = () => wrapper.findComponent(GlIcon); describe('rendering icon', () => { - afterEach(() => { - wrapper.destroy(); - }); - it.each` expected | provided ${'doc-image'} | ${'lfsObjectsSize'} diff --git a/spec/frontend/usage_quotas/storage/components/usage_graph_spec.js b/spec/frontend/usage_quotas/storage/components/usage_graph_spec.js index 75b970d937a..02268e1c9d8 100644 --- a/spec/frontend/usage_quotas/storage/components/usage_graph_spec.js +++ b/spec/frontend/usage_quotas/storage/components/usage_graph_spec.js @@ -39,10 +39,6 @@ describe('Storage Counter usage graph component', () => { mountComponent(data); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the legend in order', () => { const types = wrapper.findAll('[data-testid="storage-type-legend"]'); diff --git a/spec/frontend/user_lists/components/user_lists_spec.js b/spec/frontend/user_lists/components/user_lists_spec.js index 161eb036361..603289ac11e 100644 --- a/spec/frontend/user_lists/components/user_lists_spec.js +++ b/spec/frontend/user_lists/components/user_lists_spec.js @@ -39,11 +39,6 @@ describe('~/user_lists/components/user_lists.vue', () => { const newButton = () => within(wrapper.element).queryAllByText('New user list'); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('without permissions', () => { const provideData = { ...mockProvide, diff --git a/spec/frontend/user_lists/components/user_lists_table_spec.js b/spec/frontend/user_lists/components/user_lists_table_spec.js index 3324b040b86..96e9705f02b 100644 --- a/spec/frontend/user_lists/components/user_lists_table_spec.js +++ b/spec/frontend/user_lists/components/user_lists_table_spec.js @@ -22,10 +22,6 @@ describe('User Lists Table', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should display the details of a user list', () => { expect(wrapper.find('[data-testid="ffUserListName"]').text()).toBe(userList.name); expect(wrapper.find('[data-testid="ffUserListIds"]').text()).toBe( diff --git a/spec/frontend/vue_merge_request_widget/components/action_buttons.js b/spec/frontend/vue_merge_request_widget/components/action_buttons.js index 6d714aeaf18..7334f061dc9 100644 --- a/spec/frontend/vue_merge_request_widget/components/action_buttons.js +++ b/spec/frontend/vue_merge_request_widget/components/action_buttons.js @@ -11,10 +11,6 @@ function factory(propsData = {}) { } describe('MR widget extension actions', () => { - afterEach(() => { - wrapper.destroy(); - }); - describe('tertiaryButtons', () => { it('renders buttons', () => { factory({ diff --git a/spec/frontend/vue_merge_request_widget/components/added_commit_message_spec.js b/spec/frontend/vue_merge_request_widget/components/added_commit_message_spec.js index 063425454d7..4164a7df482 100644 --- a/spec/frontend/vue_merge_request_widget/components/added_commit_message_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/added_commit_message_spec.js @@ -14,10 +14,6 @@ function factory(propsData) { } describe('Widget added commit message', () => { - afterEach(() => { - wrapper.destroy(); - }); - it('displays changes where not merged when state is closed', () => { factory({ state: 'closed' }); diff --git a/spec/frontend/vue_merge_request_widget/components/approvals/approvals_summary_optional_spec.js b/spec/frontend/vue_merge_request_widget/components/approvals/approvals_summary_optional_spec.js index e6fb0495947..bf3df70d423 100644 --- a/spec/frontend/vue_merge_request_widget/components/approvals/approvals_summary_optional_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/approvals/approvals_summary_optional_spec.js @@ -13,11 +13,6 @@ describe('MRWidget approvals summary optional', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findHelpLink = () => wrapper.findComponent(GlLink); describe('when can approve', () => { diff --git a/spec/frontend/vue_merge_request_widget/components/approvals/approvals_summary_spec.js b/spec/frontend/vue_merge_request_widget/components/approvals/approvals_summary_spec.js index 62eddebd9c1..b1d9c854bb7 100644 --- a/spec/frontend/vue_merge_request_widget/components/approvals/approvals_summary_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/approvals/approvals_summary_spec.js @@ -31,8 +31,6 @@ describe('MRWidget approvals summary', () => { const findAvatars = () => wrapper.findComponent(UserAvatarList); afterEach(() => { - wrapper.destroy(); - wrapper = null; gon.current_user_id = originalUserId; }); diff --git a/spec/frontend/vue_merge_request_widget/components/artifacts_list_app_spec.js b/spec/frontend/vue_merge_request_widget/components/artifacts_list_app_spec.js index 52e2393bf05..332f14a1721 100644 --- a/spec/frontend/vue_merge_request_widget/components/artifacts_list_app_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/artifacts_list_app_spec.js @@ -26,7 +26,6 @@ describe('Merge Requests Artifacts list app', () => { }); afterEach(() => { - wrapper.destroy(); mock.restore(); }); diff --git a/spec/frontend/vue_merge_request_widget/components/artifacts_list_spec.js b/spec/frontend/vue_merge_request_widget/components/artifacts_list_spec.js index b7bf72cd215..bb049a5d52f 100644 --- a/spec/frontend/vue_merge_request_widget/components/artifacts_list_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/artifacts_list_spec.js @@ -18,10 +18,6 @@ describe('Artifacts List', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - beforeEach(() => { mountComponent(data); }); diff --git a/spec/frontend/vue_merge_request_widget/components/extensions/child_content_spec.js b/spec/frontend/vue_merge_request_widget/components/extensions/child_content_spec.js index 198a4c2823a..3a621db7b44 100644 --- a/spec/frontend/vue_merge_request_widget/components/extensions/child_content_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/extensions/child_content_spec.js @@ -20,11 +20,6 @@ function factory(propsData) { } describe('MR widget extension child content', () => { - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders child components', () => { factory({ data: { diff --git a/spec/frontend/vue_merge_request_widget/components/extensions/status_icon_spec.js b/spec/frontend/vue_merge_request_widget/components/extensions/status_icon_spec.js index f3aa5bb774f..ffa6b5538d3 100644 --- a/spec/frontend/vue_merge_request_widget/components/extensions/status_icon_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/extensions/status_icon_spec.js @@ -11,10 +11,6 @@ function factory(propsData = {}) { } describe('MR widget extensions status icon', () => { - afterEach(() => { - wrapper.destroy(); - }); - it('renders loading icon', () => { factory({ name: 'test', isLoading: true, iconName: 'failed' }); diff --git a/spec/frontend/vue_merge_request_widget/components/mr_collapsible_extension_spec.js b/spec/frontend/vue_merge_request_widget/components/mr_collapsible_extension_spec.js index 81f266d8070..6b22c2e26ac 100644 --- a/spec/frontend/vue_merge_request_widget/components/mr_collapsible_extension_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/mr_collapsible_extension_spec.js @@ -25,10 +25,6 @@ describe('Merge Request Collapsible Extension', () => { const findErrorMessage = () => wrapper.find('.js-error-state'); const findIcon = () => wrapper.findComponent(GlIcon); - afterEach(() => { - wrapper.destroy(); - }); - describe('while collapsed', () => { beforeEach(() => { mountComponent(data); diff --git a/spec/frontend/vue_merge_request_widget/components/mr_widget_alert_message_spec.js b/spec/frontend/vue_merge_request_widget/components/mr_widget_alert_message_spec.js index 5d923d0383f..01178dab9bb 100644 --- a/spec/frontend/vue_merge_request_widget/components/mr_widget_alert_message_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/mr_widget_alert_message_spec.js @@ -11,10 +11,6 @@ function createComponent(propsData = {}) { } describe('MrWidgetAlertMessage', () => { - afterEach(() => { - wrapper.destroy(); - }); - it('should render a GlAert', () => { createComponent({ type: 'danger' }); diff --git a/spec/frontend/vue_merge_request_widget/components/mr_widget_author_spec.js b/spec/frontend/vue_merge_request_widget/components/mr_widget_author_spec.js index 8a42e2e2ce7..7eafccae083 100644 --- a/spec/frontend/vue_merge_request_widget/components/mr_widget_author_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/mr_widget_author_spec.js @@ -29,7 +29,6 @@ describe('MrWidgetAuthor', () => { }); afterEach(() => { - wrapper.destroy(); window.gl = oldWindowGl; }); diff --git a/spec/frontend/vue_merge_request_widget/components/mr_widget_author_time_spec.js b/spec/frontend/vue_merge_request_widget/components/mr_widget_author_time_spec.js index 90a29d15488..534b745aed2 100644 --- a/spec/frontend/vue_merge_request_widget/components/mr_widget_author_time_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/mr_widget_author_time_spec.js @@ -23,10 +23,6 @@ describe('MrWidgetAuthorTime', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders provided action text', () => { expect(wrapper.text()).toContain('Merged by'); }); diff --git a/spec/frontend/vue_merge_request_widget/components/mr_widget_container_spec.js b/spec/frontend/vue_merge_request_widget/components/mr_widget_container_spec.js index 8dadb0c65d0..25de76ba33c 100644 --- a/spec/frontend/vue_merge_request_widget/components/mr_widget_container_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/mr_widget_container_spec.js @@ -13,10 +13,6 @@ describe('MrWidgetContainer', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('has layout', () => { factory(); diff --git a/spec/frontend/vue_merge_request_widget/components/mr_widget_icon_spec.js b/spec/frontend/vue_merge_request_widget/components/mr_widget_icon_spec.js index 6a9b019fb4f..090a96d576c 100644 --- a/spec/frontend/vue_merge_request_widget/components/mr_widget_icon_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/mr_widget_icon_spec.js @@ -15,10 +15,6 @@ describe('MrWidgetIcon', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders icon and container', () => { expect(wrapper.element.className).toContain('circle-icon-container'); expect(wrapper.findComponent(GlIcon).props('name')).toEqual(TEST_ICON); diff --git a/spec/frontend/vue_merge_request_widget/components/mr_widget_pipeline_container_spec.js b/spec/frontend/vue_merge_request_widget/components/mr_widget_pipeline_container_spec.js index 13beb43e10b..18842e996de 100644 --- a/spec/frontend/vue_merge_request_widget/components/mr_widget_pipeline_container_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/mr_widget_pipeline_container_spec.js @@ -29,10 +29,6 @@ describe('MrWidgetPipelineContainer', () => { mock.onGet().reply(HTTP_STATUS_OK, {}); }); - afterEach(() => { - wrapper.destroy(); - }); - const findDeploymentList = () => wrapper.findComponent(DeploymentList); const findCIErrorMessage = () => wrapper.findByTestId('ci-error-message'); diff --git a/spec/frontend/vue_merge_request_widget/components/mr_widget_related_links_spec.js b/spec/frontend/vue_merge_request_widget/components/mr_widget_related_links_spec.js index 15522f7ac1d..42a16090510 100644 --- a/spec/frontend/vue_merge_request_widget/components/mr_widget_related_links_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/mr_widget_related_links_spec.js @@ -9,10 +9,6 @@ describe('MRWidgetRelatedLinks', () => { wrapper = shallowMount(RelatedLinks, { propsData }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('computed', () => { describe('closesText', () => { it('returns Closes text for open merge request', () => { diff --git a/spec/frontend/vue_merge_request_widget/components/mr_widget_status_icon_spec.js b/spec/frontend/vue_merge_request_widget/components/mr_widget_status_icon_spec.js index 530549b7b9c..b210327aa31 100644 --- a/spec/frontend/vue_merge_request_widget/components/mr_widget_status_icon_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/mr_widget_status_icon_spec.js @@ -17,11 +17,6 @@ describe('MR widget status icon component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('while loading', () => { it('renders loading icon', () => { createWrapper({ status: 'loading' }); diff --git a/spec/frontend/vue_merge_request_widget/components/mr_widget_suggest_pipeline_spec.js b/spec/frontend/vue_merge_request_widget/components/mr_widget_suggest_pipeline_spec.js index 73358edee78..70c76687a79 100644 --- a/spec/frontend/vue_merge_request_widget/components/mr_widget_suggest_pipeline_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/mr_widget_suggest_pipeline_spec.js @@ -18,10 +18,6 @@ describe('MRWidgetSuggestPipeline', () => { describe('template', () => { let wrapper; - afterEach(() => { - wrapper.destroy(); - }); - describe('core functionality', () => { const findOkBtn = () => wrapper.find('[data-testid="ok"]'); let trackingSpy; diff --git a/spec/frontend/vue_merge_request_widget/components/review_app_link_spec.js b/spec/frontend/vue_merge_request_widget/components/review_app_link_spec.js index e393b56034d..48484551d59 100644 --- a/spec/frontend/vue_merge_request_widget/components/review_app_link_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/review_app_link_spec.js @@ -17,10 +17,6 @@ describe('review app link', () => { wrapper = shallowMount(ReviewAppLink, { propsData: props }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders provided link as href attribute', () => { expect(wrapper.attributes('href')).toBe(props.link); }); diff --git a/spec/frontend/vue_merge_request_widget/components/states/commit_edit_spec.js b/spec/frontend/vue_merge_request_widget/components/states/commit_edit_spec.js index c0add94e6ed..f520c6a4f78 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/commit_edit_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/commit_edit_spec.js @@ -26,10 +26,6 @@ describe('Commits edit component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - const findTextarea = () => wrapper.find('.form-control'); it('has a correct label', () => { diff --git a/spec/frontend/vue_merge_request_widget/components/states/merge_checks_failed_spec.js b/spec/frontend/vue_merge_request_widget/components/states/merge_checks_failed_spec.js index e4448346685..c2ab0e384e8 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/merge_checks_failed_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/merge_checks_failed_spec.js @@ -12,10 +12,6 @@ function factory(propsData = {}) { } describe('Merge request widget merge checks failed state component', () => { - afterEach(() => { - wrapper.destroy(); - }); - it.each` mrState | displayText ${{ approvals: true, isApproved: false }} | ${'approvalNeeded'} diff --git a/spec/frontend/vue_merge_request_widget/components/states/merge_failed_pipeline_confirmation_dialog_spec.js b/spec/frontend/vue_merge_request_widget/components/states/merge_failed_pipeline_confirmation_dialog_spec.js index c9aca01083d..7d471b91c37 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/merge_failed_pipeline_confirmation_dialog_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/merge_failed_pipeline_confirmation_dialog_spec.js @@ -37,10 +37,6 @@ describe('MergeFailedPipelineConfirmationDialog', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should render informational text explaining why merging immediately can be dangerous', () => { expect(trimText(wrapper.text())).toContain( 'The latest pipeline for this merge request did not succeed. The latest changes are unverified. Are you sure you want to attempt to merge?', diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_archived_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_archived_spec.js index 08700e834d7..3e18ee75125 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_archived_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_archived_spec.js @@ -10,11 +10,6 @@ describe('MRWidgetArchived', () => { wrapper = shallowMount(archivedComponent, { propsData: { mr: {} } }); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders error icon', () => { expect(wrapper.findComponent(StateContainer).exists()).toBe(true); expect(wrapper.findComponent(StateContainer).props().status).toBe('failed'); diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_auto_merge_enabled_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_auto_merge_enabled_spec.js index fef5fee5f19..65d170cae8b 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_auto_merge_enabled_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_auto_merge_enabled_spec.js @@ -83,8 +83,6 @@ describe('MRWidgetAutoMergeEnabled', () => { afterEach(() => { window.gl = oldWindowGl; - wrapper.destroy(); - wrapper = null; }); describe('computed', () => { diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed_spec.js index 826f708069c..9b043bda72d 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed_spec.js @@ -18,10 +18,6 @@ describe('MRWidgetAutoMergeFailed', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - beforeEach(() => { createComponent({ mr: { mergeError }, diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_checking_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_checking_spec.js index ac18ccf9e26..6c3b7f76fe6 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_checking_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_checking_spec.js @@ -9,11 +9,6 @@ describe('MRWidgetChecking', () => { wrapper = shallowMount(CheckingComponent, { propsData: { mr: {} } }); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders loading icon', () => { expect(wrapper.findComponent(StateContainer).exists()).toBe(true); expect(wrapper.findComponent(StateContainer).props().status).toBe('loading'); diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_commit_message_dropdown_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_commit_message_dropdown_spec.js index 5d2d1fdd6f1..e4febda1daa 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_commit_message_dropdown_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_commit_message_dropdown_spec.js @@ -36,10 +36,6 @@ describe('Commits message dropdown component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - const findDropdownElements = () => wrapper.findAllComponents(GlDropdownItem); const findFirstDropdownElement = () => findDropdownElements().at(0); diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_commits_header_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_commits_header_spec.js index a6d3a6286a7..b3843b066df 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_commits_header_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_commits_header_spec.js @@ -21,10 +21,6 @@ describe('Commits header component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findHeaderWrapper = () => wrapper.find('.js-mr-widget-commits-count'); const findCommitToggle = () => wrapper.find('.commit-edit-toggle'); const findTargetBranchMessage = () => wrapper.find('.label-branch'); diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_conflicts_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_conflicts_spec.js index 2ca9dc61745..7f0a171d712 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_conflicts_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_conflicts_spec.js @@ -50,10 +50,6 @@ describe('MRWidgetConflicts', () => { await nextTick(); } - afterEach(() => { - wrapper.destroy(); - }); - // There are two permissions we need to consider: // // 1. Is the user allowed to merge to the target branch? diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_failed_to_merge_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_failed_to_merge_spec.js index 833fa27d453..38e5422325a 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_failed_to_merge_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_failed_to_merge_spec.js @@ -28,10 +28,6 @@ describe('MRWidgetFailedToMerge', () => { jest.spyOn(window, 'clearInterval').mockImplementation(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('interval', () => { it('sets interval to refresh', () => { createComponent(); diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_merged_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_merged_spec.js index a3aa563b516..e44e2834a0e 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_merged_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_merged_spec.js @@ -62,10 +62,6 @@ describe('MRWidgetMerged', () => { jest.spyOn(eventHub, '$emit').mockImplementation(() => {}); }); - afterEach(() => { - wrapper.destroy(); - }); - const findButtonByText = (text) => wrapper.findAll('button').wrappers.find((w) => w.text() === text); const findRemoveSourceBranchButton = () => findButtonByText('Delete source branch'); diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_merging_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_merging_spec.js index 5408f731b34..ca75ca11e5b 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_merging_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_merging_spec.js @@ -29,10 +29,6 @@ describe('MRWidgetMerging', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders information about merge request being merged', () => { const message = wrapper.findComponent(BoldText).props('message'); expect(message).toContain('Merging!'); diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_missing_branch_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_missing_branch_spec.js index f29cf55f7ce..fca25b8bb94 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_missing_branch_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_missing_branch_spec.js @@ -15,10 +15,6 @@ function factory(sourceBranchRemoved) { } describe('MRWidgetMissingBranch', () => { - afterEach(() => { - wrapper.destroy(); - }); - it.each` sourceBranchRemoved | branchName ${true} | ${'source'} diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_not_allowed_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_not_allowed_spec.js index 42515c597c5..40b053282de 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_not_allowed_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_not_allowed_spec.js @@ -10,11 +10,6 @@ describe('MRWidgetNotAllowed', () => { wrapper = shallowMount(notAllowedComponent); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders success icon', () => { expect(wrapper.findComponent(StatusIcon).exists()).toBe(true); expect(wrapper.findComponent(StatusIcon).props().status).toBe('success'); diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked_spec.js index c0197b5e20a..d99106df0a2 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked_spec.js @@ -10,11 +10,6 @@ describe('MRWidgetPipelineBlocked', () => { wrapper = shallowMount(PipelineBlockedComponent); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders error icon', () => { expect(wrapper.findComponent(StatusIcon).exists()).toBe(true); expect(wrapper.findComponent(StatusIcon).props().status).toBe('failed'); diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_pipeline_failed_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_pipeline_failed_spec.js index 8bae2b62ed1..ea93463f3ab 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_pipeline_failed_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_pipeline_failed_spec.js @@ -19,11 +19,6 @@ describe('PipelineFailed', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('should render error status icon', () => { createComponent(); diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_sha_mismatch_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_sha_mismatch_spec.js index aaa4591d67d..02b71ebf183 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_sha_mismatch_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_sha_mismatch_spec.js @@ -20,10 +20,6 @@ describe('ShaMismatch', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should render warning message', () => { expect(wrapper.text()).toContain('Merge blocked: new changes were just added.'); }); diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_squash_before_merge_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_squash_before_merge_spec.js index c839fa17fe5..97f8e695df9 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_squash_before_merge_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_squash_before_merge_spec.js @@ -14,10 +14,6 @@ describe('Squash before merge component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findCheckbox = () => wrapper.findComponent(GlFormCheckbox); describe('checkbox', () => { diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_unresolved_discussions_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_unresolved_discussions_spec.js index c97b42f61ac..58b9f162815 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_unresolved_discussions_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_unresolved_discussions_spec.js @@ -21,10 +21,6 @@ describe('UnresolvedDiscussions', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('triggers the correct notes event when the jump to first unresolved discussion button is clicked', () => { jest.spyOn(notesEventHub, '$emit'); @@ -38,10 +34,6 @@ describe('UnresolvedDiscussions', () => { wrapper = createComponent({ path: TEST_HOST }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should have correct elements', () => { const text = removeBreakLine(wrapper.text()).trim(); expect(text).toContain('Merge blocked:'); diff --git a/spec/frontend/vue_merge_request_widget/components/states/new_ready_to_merge_spec.js b/spec/frontend/vue_merge_request_widget/components/states/new_ready_to_merge_spec.js index 5ec9654a4af..20d06a7aaee 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/new_ready_to_merge_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/new_ready_to_merge_spec.js @@ -15,10 +15,6 @@ function factory({ canMerge }) { } describe('New ready to merge state component', () => { - afterEach(() => { - wrapper.destroy(); - }); - it.each` canMerge ${true} diff --git a/spec/frontend/vue_merge_request_widget/components/widget/action_buttons_spec.js b/spec/frontend/vue_merge_request_widget/components/widget/action_buttons_spec.js index 366ea113162..adefce9060c 100644 --- a/spec/frontend/vue_merge_request_widget/components/widget/action_buttons_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/widget/action_buttons_spec.js @@ -11,10 +11,6 @@ function factory(propsData = {}) { } describe('~/vue_merge_request_widget/components/widget/action_buttons.vue', () => { - afterEach(() => { - wrapper.destroy(); - }); - describe('tertiaryButtons', () => { it('renders buttons', () => { factory({ diff --git a/spec/frontend/vue_merge_request_widget/components/widget/widget_spec.js b/spec/frontend/vue_merge_request_widget/components/widget/widget_spec.js index 973866176c2..5887670a58d 100644 --- a/spec/frontend/vue_merge_request_widget/components/widget/widget_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/widget/widget_spec.js @@ -50,10 +50,6 @@ describe('~/vue_merge_request_widget/components/widget/widget.vue', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('on mount', () => { it('fetches collapsed', async () => { const fetchCollapsedData = jest diff --git a/spec/frontend/vue_merge_request_widget/deployment/deployment_action_button_spec.js b/spec/frontend/vue_merge_request_widget/deployment/deployment_action_button_spec.js index 1bad5dacefa..785515ae846 100644 --- a/spec/frontend/vue_merge_request_widget/deployment/deployment_action_button_spec.js +++ b/spec/frontend/vue_merge_request_widget/deployment/deployment_action_button_spec.js @@ -25,10 +25,6 @@ describe('Deployment action button', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when passed only icon via props', () => { beforeEach(() => { factory({ diff --git a/spec/frontend/vue_merge_request_widget/deployment/deployment_actions_spec.js b/spec/frontend/vue_merge_request_widget/deployment/deployment_actions_spec.js index 15c838a4a6f..1fdbbadf8b0 100644 --- a/spec/frontend/vue_merge_request_widget/deployment/deployment_actions_spec.js +++ b/spec/frontend/vue_merge_request_widget/deployment/deployment_actions_spec.js @@ -54,7 +54,6 @@ describe('DeploymentAction component', () => { }); afterEach(() => { - wrapper.destroy(); confirmAction.mockReset(); }); diff --git a/spec/frontend/vue_merge_request_widget/deployment/deployment_list_spec.js b/spec/frontend/vue_merge_request_widget/deployment/deployment_list_spec.js index 948d7ebab5e..77dac4204db 100644 --- a/spec/frontend/vue_merge_request_widget/deployment/deployment_list_spec.js +++ b/spec/frontend/vue_merge_request_widget/deployment/deployment_list_spec.js @@ -28,7 +28,6 @@ describe('~/vue_merge_request_widget/components/deployment/deployment_list.vue', afterEach(() => { wrapper?.destroy?.(); - wrapper = null; }); describe('with few deployments', () => { diff --git a/spec/frontend/vue_merge_request_widget/deployment/deployment_spec.js b/spec/frontend/vue_merge_request_widget/deployment/deployment_spec.js index f310f7669a9..74122f47ad3 100644 --- a/spec/frontend/vue_merge_request_widget/deployment/deployment_spec.js +++ b/spec/frontend/vue_merge_request_widget/deployment/deployment_spec.js @@ -32,10 +32,6 @@ describe('Deployment component', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('always renders DeploymentInfo', () => { expect(wrapper.findComponent(DeploymentInfo).exists()).toBe(true); }); diff --git a/spec/frontend/vue_merge_request_widget/deployment/deployment_view_button_spec.js b/spec/frontend/vue_merge_request_widget/deployment/deployment_view_button_spec.js index 8994fa522d0..7a151c26934 100644 --- a/spec/frontend/vue_merge_request_widget/deployment/deployment_view_button_spec.js +++ b/spec/frontend/vue_merge_request_widget/deployment/deployment_view_button_spec.js @@ -28,10 +28,6 @@ describe('Deployment View App button', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - const findReviewAppLink = () => wrapper.findComponent(ReviewAppLink); const findMrWigdetDeploymentDropdown = () => wrapper.findComponent(GlDropdown); const findMrWigdetDeploymentDropdownIcon = () => diff --git a/spec/frontend/vue_merge_request_widget/extensions/test_report/index_spec.js b/spec/frontend/vue_merge_request_widget/extensions/test_report/index_spec.js index 548b68bc103..d2d622d0534 100644 --- a/spec/frontend/vue_merge_request_widget/extensions/test_report/index_spec.js +++ b/spec/frontend/vue_merge_request_widget/extensions/test_report/index_spec.js @@ -73,7 +73,6 @@ describe('Test report extension', () => { }); afterEach(() => { - wrapper.destroy(); mock.restore(); }); diff --git a/spec/frontend/vue_merge_request_widget/extentions/accessibility/index_spec.js b/spec/frontend/vue_merge_request_widget/extentions/accessibility/index_spec.js index 01049e54a7f..40158917f52 100644 --- a/spec/frontend/vue_merge_request_widget/extentions/accessibility/index_spec.js +++ b/spec/frontend/vue_merge_request_widget/extentions/accessibility/index_spec.js @@ -39,7 +39,6 @@ describe('Accessibility extension', () => { }); afterEach(() => { - wrapper.destroy(); mock.restore(); }); diff --git a/spec/frontend/vue_merge_request_widget/extentions/code_quality/index_spec.js b/spec/frontend/vue_merge_request_widget/extentions/code_quality/index_spec.js index 67b327217ef..4b7870842bd 100644 --- a/spec/frontend/vue_merge_request_widget/extentions/code_quality/index_spec.js +++ b/spec/frontend/vue_merge_request_widget/extentions/code_quality/index_spec.js @@ -61,7 +61,6 @@ describe('Code Quality extension', () => { }); afterEach(() => { - wrapper.destroy(); mock.restore(); }); diff --git a/spec/frontend/vue_merge_request_widget/extentions/terraform/index_spec.js b/spec/frontend/vue_merge_request_widget/extentions/terraform/index_spec.js index 13384e1efca..52a244107bd 100644 --- a/spec/frontend/vue_merge_request_widget/extentions/terraform/index_spec.js +++ b/spec/frontend/vue_merge_request_widget/extentions/terraform/index_spec.js @@ -48,7 +48,6 @@ describe('Terraform extension', () => { }); afterEach(() => { - wrapper.destroy(); mock.restore(); }); diff --git a/spec/frontend/vue_merge_request_widget/mr_widget_how_to_merge_modal_spec.js b/spec/frontend/vue_merge_request_widget/mr_widget_how_to_merge_modal_spec.js index 015d394312a..20f1796008a 100644 --- a/spec/frontend/vue_merge_request_widget/mr_widget_how_to_merge_modal_spec.js +++ b/spec/frontend/vue_merge_request_widget/mr_widget_how_to_merge_modal_spec.js @@ -15,11 +15,6 @@ describe('MRWidgetHowToMerge', () => { }); } - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - beforeEach(() => { mountComponent(); }); diff --git a/spec/frontend/vue_merge_request_widget/mr_widget_options_spec.js b/spec/frontend/vue_merge_request_widget/mr_widget_options_spec.js index 608d513e64b..171ebbe8279 100644 --- a/spec/frontend/vue_merge_request_widget/mr_widget_options_spec.js +++ b/spec/frontend/vue_merge_request_widget/mr_widget_options_spec.js @@ -4,9 +4,9 @@ import MockAdapter from 'axios-mock-adapter'; import Vue, { nextTick } from 'vue'; import VueApollo from 'vue-apollo'; import * as Sentry from '@sentry/browser'; +import approvedByCurrentUser from 'test_fixtures/graphql/merge_requests/approvals/approvals.query.graphql.json'; import getStateQueryResponse from 'test_fixtures/graphql/merge_requests/get_state.query.graphql.json'; import readyToMergeResponse from 'test_fixtures/graphql/merge_requests/states/ready_to_merge.query.graphql.json'; -import approvedByCurrentUser from 'test_fixtures/graphql/merge_requests/approvals/approvals.query.graphql.json'; import createMockApollo from 'helpers/mock_apollo_helper'; import waitForPromises from 'helpers/wait_for_promises'; import { securityReportMergeRequestDownloadPathsQueryResponse } from 'jest/vue_shared/security_reports/mock_data'; @@ -85,8 +85,8 @@ describe('MrWidgetOptions', () => { afterEach(() => { mock.restore(); + // eslint-disable-next-line @gitlab/vtu-no-explicit-wrapper-destroy wrapper.destroy(); - gl.mrWidgetData = {}; gon.features = {}; }); diff --git a/spec/frontend/vue_shared/alert_details/alert_management_sidebar_todo_spec.js b/spec/frontend/vue_shared/alert_details/alert_management_sidebar_todo_spec.js index 12c5c190e26..217103ab25c 100644 --- a/spec/frontend/vue_shared/alert_details/alert_management_sidebar_todo_spec.js +++ b/spec/frontend/vue_shared/alert_details/alert_management_sidebar_todo_spec.js @@ -32,10 +32,6 @@ describe('Alert Details Sidebar To Do', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - const findToDoButton = () => wrapper.find('[data-testid="alert-todo-button"]'); describe('updating the alert to do', () => { diff --git a/spec/frontend/vue_shared/components/actions_button_spec.js b/spec/frontend/vue_shared/components/actions_button_spec.js index f3fb840b270..8c2f2b52f8e 100644 --- a/spec/frontend/vue_shared/components/actions_button_spec.js +++ b/spec/frontend/vue_shared/components/actions_button_spec.js @@ -34,10 +34,6 @@ describe('Actions button component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - const findButton = () => wrapper.findComponent(GlButton); const findTooltip = () => wrapper.findComponent(GlTooltip); const findDropdown = () => wrapper.findComponent(GlDropdown); diff --git a/spec/frontend/vue_shared/components/alert_details_table_spec.js b/spec/frontend/vue_shared/components/alert_details_table_spec.js index 8a9ee4699bd..8e7a10c4d77 100644 --- a/spec/frontend/vue_shared/components/alert_details_table_spec.js +++ b/spec/frontend/vue_shared/components/alert_details_table_spec.js @@ -41,11 +41,6 @@ describe('AlertDetails', () => { }); } - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findTableComponent = () => wrapper.findComponent(GlTable); const findTableKeys = () => findTableComponent().findAll('tbody td:first-child'); const findTableFieldValueByKey = (fieldKey) => diff --git a/spec/frontend/vue_shared/components/awards_list_spec.js b/spec/frontend/vue_shared/components/awards_list_spec.js index c7f9d8fd8d5..da5516f8db1 100644 --- a/spec/frontend/vue_shared/components/awards_list_spec.js +++ b/spec/frontend/vue_shared/components/awards_list_spec.js @@ -64,16 +64,7 @@ const REACTION_CONTROL_CLASSES = [ describe('vue_shared/components/awards_list', () => { let wrapper; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const createComponent = (props = {}) => { - if (wrapper) { - throw new Error('There should only be one wrapper created per test'); - } - wrapper = mount(AwardsList, { propsData: props }); }; const matchingEmojiTag = (name) => expect.stringMatching(`gl-emoji data-name="${name}"`); @@ -98,7 +89,6 @@ describe('vue_shared/components/awards_list', () => { addButtonClass: TEST_ADD_BUTTON_CLASS, }); }); - it('shows awards in correct order', () => { expect(findAwardsData()).toEqual([ { diff --git a/spec/frontend/vue_shared/components/blob_viewers/rich_viewer_spec.js b/spec/frontend/vue_shared/components/blob_viewers/rich_viewer_spec.js index ce7fd40937f..6acd1f51a86 100644 --- a/spec/frontend/vue_shared/components/blob_viewers/rich_viewer_spec.js +++ b/spec/frontend/vue_shared/components/blob_viewers/rich_viewer_spec.js @@ -24,10 +24,6 @@ describe('Blob Rich Viewer component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the passed content without transformations', () => { expect(wrapper.html()).toContain(content); }); diff --git a/spec/frontend/vue_shared/components/blob_viewers/simple_viewer_spec.js b/spec/frontend/vue_shared/components/blob_viewers/simple_viewer_spec.js index 4b44311b253..a480e0869e8 100644 --- a/spec/frontend/vue_shared/components/blob_viewers/simple_viewer_spec.js +++ b/spec/frontend/vue_shared/components/blob_viewers/simple_viewer_spec.js @@ -23,10 +23,6 @@ describe('Blob Simple Viewer component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - it('does not fail if content is empty', () => { const spy = jest.spyOn(window.console, 'error'); createComponent(''); diff --git a/spec/frontend/vue_shared/components/changed_file_icon_spec.js b/spec/frontend/vue_shared/components/changed_file_icon_spec.js index ea708b6f3fe..d1b1e58f5d7 100644 --- a/spec/frontend/vue_shared/components/changed_file_icon_spec.js +++ b/spec/frontend/vue_shared/components/changed_file_icon_spec.js @@ -21,10 +21,6 @@ describe('Changed file icon', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findIcon = () => wrapper.findComponent(GlIcon); const findIconName = () => findIcon().props('name'); const findIconClasses = () => findIcon().classes(); diff --git a/spec/frontend/vue_shared/components/chronic_duration_input_spec.js b/spec/frontend/vue_shared/components/chronic_duration_input_spec.js index 6932a812287..2a40511affb 100644 --- a/spec/frontend/vue_shared/components/chronic_duration_input_spec.js +++ b/spec/frontend/vue_shared/components/chronic_duration_input_spec.js @@ -10,8 +10,6 @@ describe('vue_shared/components/chronic_duration_input', () => { let hiddenElement; afterEach(() => { - wrapper.destroy(); - wrapper = null; textElement = null; hiddenElement = null; }); @@ -22,10 +20,6 @@ describe('vue_shared/components/chronic_duration_input', () => { }; const createComponent = (props = {}) => { - if (wrapper) { - throw new Error('There should only be one wrapper created per test'); - } - wrapper = mount(ChronicDurationInput, { propsData: props }); findComponents(); }; diff --git a/spec/frontend/vue_shared/components/ci_badge_link_spec.js b/spec/frontend/vue_shared/components/ci_badge_link_spec.js index 4f24ec2d015..afb509b9fe6 100644 --- a/spec/frontend/vue_shared/components/ci_badge_link_spec.js +++ b/spec/frontend/vue_shared/components/ci_badge_link_spec.js @@ -82,10 +82,6 @@ describe('CI Badge Link Component', () => { wrapper = shallowMount(CiBadgeLink, { propsData }); }; - afterEach(() => { - wrapper.destroy(); - }); - it.each(Object.keys(statuses))('should render badge for status: %s', (status) => { createComponent({ status: statuses[status] }); diff --git a/spec/frontend/vue_shared/components/ci_icon_spec.js b/spec/frontend/vue_shared/components/ci_icon_spec.js index 2064bee9673..31d63654168 100644 --- a/spec/frontend/vue_shared/components/ci_icon_spec.js +++ b/spec/frontend/vue_shared/components/ci_icon_spec.js @@ -7,11 +7,6 @@ describe('CI Icon component', () => { const findIconWrapper = () => wrapper.find('[data-testid="ci-icon-wrapper"]'); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('should render a span element with an svg', () => { wrapper = shallowMount(ciIcon, { propsData: { diff --git a/spec/frontend/vue_shared/components/clipboard_button_spec.js b/spec/frontend/vue_shared/components/clipboard_button_spec.js index b18b00e70bb..08a9c2a42d8 100644 --- a/spec/frontend/vue_shared/components/clipboard_button_spec.js +++ b/spec/frontend/vue_shared/components/clipboard_button_spec.js @@ -59,11 +59,6 @@ describe('clipboard button', () => { expect(wrapper.vm.$root.$emit).toHaveBeenCalledWith('bv::hide::tooltip', 'clipboard-button-1'); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('without gfm', () => { beforeEach(() => { createWrapper({ diff --git a/spec/frontend/vue_shared/components/clone_dropdown_spec.js b/spec/frontend/vue_shared/components/clone_dropdown_spec.js index 31c08260dd0..584e29d94c4 100644 --- a/spec/frontend/vue_shared/components/clone_dropdown_spec.js +++ b/spec/frontend/vue_shared/components/clone_dropdown_spec.js @@ -21,11 +21,6 @@ describe('Clone Dropdown Button', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('rendering', () => { it('matches the snapshot', () => { createComponent(); diff --git a/spec/frontend/vue_shared/components/code_block_highlighted_spec.js b/spec/frontend/vue_shared/components/code_block_highlighted_spec.js index 181692e61b5..25283eb1211 100644 --- a/spec/frontend/vue_shared/components/code_block_highlighted_spec.js +++ b/spec/frontend/vue_shared/components/code_block_highlighted_spec.js @@ -11,10 +11,6 @@ describe('Code Block Highlighted', () => { wrapper = shallowMount(CodeBlock, { propsData }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders highlighted code if language is supported', async () => { createComponent({ code, language: 'javascript' }); diff --git a/spec/frontend/vue_shared/components/code_block_spec.js b/spec/frontend/vue_shared/components/code_block_spec.js index 9a4dbcc47ff..0fdfb96cb23 100644 --- a/spec/frontend/vue_shared/components/code_block_spec.js +++ b/spec/frontend/vue_shared/components/code_block_spec.js @@ -13,10 +13,6 @@ describe('Code Block', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('overwrites the default slot', () => { createComponent({}, { default: 'DEFAULT SLOT' }); diff --git a/spec/frontend/vue_shared/components/color_picker/color_picker_spec.js b/spec/frontend/vue_shared/components/color_picker/color_picker_spec.js index 060048c4bbd..a839af3b709 100644 --- a/spec/frontend/vue_shared/components/color_picker/color_picker_spec.js +++ b/spec/frontend/vue_shared/components/color_picker/color_picker_spec.js @@ -34,10 +34,6 @@ describe('ColorPicker', () => { }; }); - afterEach(() => { - wrapper.destroy(); - }); - describe('label', () => { it('hides the label if the label is not passed', () => { createComponent(shallowMount); diff --git a/spec/frontend/vue_shared/components/color_select_dropdown/color_item_spec.js b/spec/frontend/vue_shared/components/color_select_dropdown/color_item_spec.js index fe614f03119..700556edfd5 100644 --- a/spec/frontend/vue_shared/components/color_select_dropdown/color_item_spec.js +++ b/spec/frontend/vue_shared/components/color_select_dropdown/color_item_spec.js @@ -20,10 +20,6 @@ describe('ColorItem', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the correct title', () => { expect(wrapper.text()).toBe(propsData.title); }); diff --git a/spec/frontend/vue_shared/components/color_select_dropdown/color_select_root_spec.js b/spec/frontend/vue_shared/components/color_select_dropdown/color_select_root_spec.js index 36fd87a8ce2..61a9ab3225e 100644 --- a/spec/frontend/vue_shared/components/color_select_dropdown/color_select_root_spec.js +++ b/spec/frontend/vue_shared/components/color_select_dropdown/color_select_root_spec.js @@ -60,10 +60,6 @@ describe('LabelsSelectRoot', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { const defaultClasses = ['labels-select-wrapper', 'gl-relative']; diff --git a/spec/frontend/vue_shared/components/color_select_dropdown/dropdown_contents_color_view_spec.js b/spec/frontend/vue_shared/components/color_select_dropdown/dropdown_contents_color_view_spec.js index 303824c77b3..914dfdbaab0 100644 --- a/spec/frontend/vue_shared/components/color_select_dropdown/dropdown_contents_color_view_spec.js +++ b/spec/frontend/vue_shared/components/color_select_dropdown/dropdown_contents_color_view_spec.js @@ -22,10 +22,6 @@ describe('DropdownContentsColorView', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - const findColors = () => wrapper.findAllComponents(ColorItem); const findColorList = () => wrapper.findComponent(GlDropdownForm); diff --git a/spec/frontend/vue_shared/components/color_select_dropdown/dropdown_contents_spec.js b/spec/frontend/vue_shared/components/color_select_dropdown/dropdown_contents_spec.js index ee4d3a2630a..c07faab20d0 100644 --- a/spec/frontend/vue_shared/components/color_select_dropdown/dropdown_contents_spec.js +++ b/spec/frontend/vue_shared/components/color_select_dropdown/dropdown_contents_spec.js @@ -28,10 +28,6 @@ describe('DropdownContent', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findColorView = () => wrapper.findComponent(DropdownContentsColorView); const findDropdownHeader = () => wrapper.findComponent(DropdownHeader); const findDropdown = () => wrapper.findComponent(GlDropdown); diff --git a/spec/frontend/vue_shared/components/color_select_dropdown/dropdown_header_spec.js b/spec/frontend/vue_shared/components/color_select_dropdown/dropdown_header_spec.js index d203d78477f..6c8aabe1c7f 100644 --- a/spec/frontend/vue_shared/components/color_select_dropdown/dropdown_header_spec.js +++ b/spec/frontend/vue_shared/components/color_select_dropdown/dropdown_header_spec.js @@ -15,10 +15,6 @@ describe('DropdownHeader', () => { const findButton = () => wrapper.findComponent(GlButton); - afterEach(() => { - wrapper.destroy(); - }); - beforeEach(() => { createComponent(); }); diff --git a/spec/frontend/vue_shared/components/color_select_dropdown/dropdown_value_spec.js b/spec/frontend/vue_shared/components/color_select_dropdown/dropdown_value_spec.js index 5bbdb136353..825f37c97e0 100644 --- a/spec/frontend/vue_shared/components/color_select_dropdown/dropdown_value_spec.js +++ b/spec/frontend/vue_shared/components/color_select_dropdown/dropdown_value_spec.js @@ -22,10 +22,6 @@ describe('DropdownValue', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('when there is a color set', () => { it('renders the color', () => { expect(findColorItems()).toHaveLength(2); diff --git a/spec/frontend/vue_shared/components/commit_spec.js b/spec/frontend/vue_shared/components/commit_spec.js index 1893e127f6f..62a2738d8df 100644 --- a/spec/frontend/vue_shared/components/commit_spec.js +++ b/spec/frontend/vue_shared/components/commit_spec.js @@ -24,10 +24,6 @@ describe('Commit component', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - it('should render a fork icon if it does not represent a tag', () => { createComponent({ tag: false, diff --git a/spec/frontend/vue_shared/components/confidentiality_badge_spec.js b/spec/frontend/vue_shared/components/confidentiality_badge_spec.js index 7f9e87bd0aa..92cd7597637 100644 --- a/spec/frontend/vue_shared/components/confidentiality_badge_spec.js +++ b/spec/frontend/vue_shared/components/confidentiality_badge_spec.js @@ -20,10 +20,6 @@ describe('ConfidentialityBadge', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it.each` workspaceType | issuableType | expectedTooltip ${WORKSPACE_PROJECT} | ${TYPE_ISSUE} | ${'Only project members with at least the Reporter role, the author, and assignees can view or be notified about this issue.'} diff --git a/spec/frontend/vue_shared/components/confirm_danger/confirm_danger_modal_spec.js b/spec/frontend/vue_shared/components/confirm_danger/confirm_danger_modal_spec.js index a660643d74f..b03b6bfb61d 100644 --- a/spec/frontend/vue_shared/components/confirm_danger/confirm_danger_modal_spec.js +++ b/spec/frontend/vue_shared/components/confirm_danger/confirm_danger_modal_spec.js @@ -42,10 +42,6 @@ describe('Confirm Danger Modal', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the default warning message', () => { expect(findDefaultWarning().text()).toBe(CONFIRM_DANGER_WARNING); }); diff --git a/spec/frontend/vue_shared/components/confirm_danger/confirm_danger_spec.js b/spec/frontend/vue_shared/components/confirm_danger/confirm_danger_spec.js index a179afccae0..379b5cde4d5 100644 --- a/spec/frontend/vue_shared/components/confirm_danger/confirm_danger_spec.js +++ b/spec/frontend/vue_shared/components/confirm_danger/confirm_danger_spec.js @@ -32,10 +32,6 @@ describe('Confirm Danger Modal', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the button', () => { expect(wrapper.html()).toContain(buttonText); }); diff --git a/spec/frontend/vue_shared/components/confirm_fork_modal_spec.js b/spec/frontend/vue_shared/components/confirm_fork_modal_spec.js index 1cde92cf522..fbfef5cbe46 100644 --- a/spec/frontend/vue_shared/components/confirm_fork_modal_spec.js +++ b/spec/frontend/vue_shared/components/confirm_fork_modal_spec.js @@ -21,10 +21,6 @@ describe('vue_shared/components/confirm_fork_modal', () => { }, }); - afterEach(() => { - wrapper.destroy(); - }); - describe('visible = false', () => { beforeEach(() => { wrapper = createComponent(); diff --git a/spec/frontend/vue_shared/components/confirm_modal_spec.js b/spec/frontend/vue_shared/components/confirm_modal_spec.js index c1e682a1aae..283ef52cee7 100644 --- a/spec/frontend/vue_shared/components/confirm_modal_spec.js +++ b/spec/frontend/vue_shared/components/confirm_modal_spec.js @@ -47,10 +47,6 @@ describe('vue_shared/components/confirm_modal', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findModal = () => wrapper.findComponent(GlModalStub); const findForm = () => wrapper.find('form'); const findFormData = () => diff --git a/spec/frontend/vue_shared/components/content_transition_spec.js b/spec/frontend/vue_shared/components/content_transition_spec.js index 8bb6d31cce7..5f2b1f096f3 100644 --- a/spec/frontend/vue_shared/components/content_transition_spec.js +++ b/spec/frontend/vue_shared/components/content_transition_spec.js @@ -13,11 +13,6 @@ const TEST_SLOTS = [ describe('~/vue_shared/components/content_transition.vue', () => { let wrapper; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const createComponent = (props = {}, slots = {}) => { wrapper = shallowMount(ContentTransition, { propsData: { diff --git a/spec/frontend/vue_shared/components/date_time_picker/date_time_picker_input_spec.js b/spec/frontend/vue_shared/components/date_time_picker/date_time_picker_input_spec.js index c1495e8264a..a3e5f187f9b 100644 --- a/spec/frontend/vue_shared/components/date_time_picker/date_time_picker_input_spec.js +++ b/spec/frontend/vue_shared/components/date_time_picker/date_time_picker_input_spec.js @@ -18,10 +18,6 @@ describe('DateTimePickerInput', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders label above the input', () => { createComponent({ label: inputLabel, diff --git a/spec/frontend/vue_shared/components/date_time_picker/date_time_picker_spec.js b/spec/frontend/vue_shared/components/date_time_picker/date_time_picker_spec.js index aa41df438d2..5620b569409 100644 --- a/spec/frontend/vue_shared/components/date_time_picker/date_time_picker_spec.js +++ b/spec/frontend/vue_shared/components/date_time_picker/date_time_picker_spec.js @@ -26,10 +26,6 @@ describe('DateTimePicker', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders dropdown toggle button with selected text', async () => { createComponent(); await nextTick(); diff --git a/spec/frontend/vue_shared/components/deployment_instance/deployment_instance_spec.js b/spec/frontend/vue_shared/components/deployment_instance/deployment_instance_spec.js index 79001b9282f..dde2540e121 100644 --- a/spec/frontend/vue_shared/components/deployment_instance/deployment_instance_spec.js +++ b/spec/frontend/vue_shared/components/deployment_instance/deployment_instance_spec.js @@ -17,10 +17,6 @@ describe('Deploy Board Instance', () => { }); describe('as a non-canary deployment', () => { - afterEach(() => { - wrapper.destroy(); - }); - it('should render a div with the correct css status and tooltip data', () => { wrapper = createComponent({ tooltipText: 'This is a pod', @@ -43,10 +39,6 @@ describe('Deploy Board Instance', () => { }); describe('as a canary deployment', () => { - afterEach(() => { - wrapper.destroy(); - }); - it('should render a div with canary class when stable prop is provided as false', async () => { wrapper = createComponent({ stable: false, @@ -58,10 +50,6 @@ describe('Deploy Board Instance', () => { }); describe('as a legend item', () => { - afterEach(() => { - wrapper.destroy(); - }); - it('should not have a tooltip', () => { wrapper = createComponent(); diff --git a/spec/frontend/vue_shared/components/design_management/design_note_pin_spec.js b/spec/frontend/vue_shared/components/design_management/design_note_pin_spec.js index 353d493add9..ca9c2b7d381 100644 --- a/spec/frontend/vue_shared/components/design_management/design_note_pin_spec.js +++ b/spec/frontend/vue_shared/components/design_management/design_note_pin_spec.js @@ -16,10 +16,6 @@ describe('Design note pin component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - it('should match the snapshot of note without index', () => { createComponent(); expect(wrapper.element).toMatchSnapshot(); diff --git a/spec/frontend/vue_shared/components/diff_stats_dropdown_spec.js b/spec/frontend/vue_shared/components/diff_stats_dropdown_spec.js index 99c973bdd26..930d2fc8cfe 100644 --- a/spec/frontend/vue_shared/components/diff_stats_dropdown_spec.js +++ b/spec/frontend/vue_shared/components/diff_stats_dropdown_spec.js @@ -110,10 +110,6 @@ describe('Diff Stats Dropdown', () => { createComponent({ changed, added, deleted }); }); - afterEach(() => { - wrapper.destroy(); - }); - it(`dropdown header should be '${expectedDropdownHeader}'`, () => { expect(findChanged().props('text')).toBe(expectedDropdownHeader); }); diff --git a/spec/frontend/vue_shared/components/diff_viewer/diff_viewer_spec.js b/spec/frontend/vue_shared/components/diff_viewer/diff_viewer_spec.js index 6e0717c29d7..694c69fbe9f 100644 --- a/spec/frontend/vue_shared/components/diff_viewer/diff_viewer_spec.js +++ b/spec/frontend/vue_shared/components/diff_viewer/diff_viewer_spec.js @@ -18,10 +18,6 @@ describe('DiffViewer', () => { wrapper = mount(DiffViewer, { propsData }); } - afterEach(() => { - wrapper.destroy(); - }); - it('renders image diff', () => { window.gon = { relative_url_root: '', diff --git a/spec/frontend/vue_shared/components/diff_viewer/viewers/image_diff_viewer_spec.js b/spec/frontend/vue_shared/components/diff_viewer/viewers/image_diff_viewer_spec.js index 16f924b44d8..7863ef45817 100644 --- a/spec/frontend/vue_shared/components/diff_viewer/viewers/image_diff_viewer_spec.js +++ b/spec/frontend/vue_shared/components/diff_viewer/viewers/image_diff_viewer_spec.js @@ -42,10 +42,6 @@ describe('ImageDiffViewer component', () => { triggerEvent('mouseup', doc.body); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders image diff for replaced', () => { createComponent(allProps); const metaInfoElements = wrapper.findAll('.image-info'); diff --git a/spec/frontend/vue_shared/components/diff_viewer/viewers/mode_changed_spec.js b/spec/frontend/vue_shared/components/diff_viewer/viewers/mode_changed_spec.js index c4358f0d9cb..661db19ff0e 100644 --- a/spec/frontend/vue_shared/components/diff_viewer/viewers/mode_changed_spec.js +++ b/spec/frontend/vue_shared/components/diff_viewer/viewers/mode_changed_spec.js @@ -13,10 +13,6 @@ describe('Diff viewer mode changed component', () => { }); }); - afterEach(() => { - vm.destroy(); - }); - it('renders aMode & bMode', () => { expect(vm.text()).toContain('File mode changed from 123 to 321'); }); diff --git a/spec/frontend/vue_shared/components/dismissible_alert_spec.js b/spec/frontend/vue_shared/components/dismissible_alert_spec.js index 8b1189f25d5..53e7d9fc7fc 100644 --- a/spec/frontend/vue_shared/components/dismissible_alert_spec.js +++ b/spec/frontend/vue_shared/components/dismissible_alert_spec.js @@ -16,10 +16,6 @@ describe('vue_shared/components/dismissible_alert', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findAlert = () => wrapper.findComponent(GlAlert); describe('default', () => { diff --git a/spec/frontend/vue_shared/components/dismissible_container_spec.js b/spec/frontend/vue_shared/components/dismissible_container_spec.js index 7d8581e11e9..6d179434d1d 100644 --- a/spec/frontend/vue_shared/components/dismissible_container_spec.js +++ b/spec/frontend/vue_shared/components/dismissible_container_spec.js @@ -11,10 +11,6 @@ describe('DismissibleContainer', () => { featureId: 'some-feature-id', }; - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { const findBtn = () => wrapper.find('[data-testid="close"]'); let mockAxios; diff --git a/spec/frontend/vue_shared/components/dismissible_feedback_alert_spec.js b/spec/frontend/vue_shared/components/dismissible_feedback_alert_spec.js index 4b32fbffebe..b184ec4ac54 100644 --- a/spec/frontend/vue_shared/components/dismissible_feedback_alert_spec.js +++ b/spec/frontend/vue_shared/components/dismissible_feedback_alert_spec.js @@ -23,11 +23,6 @@ describe('Dismissible Feedback Alert', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const createFullComponent = () => createComponent({ mountFn: mount }); const findAlert = () => wrapper.findComponent(GlAlert); diff --git a/spec/frontend/vue_shared/components/dom_element_listener_spec.js b/spec/frontend/vue_shared/components/dom_element_listener_spec.js index a848c34b7ce..d31e9b867e4 100644 --- a/spec/frontend/vue_shared/components/dom_element_listener_spec.js +++ b/spec/frontend/vue_shared/components/dom_element_listener_spec.js @@ -42,10 +42,6 @@ describe('~/vue_shared/components/dom_element_listener.vue', () => { }; }); - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/vue_shared/components/dropdown/dropdown_button_spec.js b/spec/frontend/vue_shared/components/dropdown/dropdown_button_spec.js index e34ed31b4bf..82130500458 100644 --- a/spec/frontend/vue_shared/components/dropdown/dropdown_button_spec.js +++ b/spec/frontend/vue_shared/components/dropdown/dropdown_button_spec.js @@ -11,10 +11,6 @@ describe('DropdownButton component', () => { wrapper = mount(DropdownButton, { propsData: props, slots }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('computed', () => { describe('dropdownToggleText', () => { it('returns default toggle text', () => { diff --git a/spec/frontend/vue_shared/components/dropdown/dropdown_widget_spec.js b/spec/frontend/vue_shared/components/dropdown/dropdown_widget_spec.js index e2640de1f94..4dfee20764c 100644 --- a/spec/frontend/vue_shared/components/dropdown/dropdown_widget_spec.js +++ b/spec/frontend/vue_shared/components/dropdown/dropdown_widget_spec.js @@ -38,11 +38,6 @@ describe('DropdownWidget component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('passes default selectText prop to dropdown', () => { expect(findDropdown().props('text')).toBe('Select'); }); diff --git a/spec/frontend/vue_shared/components/dropdown_keyboard_navigation_spec.js b/spec/frontend/vue_shared/components/dropdown_keyboard_navigation_spec.js index 119d6448507..ef42c17984a 100644 --- a/spec/frontend/vue_shared/components/dropdown_keyboard_navigation_spec.js +++ b/spec/frontend/vue_shared/components/dropdown_keyboard_navigation_spec.js @@ -39,10 +39,6 @@ describe('DropdownKeyboardNavigation', () => { }, }; - afterEach(() => { - wrapper.destroy(); - }); - describe('onInit', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/vue_shared/components/ensure_data_spec.js b/spec/frontend/vue_shared/components/ensure_data_spec.js index eef8b452f5f..217e795bc64 100644 --- a/spec/frontend/vue_shared/components/ensure_data_spec.js +++ b/spec/frontend/vue_shared/components/ensure_data_spec.js @@ -59,7 +59,6 @@ describe('EnsureData', () => { }); afterEach(() => { - wrapper.destroy(); Sentry.captureException.mockClear(); }); diff --git a/spec/frontend/vue_shared/components/expand_button_spec.js b/spec/frontend/vue_shared/components/expand_button_spec.js index 170c947e520..ad2a57d90eb 100644 --- a/spec/frontend/vue_shared/components/expand_button_spec.js +++ b/spec/frontend/vue_shared/components/expand_button_spec.js @@ -27,10 +27,6 @@ describe('Expand button', () => { }); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the prepended collapse button', () => { expect(expanderPrependEl().isVisible()).toBe(true); expect(expanderAppendEl().isVisible()).toBe(false); diff --git a/spec/frontend/vue_shared/components/file_finder/item_spec.js b/spec/frontend/vue_shared/components/file_finder/item_spec.js index f0998b1b5c6..dce6c85b5b3 100644 --- a/spec/frontend/vue_shared/components/file_finder/item_spec.js +++ b/spec/frontend/vue_shared/components/file_finder/item_spec.js @@ -22,10 +22,6 @@ describe('File finder item spec', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders file name & path', () => { createComponent(); diff --git a/spec/frontend/vue_shared/components/file_icon_spec.js b/spec/frontend/vue_shared/components/file_icon_spec.js index 0fcc0678c13..d95773f2218 100644 --- a/spec/frontend/vue_shared/components/file_icon_spec.js +++ b/spec/frontend/vue_shared/components/file_icon_spec.js @@ -16,10 +16,6 @@ describe('File Icon component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('should render a span element and an icon', () => { createComponent({ fileName: 'test.js', diff --git a/spec/frontend/vue_shared/components/file_row_header_spec.js b/spec/frontend/vue_shared/components/file_row_header_spec.js index 7aea581fe51..885a80f73b5 100644 --- a/spec/frontend/vue_shared/components/file_row_header_spec.js +++ b/spec/frontend/vue_shared/components/file_row_header_spec.js @@ -13,10 +13,6 @@ describe('File row header component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - it('renders file path', () => { const path = 'app/assets'; createComponent(path); diff --git a/spec/frontend/vue_shared/components/file_row_spec.js b/spec/frontend/vue_shared/components/file_row_spec.js index 25129ba4cd2..976866af27c 100644 --- a/spec/frontend/vue_shared/components/file_row_spec.js +++ b/spec/frontend/vue_shared/components/file_row_spec.js @@ -21,10 +21,6 @@ describe('File row component', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - it('renders name', () => { const fileName = 't4'; createComponent({ diff --git a/spec/frontend/vue_shared/components/file_tree_spec.js b/spec/frontend/vue_shared/components/file_tree_spec.js index e8818e09dc0..9d2fa369910 100644 --- a/spec/frontend/vue_shared/components/file_tree_spec.js +++ b/spec/frontend/vue_shared/components/file_tree_spec.js @@ -33,10 +33,6 @@ describe('File Tree component', () => { ...pick(x.attributes(), Object.keys(TEST_EXTA_ARGS)), })); - afterEach(() => { - wrapper.destroy(); - }); - describe('file row component', () => { beforeEach(() => { createComponent({ file: {} }); diff --git a/spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_bar_root_spec.js b/spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_bar_root_spec.js index b0e393bbf5e..123714353e2 100644 --- a/spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_bar_root_spec.js +++ b/spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_bar_root_spec.js @@ -82,10 +82,6 @@ describe('FilteredSearchBarRoot', () => { wrapper = createComponent({ sortOptions: mockSortOptions }); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('data', () => { it('initializes `filterValue`, `selectedSortOption` and `selectedSortDirection` data props and displays the sort dropdown', () => { expect(wrapper.vm.filterValue).toEqual([]); diff --git a/spec/frontend/vue_shared/components/filtered_search_bar/tokens/base_token_spec.js b/spec/frontend/vue_shared/components/filtered_search_bar/tokens/base_token_spec.js index 164235e4bb9..9941abbfaea 100644 --- a/spec/frontend/vue_shared/components/filtered_search_bar/tokens/base_token_spec.js +++ b/spec/frontend/vue_shared/components/filtered_search_bar/tokens/base_token_spec.js @@ -120,10 +120,6 @@ describe('BaseToken', () => { const getMockSuggestionListSuggestions = () => JSON.parse(findMockSuggestionList().attributes('data-suggestions')); - afterEach(() => { - wrapper.destroy(); - }); - describe('data', () => { it('calls `getRecentlyUsedSuggestions` to populate `recentSuggestions` when `recentSuggestionsStorageKey` is defined', () => { wrapper = createComponent(); diff --git a/spec/frontend/vue_shared/components/filtered_search_bar/tokens/crm_contact_token_spec.js b/spec/frontend/vue_shared/components/filtered_search_bar/tokens/crm_contact_token_spec.js index 0faac554ae1..ce134f7d24e 100644 --- a/spec/frontend/vue_shared/components/filtered_search_bar/tokens/crm_contact_token_spec.js +++ b/spec/frontend/vue_shared/components/filtered_search_bar/tokens/crm_contact_token_spec.js @@ -79,7 +79,6 @@ describe('CrmContactToken', () => { }; afterEach(() => { - wrapper.destroy(); fakeApollo = null; }); diff --git a/spec/frontend/vue_shared/components/filtered_search_bar/tokens/crm_organization_token_spec.js b/spec/frontend/vue_shared/components/filtered_search_bar/tokens/crm_organization_token_spec.js index ff176c5bb47..8526631c63d 100644 --- a/spec/frontend/vue_shared/components/filtered_search_bar/tokens/crm_organization_token_spec.js +++ b/spec/frontend/vue_shared/components/filtered_search_bar/tokens/crm_organization_token_spec.js @@ -78,7 +78,6 @@ describe('CrmOrganizationToken', () => { }; afterEach(() => { - wrapper.destroy(); fakeApollo = null; }); diff --git a/spec/frontend/vue_shared/components/filtered_search_bar/tokens/release_token_spec.js b/spec/frontend/vue_shared/components/filtered_search_bar/tokens/release_token_spec.js index 1d564597969..5190ab919b1 100644 --- a/spec/frontend/vue_shared/components/filtered_search_bar/tokens/release_token_spec.js +++ b/spec/frontend/vue_shared/components/filtered_search_bar/tokens/release_token_spec.js @@ -27,10 +27,6 @@ describe('ReleaseToken', () => { }, }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders release value', async () => { wrapper = createComponent({ value: { data: id } }); await nextTick(); diff --git a/spec/frontend/vue_shared/components/form/form_footer_actions_spec.js b/spec/frontend/vue_shared/components/form/form_footer_actions_spec.js index 361b162b6a0..eee8a0c4532 100644 --- a/spec/frontend/vue_shared/components/form/form_footer_actions_spec.js +++ b/spec/frontend/vue_shared/components/form/form_footer_actions_spec.js @@ -10,10 +10,6 @@ describe('Form Footer Actions', () => { }); } - afterEach(() => { - wrapper.destroy(); - }); - it('renders content properly', () => { const defaultSlot = 'Foo'; const prepend = 'Bar'; diff --git a/spec/frontend/vue_shared/components/form/input_copy_toggle_visibility_spec.js b/spec/frontend/vue_shared/components/form/input_copy_toggle_visibility_spec.js index ae4f3156e2c..4f1603f93ba 100644 --- a/spec/frontend/vue_shared/components/form/input_copy_toggle_visibility_spec.js +++ b/spec/frontend/vue_shared/components/form/input_copy_toggle_visibility_spec.js @@ -10,10 +10,6 @@ import { mountExtended } from 'helpers/vue_test_utils_helper'; describe('InputCopyToggleVisibility', () => { let wrapper; - afterEach(() => { - wrapper.destroy(); - }); - const valueProp = 'hR8x1fuJbzwu5uFKLf9e'; const createComponent = (options = {}) => { diff --git a/spec/frontend/vue_shared/components/form/title_spec.js b/spec/frontend/vue_shared/components/form/title_spec.js index 452f3723e76..d499f847c72 100644 --- a/spec/frontend/vue_shared/components/form/title_spec.js +++ b/spec/frontend/vue_shared/components/form/title_spec.js @@ -12,10 +12,6 @@ describe('Title edit field', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('matches the snapshot', () => { expect(wrapper.element).toMatchSnapshot(); }); diff --git a/spec/frontend/vue_shared/components/gl_countdown_spec.js b/spec/frontend/vue_shared/components/gl_countdown_spec.js index af53d256236..1de206123fe 100644 --- a/spec/frontend/vue_shared/components/gl_countdown_spec.js +++ b/spec/frontend/vue_shared/components/gl_countdown_spec.js @@ -10,10 +10,6 @@ describe('GlCountdown', () => { jest.spyOn(Date, 'now').mockImplementation(() => new Date(now).getTime()); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('when there is time remaining', () => { beforeEach(async () => { wrapper = mount(GlCountdown, { diff --git a/spec/frontend/vue_shared/components/header_ci_component_spec.js b/spec/frontend/vue_shared/components/header_ci_component_spec.js index 458f2cc5374..da9bc0f8a2f 100644 --- a/spec/frontend/vue_shared/components/header_ci_component_spec.js +++ b/spec/frontend/vue_shared/components/header_ci_component_spec.js @@ -48,11 +48,6 @@ describe('Header CI Component', () => { ); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('render', () => { beforeEach(() => { createComponent({ itemName: 'Pipeline' }); diff --git a/spec/frontend/vue_shared/components/help_popover_spec.js b/spec/frontend/vue_shared/components/help_popover_spec.js index 77c03dc0c3c..76e66d07fa0 100644 --- a/spec/frontend/vue_shared/components/help_popover_spec.js +++ b/spec/frontend/vue_shared/components/help_popover_spec.js @@ -23,10 +23,6 @@ describe('HelpPopover', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('with title and content', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/vue_shared/components/integration_help_text_spec.js b/spec/frontend/vue_shared/components/integration_help_text_spec.js index c63e46313b3..dd20b09f176 100644 --- a/spec/frontend/vue_shared/components/integration_help_text_spec.js +++ b/spec/frontend/vue_shared/components/integration_help_text_spec.js @@ -22,11 +22,6 @@ describe('IntegrationHelpText component', () => { }); } - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('should use the gl components', () => { wrapper = createComponent(); diff --git a/spec/frontend/vue_shared/components/keep_alive_slots_spec.js b/spec/frontend/vue_shared/components/keep_alive_slots_spec.js index 10c6cbe6d94..f69a883ee4d 100644 --- a/spec/frontend/vue_shared/components/keep_alive_slots_spec.js +++ b/spec/frontend/vue_shared/components/keep_alive_slots_spec.js @@ -37,10 +37,6 @@ describe('~/vue_shared/components/keep_alive_slots.vue', () => { isVisible: x.isVisible(), })); - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/vue_shared/components/local_storage_sync_spec.js b/spec/frontend/vue_shared/components/local_storage_sync_spec.js index a80717a1aea..1c7f419b118 100644 --- a/spec/frontend/vue_shared/components/local_storage_sync_spec.js +++ b/spec/frontend/vue_shared/components/local_storage_sync_spec.js @@ -17,7 +17,6 @@ describe('Local Storage Sync', () => { const getStorageValue = (value) => localStorage.getItem(STORAGE_KEY, value); afterEach(() => { - wrapper.destroy(); localStorage.clear(); }); diff --git a/spec/frontend/vue_shared/components/markdown/apply_suggestion_spec.js b/spec/frontend/vue_shared/components/markdown/apply_suggestion_spec.js index ecb2b37c3a5..8aab867f32a 100644 --- a/spec/frontend/vue_shared/components/markdown/apply_suggestion_spec.js +++ b/spec/frontend/vue_shared/components/markdown/apply_suggestion_spec.js @@ -17,11 +17,6 @@ describe('Apply Suggestion component', () => { beforeEach(() => createWrapper()); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('initial template', () => { it('renders a dropdown with the correct props', () => { const dropdown = findDropdown(); diff --git a/spec/frontend/vue_shared/components/markdown/drawio_toolbar_button_spec.js b/spec/frontend/vue_shared/components/markdown/drawio_toolbar_button_spec.js index 4daf26b0509..67f296b1bf0 100644 --- a/spec/frontend/vue_shared/components/markdown/drawio_toolbar_button_spec.js +++ b/spec/frontend/vue_shared/components/markdown/drawio_toolbar_button_spec.js @@ -30,7 +30,6 @@ describe('vue_shared/components/markdown/drawio_toolbar_button', () => { afterEach(() => { textArea.remove(); - wrapper.destroy(); }); describe('default', () => { diff --git a/spec/frontend/vue_shared/components/markdown/editor_mode_dropdown_spec.js b/spec/frontend/vue_shared/components/markdown/editor_mode_dropdown_spec.js index 34071775b9c..d6ecc355a63 100644 --- a/spec/frontend/vue_shared/components/markdown/editor_mode_dropdown_spec.js +++ b/spec/frontend/vue_shared/components/markdown/editor_mode_dropdown_spec.js @@ -21,10 +21,6 @@ describe('vue_shared/component/markdown/editor_mode_dropdown', () => { .filter((item) => item.text().startsWith(text)) .at(0); - afterEach(() => { - wrapper.destroy(); - }); - describe.each` modeText | value | dropdownText | otherMode ${'Rich text'} | ${'richText'} | ${'View markdown'} | ${'Markdown'} diff --git a/spec/frontend/vue_shared/components/markdown/field_view_spec.js b/spec/frontend/vue_shared/components/markdown/field_view_spec.js index 176ccfc5a69..1bbbe0896f2 100644 --- a/spec/frontend/vue_shared/components/markdown/field_view_spec.js +++ b/spec/frontend/vue_shared/components/markdown/field_view_spec.js @@ -6,20 +6,14 @@ import { renderGFM } from '~/behaviors/markdown/render_gfm'; jest.mock('~/behaviors/markdown/render_gfm'); describe('Markdown Field View component', () => { - let wrapper; - function createComponent() { - wrapper = shallowMount(MarkdownFieldView); + shallowMount(MarkdownFieldView); } beforeEach(() => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('processes rendering with GFM', () => { expect(renderGFM).toHaveBeenCalledTimes(1); }); diff --git a/spec/frontend/vue_shared/components/markdown/header_spec.js b/spec/frontend/vue_shared/components/markdown/header_spec.js index 988d9780505..68f05e5119d 100644 --- a/spec/frontend/vue_shared/components/markdown/header_spec.js +++ b/spec/frontend/vue_shared/components/markdown/header_spec.js @@ -39,10 +39,6 @@ describe('Markdown field header component', () => { createWrapper(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('markdown header buttons', () => { it('renders the buttons with the correct title', () => { const buttons = [ diff --git a/spec/frontend/vue_shared/components/markdown/markdown_editor_spec.js b/spec/frontend/vue_shared/components/markdown/markdown_editor_spec.js index fa183cc64ef..3e3dd3bcc88 100644 --- a/spec/frontend/vue_shared/components/markdown/markdown_editor_spec.js +++ b/spec/frontend/vue_shared/components/markdown/markdown_editor_spec.js @@ -63,7 +63,6 @@ describe('vue_shared/component/markdown/markdown_editor', () => { }); afterEach(() => { - wrapper.destroy(); mock.restore(); }); diff --git a/spec/frontend/vue_shared/components/markdown/suggestion_diff_header_spec.js b/spec/frontend/vue_shared/components/markdown/suggestion_diff_header_spec.js index c2360773a65..9768bc7a6dd 100644 --- a/spec/frontend/vue_shared/components/markdown/suggestion_diff_header_spec.js +++ b/spec/frontend/vue_shared/components/markdown/suggestion_diff_header_spec.js @@ -34,10 +34,6 @@ describe('Suggestion Diff component', () => { window.gon.current_user_id = 1; }); - afterEach(() => { - wrapper.destroy(); - }); - const findApplyButton = () => wrapper.findComponent(ApplySuggestion); const findApplyBatchButton = () => wrapper.find('.js-apply-batch-btn'); const findAddToBatchButton = () => wrapper.find('.js-add-to-batch-btn'); diff --git a/spec/frontend/vue_shared/components/markdown/suggestion_diff_row_spec.js b/spec/frontend/vue_shared/components/markdown/suggestion_diff_row_spec.js index f9a8b64f89b..c46a2d3e117 100644 --- a/spec/frontend/vue_shared/components/markdown/suggestion_diff_row_spec.js +++ b/spec/frontend/vue_shared/components/markdown/suggestion_diff_row_spec.js @@ -36,10 +36,6 @@ describe('SuggestionDiffRow', () => { const findNewLineWrapper = () => wrapper.find('.new_line'); const findSuggestionContent = () => wrapper.find('[data-testid="suggestion-diff-content"]'); - afterEach(() => { - wrapper.destroy(); - }); - describe('renders correctly', () => { it('renders the correct base suggestion markup', () => { factory({ diff --git a/spec/frontend/vue_shared/components/markdown/suggestion_diff_spec.js b/spec/frontend/vue_shared/components/markdown/suggestion_diff_spec.js index d84483c1663..8c7f51664ad 100644 --- a/spec/frontend/vue_shared/components/markdown/suggestion_diff_spec.js +++ b/spec/frontend/vue_shared/components/markdown/suggestion_diff_spec.js @@ -61,11 +61,6 @@ describe('Suggestion Diff component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('matches snapshot', () => { expect(wrapper.element).toMatchSnapshot(); }); diff --git a/spec/frontend/vue_shared/components/markdown/toolbar_button_spec.js b/spec/frontend/vue_shared/components/markdown/toolbar_button_spec.js index 82210e79799..33e9d6add99 100644 --- a/spec/frontend/vue_shared/components/markdown/toolbar_button_spec.js +++ b/spec/frontend/vue_shared/components/markdown/toolbar_button_spec.js @@ -20,11 +20,6 @@ describe('toolbar_button', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const getButtonShortcutsAttr = () => { return wrapper.findComponent(GlButton).attributes('data-md-shortcuts'); }; diff --git a/spec/frontend/vue_shared/components/markdown/toolbar_spec.js b/spec/frontend/vue_shared/components/markdown/toolbar_spec.js index b1a1dbbeb7a..fea14f80496 100644 --- a/spec/frontend/vue_shared/components/markdown/toolbar_spec.js +++ b/spec/frontend/vue_shared/components/markdown/toolbar_spec.js @@ -11,10 +11,6 @@ describe('toolbar', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('user can attach file', () => { beforeEach(() => { createMountedWrapper(); diff --git a/spec/frontend/vue_shared/components/markdown_drawer/markdown_drawer_spec.js b/spec/frontend/vue_shared/components/markdown_drawer/markdown_drawer_spec.js index 2b311b75f85..37b0767616a 100644 --- a/spec/frontend/vue_shared/components/markdown_drawer/markdown_drawer_spec.js +++ b/spec/frontend/vue_shared/components/markdown_drawer/markdown_drawer_spec.js @@ -36,8 +36,6 @@ describe('MarkdownDrawer', () => { }; afterEach(() => { - wrapper.destroy(); - wrapper = null; Object.keys(cache).forEach((key) => delete cache[key]); }); diff --git a/spec/frontend/vue_shared/components/memory_graph_spec.js b/spec/frontend/vue_shared/components/memory_graph_spec.js index ae8d5ff78ba..c3ad6bb8ca6 100644 --- a/spec/frontend/vue_shared/components/memory_graph_spec.js +++ b/spec/frontend/vue_shared/components/memory_graph_spec.js @@ -13,10 +13,6 @@ describe('MemoryGraph', () => { [1573586433.853, '3.0066964285714284'], ]; - afterEach(() => { - wrapper.destroy(); - }); - beforeEach(() => { wrapper = shallowMount(Component, { propsData: { diff --git a/spec/frontend/vue_shared/components/modal_copy_button_spec.js b/spec/frontend/vue_shared/components/modal_copy_button_spec.js index 61e4e774420..a649b06c50e 100644 --- a/spec/frontend/vue_shared/components/modal_copy_button_spec.js +++ b/spec/frontend/vue_shared/components/modal_copy_button_spec.js @@ -6,10 +6,6 @@ import ModalCopyButton from '~/vue_shared/components/modal_copy_button.vue'; describe('modal copy button', () => { let wrapper; - afterEach(() => { - wrapper.destroy(); - }); - beforeEach(() => { wrapper = shallowMount(ModalCopyButton, { propsData: { diff --git a/spec/frontend/vue_shared/components/navigation_tabs_spec.js b/spec/frontend/vue_shared/components/navigation_tabs_spec.js index b1bec28bffb..947ee756259 100644 --- a/spec/frontend/vue_shared/components/navigation_tabs_spec.js +++ b/spec/frontend/vue_shared/components/navigation_tabs_spec.js @@ -38,11 +38,6 @@ describe('navigation tabs component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('should render tabs', () => { expect(wrapper.findAllComponents(GlTab)).toHaveLength(data.length); }); diff --git a/spec/frontend/vue_shared/components/notes/noteable_warning_spec.js b/spec/frontend/vue_shared/components/notes/noteable_warning_spec.js index 17a62ae8a33..f87674246d1 100644 --- a/spec/frontend/vue_shared/components/notes/noteable_warning_spec.js +++ b/spec/frontend/vue_shared/components/notes/noteable_warning_spec.js @@ -132,12 +132,6 @@ describe('Issue Warning Component', () => { }); }); - afterEach(() => { - wrapperLocked.destroy(); - wrapperConfidential.destroy(); - wrapperLockedAndConfidential.destroy(); - }); - it('renders confidential & locked messages with noteable "issue"', () => { expect(findLockedBlock(wrapperLocked).text()).toContain('This issue is locked.'); expect(findConfidentialBlock(wrapperConfidential).text()).toContain( diff --git a/spec/frontend/vue_shared/components/notes/placeholder_note_spec.js b/spec/frontend/vue_shared/components/notes/placeholder_note_spec.js index 8f9f1bb336f..7e669fb7c71 100644 --- a/spec/frontend/vue_shared/components/notes/placeholder_note_spec.js +++ b/spec/frontend/vue_shared/components/notes/placeholder_note_spec.js @@ -30,11 +30,6 @@ describe('Issue placeholder note component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('matches snapshot', () => { createComponent(); diff --git a/spec/frontend/vue_shared/components/notes/placeholder_system_note_spec.js b/spec/frontend/vue_shared/components/notes/placeholder_system_note_spec.js index de6ab43bc41..5897b9e0ffc 100644 --- a/spec/frontend/vue_shared/components/notes/placeholder_system_note_spec.js +++ b/spec/frontend/vue_shared/components/notes/placeholder_system_note_spec.js @@ -12,11 +12,6 @@ describe('Placeholder system note component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('matches snapshot', () => { createComponent(); diff --git a/spec/frontend/vue_shared/components/notes/system_note_spec.js b/spec/frontend/vue_shared/components/notes/system_note_spec.js index bcfd7a8ec70..29e1a9ccf4d 100644 --- a/spec/frontend/vue_shared/components/notes/system_note_spec.js +++ b/spec/frontend/vue_shared/components/notes/system_note_spec.js @@ -46,7 +46,6 @@ describe('system note component', () => { }); afterEach(() => { - vm.destroy(); mock.restore(); }); diff --git a/spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js b/spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js index bd4b6a463ab..fa9d3cd28a9 100644 --- a/spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js +++ b/spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js @@ -10,10 +10,6 @@ describe(`TimelineEntryItem`, () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders correctly', () => { factory(); diff --git a/spec/frontend/vue_shared/components/ordered_layout_spec.js b/spec/frontend/vue_shared/components/ordered_layout_spec.js index 21588569d6a..b6c8c467028 100644 --- a/spec/frontend/vue_shared/components/ordered_layout_spec.js +++ b/spec/frontend/vue_shared/components/ordered_layout_spec.js @@ -37,10 +37,6 @@ describe('Ordered Layout', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when slotKeys are in initial slot order', () => { beforeEach(() => { createComponent({ slotKeys: regularSlotOrder }); diff --git a/spec/frontend/vue_shared/components/page_size_selector_spec.js b/spec/frontend/vue_shared/components/page_size_selector_spec.js index 5ec0b863afd..fce7ceee2fe 100644 --- a/spec/frontend/vue_shared/components/page_size_selector_spec.js +++ b/spec/frontend/vue_shared/components/page_size_selector_spec.js @@ -14,10 +14,6 @@ describe('Page size selector component', () => { const findDropdown = () => wrapper.findComponent(GlDropdown); const findDropdownItems = () => wrapper.findAllComponents(GlDropdownItem); - afterEach(() => { - wrapper.destroy(); - }); - it.each(PAGE_SIZES)('shows expected text in the dropdown button for page size %s', (pageSize) => { createWrapper({ pageSize }); diff --git a/spec/frontend/vue_shared/components/paginated_list_spec.js b/spec/frontend/vue_shared/components/paginated_list_spec.js index ae9c920ebd2..fc9adab2e2b 100644 --- a/spec/frontend/vue_shared/components/paginated_list_spec.js +++ b/spec/frontend/vue_shared/components/paginated_list_spec.js @@ -33,10 +33,6 @@ describe('Pagination links component', () => { [glPaginatedList] = wrapper.vm.$children; }); - afterEach(() => { - wrapper.destroy(); - }); - describe('Paginated List Component', () => { describe('props', () => { // We test attrs and not props because we pass through to child component using v-bind:"$attrs" diff --git a/spec/frontend/vue_shared/components/pagination_bar/pagination_bar_spec.js b/spec/frontend/vue_shared/components/pagination_bar/pagination_bar_spec.js index 112cdaf74c6..2a1a6342c38 100644 --- a/spec/frontend/vue_shared/components/pagination_bar/pagination_bar_spec.js +++ b/spec/frontend/vue_shared/components/pagination_bar/pagination_bar_spec.js @@ -25,10 +25,6 @@ describe('Pagination bar', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('events', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/vue_shared/components/pagination_links_spec.js b/spec/frontend/vue_shared/components/pagination_links_spec.js index d444ad7a733..99a4f776305 100644 --- a/spec/frontend/vue_shared/components/pagination_links_spec.js +++ b/spec/frontend/vue_shared/components/pagination_links_spec.js @@ -44,10 +44,6 @@ describe('Pagination links component', () => { glPagination = wrapper.findComponent(GlPagination); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should provide translated text to GitLab UI pagination', () => { Object.entries(translations).forEach((entry) => { expect(glPagination.vm[entry[0]]).toBe(entry[1]); diff --git a/spec/frontend/vue_shared/components/panel_resizer_spec.js b/spec/frontend/vue_shared/components/panel_resizer_spec.js index 0e261124cbf..a535fe4939c 100644 --- a/spec/frontend/vue_shared/components/panel_resizer_spec.js +++ b/spec/frontend/vue_shared/components/panel_resizer_spec.js @@ -27,10 +27,6 @@ describe('Panel Resizer component', () => { el.dispatchEvent(event); }; - afterEach(() => { - wrapper.destroy(); - }); - it('should render a div element with the correct classes and styles', () => { wrapper = mount(PanelResizer, { propsData: { diff --git a/spec/frontend/vue_shared/components/papa_parse_alert_spec.js b/spec/frontend/vue_shared/components/papa_parse_alert_spec.js index ff4febd647e..a44a1aba8c0 100644 --- a/spec/frontend/vue_shared/components/papa_parse_alert_spec.js +++ b/spec/frontend/vue_shared/components/papa_parse_alert_spec.js @@ -16,10 +16,6 @@ describe('app/assets/javascripts/vue_shared/components/papa_parse_alert.vue', () const findAlert = () => wrapper.findComponent(GlAlert); - afterEach(() => { - wrapper.destroy(); - }); - it('should render alert with correct props', async () => { createComponent({ errorMessages: [{ code: 'MissingQuotes' }] }); await nextTick(); diff --git a/spec/frontend/vue_shared/components/project_avatar_spec.js b/spec/frontend/vue_shared/components/project_avatar_spec.js index af828fbca51..9378f6e3f1b 100644 --- a/spec/frontend/vue_shared/components/project_avatar_spec.js +++ b/spec/frontend/vue_shared/components/project_avatar_spec.js @@ -15,10 +15,6 @@ describe('ProjectAvatar', () => { wrapper = shallowMount(ProjectAvatar, { propsData: { ...defaultProps, ...props }, attrs }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders GlAvatar with correct props', () => { createComponent(); diff --git a/spec/frontend/vue_shared/components/registry/code_instruction_spec.js b/spec/frontend/vue_shared/components/registry/code_instruction_spec.js index 8f19f0ea14d..60c1293b7c1 100644 --- a/spec/frontend/vue_shared/components/registry/code_instruction_spec.js +++ b/spec/frontend/vue_shared/components/registry/code_instruction_spec.js @@ -26,10 +26,6 @@ describe('Package code instruction', () => { const findInputElement = () => wrapper.find('[data-testid="instruction-input"]'); const findMultilineInstruction = () => wrapper.find('[data-testid="multiline-instruction"]'); - afterEach(() => { - wrapper.destroy(); - }); - describe('single line', () => { beforeEach(() => createComponent({ diff --git a/spec/frontend/vue_shared/components/registry/details_row_spec.js b/spec/frontend/vue_shared/components/registry/details_row_spec.js index ebc9816f983..9ef1ce5647d 100644 --- a/spec/frontend/vue_shared/components/registry/details_row_spec.js +++ b/spec/frontend/vue_shared/components/registry/details_row_spec.js @@ -20,11 +20,6 @@ describe('DetailsRow', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('has a default slot', () => { mountComponent(); expect(findDefaultSlot().exists()).toBe(true); diff --git a/spec/frontend/vue_shared/components/registry/history_item_spec.js b/spec/frontend/vue_shared/components/registry/history_item_spec.js index 947520567e6..17abe06dbee 100644 --- a/spec/frontend/vue_shared/components/registry/history_item_spec.js +++ b/spec/frontend/vue_shared/components/registry/history_item_spec.js @@ -22,11 +22,6 @@ describe('History Item', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findTimelineEntry = () => wrapper.findComponent(TimelineEntryItem); const findGlIcon = () => wrapper.findComponent(GlIcon); const findDefaultSlot = () => wrapper.find('[data-testid="default-slot"]'); diff --git a/spec/frontend/vue_shared/components/registry/list_item_spec.js b/spec/frontend/vue_shared/components/registry/list_item_spec.js index b941eb77c32..298fa163d59 100644 --- a/spec/frontend/vue_shared/components/registry/list_item_spec.js +++ b/spec/frontend/vue_shared/components/registry/list_item_spec.js @@ -30,11 +30,6 @@ describe('list item', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe.each` slotName | finderFunction ${'left-primary'} | ${findLeftPrimarySlot} diff --git a/spec/frontend/vue_shared/components/registry/metadata_item_spec.js b/spec/frontend/vue_shared/components/registry/metadata_item_spec.js index 8defeb76e19..278b09d80b2 100644 --- a/spec/frontend/vue_shared/components/registry/metadata_item_spec.js +++ b/spec/frontend/vue_shared/components/registry/metadata_item_spec.js @@ -19,11 +19,6 @@ describe('Metadata Item', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const findIcon = () => wrapper.findComponent(GlIcon); const findLink = (w = wrapper) => w.findComponent(GlLink); const findText = () => wrapper.find('[data-testid="metadata-item-text"]'); diff --git a/spec/frontend/vue_shared/components/registry/persisted_dropdown_selection_spec.js b/spec/frontend/vue_shared/components/registry/persisted_dropdown_selection_spec.js index 616fefe847e..b93fa37546f 100644 --- a/spec/frontend/vue_shared/components/registry/persisted_dropdown_selection_spec.js +++ b/spec/frontend/vue_shared/components/registry/persisted_dropdown_selection_spec.js @@ -31,10 +31,6 @@ describe('Persisted dropdown selection', () => { const findDropdown = () => wrapper.findComponent(GlDropdown); const findDropdownItems = () => wrapper.findAllComponents(GlDropdownItem); - afterEach(() => { - wrapper.destroy(); - }); - describe('local storage sync', () => { it('uses the local storage sync component with the correct props', () => { createComponent(); diff --git a/spec/frontend/vue_shared/components/registry/registry_search_spec.js b/spec/frontend/vue_shared/components/registry/registry_search_spec.js index 591447a37c2..59bb0646350 100644 --- a/spec/frontend/vue_shared/components/registry/registry_search_spec.js +++ b/spec/frontend/vue_shared/components/registry/registry_search_spec.js @@ -36,11 +36,6 @@ describe('Registry Search', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('searching', () => { it('has a filtered-search component', () => { mountComponent(); diff --git a/spec/frontend/vue_shared/components/registry/title_area_spec.js b/spec/frontend/vue_shared/components/registry/title_area_spec.js index efb57ddd310..ec1451de470 100644 --- a/spec/frontend/vue_shared/components/registry/title_area_spec.js +++ b/spec/frontend/vue_shared/components/registry/title_area_spec.js @@ -36,11 +36,6 @@ describe('title area', () => { return acc; }, {}); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('title', () => { it('if slot is not present defaults to prop', () => { mountComponent(); diff --git a/spec/frontend/vue_shared/components/rich_timestamp_tooltip_spec.js b/spec/frontend/vue_shared/components/rich_timestamp_tooltip_spec.js index 5d96fe27676..11ee2e56c14 100644 --- a/spec/frontend/vue_shared/components/rich_timestamp_tooltip_spec.js +++ b/spec/frontend/vue_shared/components/rich_timestamp_tooltip_spec.js @@ -27,10 +27,6 @@ describe('RichTimestampTooltip', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders the tooltip text header', () => { expect(wrapper.findByTestId('header-text').text()).toBe('Created just now'); }); diff --git a/spec/frontend/vue_shared/components/runner_instructions/instructions/runner_cli_instructions_spec.js b/spec/frontend/vue_shared/components/runner_instructions/instructions/runner_cli_instructions_spec.js index f9d700fe67f..c4d4f80c573 100644 --- a/spec/frontend/vue_shared/components/runner_instructions/instructions/runner_cli_instructions_spec.js +++ b/spec/frontend/vue_shared/components/runner_instructions/instructions/runner_cli_instructions_spec.js @@ -59,10 +59,6 @@ describe('RunnerCliInstructions component', () => { runnerSetupInstructionsHandler = jest.fn().mockResolvedValue(mockInstructions); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('when the instructions are shown', () => { beforeEach(async () => { createComponent(); diff --git a/spec/frontend/vue_shared/components/runner_instructions/runner_instructions_modal_spec.js b/spec/frontend/vue_shared/components/runner_instructions/runner_instructions_modal_spec.js index 8f593b6aa1b..cb35cbd35ad 100644 --- a/spec/frontend/vue_shared/components/runner_instructions/runner_instructions_modal_spec.js +++ b/spec/frontend/vue_shared/components/runner_instructions/runner_instructions_modal_spec.js @@ -74,10 +74,6 @@ describe('RunnerInstructionsModal component', () => { runnerPlatformsHandler = jest.fn().mockResolvedValue(mockRunnerPlatforms); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('when the modal is shown', () => { beforeEach(async () => { createComponent(); diff --git a/spec/frontend/vue_shared/components/runner_instructions/runner_instructions_spec.js b/spec/frontend/vue_shared/components/runner_instructions/runner_instructions_spec.js index 68c126ab2ba..260eddbb37d 100644 --- a/spec/frontend/vue_shared/components/runner_instructions/runner_instructions_spec.js +++ b/spec/frontend/vue_shared/components/runner_instructions/runner_instructions_spec.js @@ -21,10 +21,6 @@ describe('RunnerInstructions component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should show the "Show runner installation instructions" button', () => { expect(findModalButton().text()).toBe('Show runner installation instructions'); }); diff --git a/spec/frontend/vue_shared/components/security_reports/artifact_downloads/merge_request_artifact_download_spec.js b/spec/frontend/vue_shared/components/security_reports/artifact_downloads/merge_request_artifact_download_spec.js index c032af04d3e..6eebd129beb 100644 --- a/spec/frontend/vue_shared/components/security_reports/artifact_downloads/merge_request_artifact_download_spec.js +++ b/spec/frontend/vue_shared/components/security_reports/artifact_downloads/merge_request_artifact_download_spec.js @@ -52,10 +52,6 @@ describe('Merge request artifact Download', () => { const findDownloadDropdown = () => wrapper.findComponent(SecurityReportDownloadDropdown); - afterEach(() => { - wrapper.destroy(); - }); - describe('given the query is loading', () => { beforeEach(() => { createWrapper({ diff --git a/spec/frontend/vue_shared/components/security_reports/help_icon_spec.js b/spec/frontend/vue_shared/components/security_reports/help_icon_spec.js index 08d3d5b19d4..2f6e633fb34 100644 --- a/spec/frontend/vue_shared/components/security_reports/help_icon_spec.js +++ b/spec/frontend/vue_shared/components/security_reports/help_icon_spec.js @@ -21,11 +21,6 @@ describe('HelpIcon component', () => { const findPopover = () => wrapper.findComponent(GlPopover); const findPopoverTarget = () => wrapper.findComponent({ ref: 'discoverProjectSecurity' }); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('given a help path only', () => { beforeEach(() => { createWrapper(); diff --git a/spec/frontend/vue_shared/components/security_reports/security_summary_spec.js b/spec/frontend/vue_shared/components/security_reports/security_summary_spec.js index f186eb848f2..61cdc329220 100644 --- a/spec/frontend/vue_shared/components/security_reports/security_summary_spec.js +++ b/spec/frontend/vue_shared/components/security_reports/security_summary_spec.js @@ -15,11 +15,6 @@ describe('SecuritySummary component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe.each([ { message: '' }, { message: 'foo' }, diff --git a/spec/frontend/vue_shared/components/segmented_control_button_group_spec.js b/spec/frontend/vue_shared/components/segmented_control_button_group_spec.js index 88445b6684c..c1feb64dacb 100644 --- a/spec/frontend/vue_shared/components/segmented_control_button_group_spec.js +++ b/spec/frontend/vue_shared/components/segmented_control_button_group_spec.js @@ -40,10 +40,6 @@ describe('~/vue_shared/components/segmented_control_button_group.vue', () => { disabled, })); - afterEach(() => { - wrapper.destroy(); - }); - describe('default', () => { beforeEach(() => { createComponent(); diff --git a/spec/frontend/vue_shared/components/settings/settings_block_spec.js b/spec/frontend/vue_shared/components/settings/settings_block_spec.js index 5e829653c13..94d634f79bd 100644 --- a/spec/frontend/vue_shared/components/settings/settings_block_spec.js +++ b/spec/frontend/vue_shared/components/settings/settings_block_spec.js @@ -16,10 +16,6 @@ describe('Settings Block', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findDefaultSlot = () => wrapper.findByTestId('default-slot'); const findTitleSlot = () => wrapper.findByTestId('title-slot'); const findDescriptionSlot = () => wrapper.findByTestId('description-slot'); diff --git a/spec/frontend/vue_shared/components/source_editor_spec.js b/spec/frontend/vue_shared/components/source_editor_spec.js index ca5b990bc29..5b155207029 100644 --- a/spec/frontend/vue_shared/components/source_editor_spec.js +++ b/spec/frontend/vue_shared/components/source_editor_spec.js @@ -47,10 +47,6 @@ describe('Source Editor component', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - const triggerChangeContent = (val) => { mockInstance.getValue.mockReturnValue(val); const [cb] = mockInstance.onDidChangeModelContent.mock.calls[0]; diff --git a/spec/frontend/vue_shared/components/source_viewer/components/chunk_deprecated_spec.js b/spec/frontend/vue_shared/components/source_viewer/components/chunk_deprecated_spec.js index da9067a8ddc..395ba92d4c6 100644 --- a/spec/frontend/vue_shared/components/source_viewer/components/chunk_deprecated_spec.js +++ b/spec/frontend/vue_shared/components/source_viewer/components/chunk_deprecated_spec.js @@ -45,8 +45,6 @@ describe('Chunk component', () => { createComponent(); }); - afterEach(() => wrapper.destroy()); - describe('Intersection observer', () => { it('renders an Intersection observer component', () => { expect(findIntersectionObserver().exists()).toBe(true); diff --git a/spec/frontend/vue_shared/components/source_viewer/components/chunk_line_spec.js b/spec/frontend/vue_shared/components/source_viewer/components/chunk_line_spec.js index f661bd6747a..6c8fc244fa0 100644 --- a/spec/frontend/vue_shared/components/source_viewer/components/chunk_line_spec.js +++ b/spec/frontend/vue_shared/components/source_viewer/components/chunk_line_spec.js @@ -31,8 +31,6 @@ describe('Chunk Line component', () => { createComponent(); }); - afterEach(() => wrapper.destroy()); - describe('rendering', () => { it('renders a blame link', () => { expect(findBlameLink().attributes()).toMatchObject({ diff --git a/spec/frontend/vue_shared/components/source_viewer/components/chunk_spec.js b/spec/frontend/vue_shared/components/source_viewer/components/chunk_spec.js index 95ef11d776a..59880496d74 100644 --- a/spec/frontend/vue_shared/components/source_viewer/components/chunk_spec.js +++ b/spec/frontend/vue_shared/components/source_viewer/components/chunk_spec.js @@ -24,8 +24,6 @@ describe('Chunk component', () => { createComponent(); }); - afterEach(() => wrapper.destroy()); - describe('Intersection observer', () => { it('renders an Intersection observer component', () => { expect(findIntersectionObserver().exists()).toBe(true); diff --git a/spec/frontend/vue_shared/components/source_viewer/source_viewer_deprecated_spec.js b/spec/frontend/vue_shared/components/source_viewer/source_viewer_deprecated_spec.js index 0beec8e9d3e..c911e3d308b 100644 --- a/spec/frontend/vue_shared/components/source_viewer/source_viewer_deprecated_spec.js +++ b/spec/frontend/vue_shared/components/source_viewer/source_viewer_deprecated_spec.js @@ -68,8 +68,6 @@ describe('Source Viewer component', () => { return createComponent(); }); - afterEach(() => wrapper.destroy()); - describe('event tracking', () => { it('fires a tracking event when the component is created', () => { const eventData = { label: EVENT_LABEL_VIEWER, property: language }; diff --git a/spec/frontend/vue_shared/components/source_viewer/source_viewer_spec.js b/spec/frontend/vue_shared/components/source_viewer/source_viewer_spec.js index 1c75442b4a8..46b582c3668 100644 --- a/spec/frontend/vue_shared/components/source_viewer/source_viewer_spec.js +++ b/spec/frontend/vue_shared/components/source_viewer/source_viewer_spec.js @@ -25,8 +25,6 @@ describe('Source Viewer component', () => { return createComponent(); }); - afterEach(() => wrapper.destroy()); - describe('event tracking', () => { it('fires a tracking event when the component is created', () => { const eventData = { label: EVENT_LABEL_VIEWER, property: LANGUAGE_MOCK }; diff --git a/spec/frontend/vue_shared/components/stacked_progress_bar_spec.js b/spec/frontend/vue_shared/components/stacked_progress_bar_spec.js index 79b1f17afa0..13911d487f2 100644 --- a/spec/frontend/vue_shared/components/stacked_progress_bar_spec.js +++ b/spec/frontend/vue_shared/components/stacked_progress_bar_spec.js @@ -18,10 +18,6 @@ describe('StackedProgressBarComponent', () => { wrapper = mount(StackedProgressBarComponent, { propsData: defaultConfig }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findSuccessBar = () => wrapper.find('.status-green'); const findNeutralBar = () => wrapper.find('.status-neutral'); const findFailureBar = () => wrapper.find('.status-red'); diff --git a/spec/frontend/vue_shared/components/table_pagination_spec.js b/spec/frontend/vue_shared/components/table_pagination_spec.js index 99de26ce2ae..79aba1b2516 100644 --- a/spec/frontend/vue_shared/components/table_pagination_spec.js +++ b/spec/frontend/vue_shared/components/table_pagination_spec.js @@ -16,10 +16,6 @@ describe('Pagination component', () => { spy = jest.fn(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('render', () => { it('should not render anything', () => { mountComponent({ diff --git a/spec/frontend/vue_shared/components/time_ago_tooltip_spec.js b/spec/frontend/vue_shared/components/time_ago_tooltip_spec.js index 28c5acc8110..a1757952dc0 100644 --- a/spec/frontend/vue_shared/components/time_ago_tooltip_spec.js +++ b/spec/frontend/vue_shared/components/time_ago_tooltip_spec.js @@ -25,7 +25,6 @@ describe('Time ago with tooltip component', () => { }; afterEach(() => { - vm.destroy(); timezoneMock.unregister(); }); diff --git a/spec/frontend/vue_shared/components/timezone_dropdown/timezone_dropdown_spec.js b/spec/frontend/vue_shared/components/timezone_dropdown/timezone_dropdown_spec.js index c891c4700c9..d8dedd8240b 100644 --- a/spec/frontend/vue_shared/components/timezone_dropdown/timezone_dropdown_spec.js +++ b/spec/frontend/vue_shared/components/timezone_dropdown/timezone_dropdown_spec.js @@ -30,11 +30,6 @@ describe('Deploy freeze timezone dropdown', () => { const findEmptyResultsItem = () => wrapper.findByTestId('noMatchingResults'); const findHiddenInput = () => wrapper.find('input'); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('No time zones found', () => { beforeEach(async () => { await createComponent('UTC timezone'); diff --git a/spec/frontend/vue_shared/components/tooltip_on_truncate_spec.js b/spec/frontend/vue_shared/components/tooltip_on_truncate_spec.js index 01fc2dc4661..3807bb4cc63 100644 --- a/spec/frontend/vue_shared/components/tooltip_on_truncate_spec.js +++ b/spec/frontend/vue_shared/components/tooltip_on_truncate_spec.js @@ -78,10 +78,6 @@ describe('TooltipOnTruncate component', () => { await nextTick(); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when truncated', () => { beforeEach(async () => { hasHorizontalOverflow.mockReturnValueOnce(true); diff --git a/spec/frontend/vue_shared/components/upload_dropzone/upload_dropzone_spec.js b/spec/frontend/vue_shared/components/upload_dropzone/upload_dropzone_spec.js index 56eb8e785d4..24f96195e05 100644 --- a/spec/frontend/vue_shared/components/upload_dropzone/upload_dropzone_spec.js +++ b/spec/frontend/vue_shared/components/upload_dropzone/upload_dropzone_spec.js @@ -32,11 +32,6 @@ describe('Upload dropzone component', () => { }); } - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('when slot provided', () => { it('renders dropzone with slot content', () => { createComponent({ diff --git a/spec/frontend/vue_shared/components/url_sync_spec.js b/spec/frontend/vue_shared/components/url_sync_spec.js index 30a7439579f..2718be74111 100644 --- a/spec/frontend/vue_shared/components/url_sync_spec.js +++ b/spec/frontend/vue_shared/components/url_sync_spec.js @@ -33,10 +33,6 @@ describe('url sync component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const expectUrlSyncWithMergeUrlParams = ( query, times, diff --git a/spec/frontend/vue_shared/components/usage_quotas/usage_banner_spec.js b/spec/frontend/vue_shared/components/usage_quotas/usage_banner_spec.js index 662c09d02bf..ba55df5512f 100644 --- a/spec/frontend/vue_shared/components/usage_quotas/usage_banner_spec.js +++ b/spec/frontend/vue_shared/components/usage_quotas/usage_banner_spec.js @@ -24,10 +24,6 @@ describe('usage banner', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe.each` slotName | finderFunction ${'left-primary-text'} | ${findLeftPrimaryTextSlot} diff --git a/spec/frontend/vue_shared/components/user_avatar/user_avatar_image_spec.js b/spec/frontend/vue_shared/components/user_avatar/user_avatar_image_spec.js index d63b13981ac..3ae3d89af27 100644 --- a/spec/frontend/vue_shared/components/user_avatar/user_avatar_image_spec.js +++ b/spec/frontend/vue_shared/components/user_avatar/user_avatar_image_spec.js @@ -20,10 +20,6 @@ describe('User Avatar Image Component', () => { const findAvatar = () => wrapper.findComponent(GlAvatar); - afterEach(() => { - wrapper.destroy(); - }); - describe('Initialization', () => { beforeEach(() => { wrapper = shallowMount(UserAvatarImage, { diff --git a/spec/frontend/vue_shared/components/user_avatar/user_avatar_link_spec.js b/spec/frontend/vue_shared/components/user_avatar/user_avatar_link_spec.js index df7ce449678..90f9156af38 100644 --- a/spec/frontend/vue_shared/components/user_avatar/user_avatar_link_spec.js +++ b/spec/frontend/vue_shared/components/user_avatar/user_avatar_link_spec.js @@ -34,10 +34,6 @@ describe('User Avatar Link Component', () => { createWrapper(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('should render GlLink with correct props', () => { const link = wrapper.findComponent(GlAvatarLink); expect(link.exists()).toBe(true); diff --git a/spec/frontend/vue_shared/components/user_avatar/user_avatar_list_spec.js b/spec/frontend/vue_shared/components/user_avatar/user_avatar_list_spec.js index 63371b1492b..1754292cb63 100644 --- a/spec/frontend/vue_shared/components/user_avatar/user_avatar_list_spec.js +++ b/spec/frontend/vue_shared/components/user_avatar/user_avatar_list_spec.js @@ -50,10 +50,6 @@ describe('UserAvatarList', () => { props = { imgSize: TEST_IMAGE_SIZE }; }); - afterEach(() => { - wrapper.destroy(); - }); - describe('empty text', () => { it('shows when items are empty', () => { factory({ propsData: { items: [] } }); diff --git a/spec/frontend/vue_shared/components/user_callout_dismisser_spec.js b/spec/frontend/vue_shared/components/user_callout_dismisser_spec.js index 521744154ba..b04e578c931 100644 --- a/spec/frontend/vue_shared/components/user_callout_dismisser_spec.js +++ b/spec/frontend/vue_shared/components/user_callout_dismisser_spec.js @@ -28,8 +28,6 @@ const initialSlotProps = (changes = {}) => ({ }); describe('UserCalloutDismisser', () => { - let wrapper; - const MOCK_FEATURE_NAME = 'mock_feature_name'; // Query handlers @@ -52,7 +50,7 @@ describe('UserCalloutDismisser', () => { const callDismissSlotProp = () => defaultScopedSlotSpy.mock.calls[0][0].dismiss(); const createComponent = ({ queryHandler, mutationHandler, ...options }) => { - wrapper = mount( + mount( UserCalloutDismisser, merge( { @@ -72,10 +70,6 @@ describe('UserCalloutDismisser', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when loading', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/vue_shared/components/user_deletion_obstacles/user_deletion_obstacles_list_spec.js b/spec/frontend/vue_shared/components/user_deletion_obstacles/user_deletion_obstacles_list_spec.js index 78abb89e7b8..6491e5a66cd 100644 --- a/spec/frontend/vue_shared/components/user_deletion_obstacles/user_deletion_obstacles_list_spec.js +++ b/spec/frontend/vue_shared/components/user_deletion_obstacles/user_deletion_obstacles_list_spec.js @@ -51,10 +51,6 @@ describe('User deletion obstacles list', () => { ); } - afterEach(() => { - wrapper.destroy(); - }); - const findLinks = () => wrapper.findAllComponents(GlLink); const findTitle = () => wrapper.findByTestId('title'); const findFooter = () => wrapper.findByTestId('footer'); diff --git a/spec/frontend/vue_shared/components/user_popover/user_popover_spec.js b/spec/frontend/vue_shared/components/user_popover/user_popover_spec.js index d6d8ea6be03..8ecab5cc043 100644 --- a/spec/frontend/vue_shared/components/user_popover/user_popover_spec.js +++ b/spec/frontend/vue_shared/components/user_popover/user_popover_spec.js @@ -51,7 +51,6 @@ describe('User Popover Component', () => { }); afterEach(() => { - wrapper.destroy(); resetHTMLFixture(); }); diff --git a/spec/frontend/vue_shared/components/user_select_spec.js b/spec/frontend/vue_shared/components/user_select_spec.js index a2d5fefb63d..e881bfed35e 100644 --- a/spec/frontend/vue_shared/components/user_select_spec.js +++ b/spec/frontend/vue_shared/components/user_select_spec.js @@ -105,7 +105,6 @@ describe('User select dropdown', () => { }; afterEach(() => { - wrapper.destroy(); fakeApollo = null; }); diff --git a/spec/frontend/vue_shared/components/vuex_module_provider_spec.js b/spec/frontend/vue_shared/components/vuex_module_provider_spec.js index c136c2054ac..acbb931b7b6 100644 --- a/spec/frontend/vue_shared/components/vuex_module_provider_spec.js +++ b/spec/frontend/vue_shared/components/vuex_module_provider_spec.js @@ -27,10 +27,6 @@ describe('~/vue_shared/components/vuex_module_provider', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('provides "vuexModule" set from prop', () => { createComponent(); expect(findProvidedVuexModule()).toBe(TEST_VUEX_MODULE); diff --git a/spec/frontend/vue_shared/components/web_ide_link_spec.js b/spec/frontend/vue_shared/components/web_ide_link_spec.js index 18afe049149..f6eb11aaddf 100644 --- a/spec/frontend/vue_shared/components/web_ide_link_spec.js +++ b/spec/frontend/vue_shared/components/web_ide_link_spec.js @@ -137,10 +137,6 @@ describe('Web IDE link component', () => { localStorage.setItem(PREFERRED_EDITOR_RESET_KEY, 'true'); }); - afterEach(() => { - wrapper.destroy(); - }); - const findActionsButton = () => wrapper.findComponent(ActionsButton); const findLocalStorageSync = () => wrapper.findComponent(LocalStorageSync); const findModal = () => wrapper.findComponent(GlModal); diff --git a/spec/frontend/vue_shared/directives/validation_spec.js b/spec/frontend/vue_shared/directives/validation_spec.js index dcd3a44a6fc..72a348c1a79 100644 --- a/spec/frontend/vue_shared/directives/validation_spec.js +++ b/spec/frontend/vue_shared/directives/validation_spec.js @@ -80,11 +80,6 @@ describe('validation directive', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const getFormData = () => wrapper.vm.form; const findForm = () => wrapper.find('form'); const findInput = () => wrapper.find('input'); diff --git a/spec/frontend/vue_shared/issuable/create/components/issuable_create_root_spec.js b/spec/frontend/vue_shared/issuable/create/components/issuable_create_root_spec.js index 7b0f0f7e344..e983519d9fc 100644 --- a/spec/frontend/vue_shared/issuable/create/components/issuable_create_root_spec.js +++ b/spec/frontend/vue_shared/issuable/create/components/issuable_create_root_spec.js @@ -34,10 +34,6 @@ describe('IssuableCreateRoot', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { it('renders component container element with class "issuable-create-container"', () => { expect(wrapper.classes()).toContain('issuable-create-container'); diff --git a/spec/frontend/vue_shared/issuable/create/components/issuable_form_spec.js b/spec/frontend/vue_shared/issuable/create/components/issuable_form_spec.js index ff21b3bc356..ae2fd5ebffa 100644 --- a/spec/frontend/vue_shared/issuable/create/components/issuable_form_spec.js +++ b/spec/frontend/vue_shared/issuable/create/components/issuable_form_spec.js @@ -36,10 +36,6 @@ describe('IssuableForm', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('methods', () => { describe('handleUpdateSelectedLabels', () => { it('sets provided `labels` param to prop `selectedLabels`', () => { diff --git a/spec/frontend/vue_shared/issuable/create/components/issuable_label_selector_spec.js b/spec/frontend/vue_shared/issuable/create/components/issuable_label_selector_spec.js index 89f504d371b..ce9e23d9a00 100644 --- a/spec/frontend/vue_shared/issuable/create/components/issuable_label_selector_spec.js +++ b/spec/frontend/vue_shared/issuable/create/components/issuable_label_selector_spec.js @@ -47,10 +47,6 @@ describe('IssuableLabelSelector', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const expectTitleWithCount = (count) => { const title = findTitle(); diff --git a/spec/frontend/vue_shared/issuable/issuable_blocked_icon_spec.js b/spec/frontend/vue_shared/issuable/issuable_blocked_icon_spec.js index ebed504543e..61e6d2a420a 100644 --- a/spec/frontend/vue_shared/issuable/issuable_blocked_icon_spec.js +++ b/spec/frontend/vue_shared/issuable/issuable_blocked_icon_spec.js @@ -48,11 +48,6 @@ describe('IssuableBlockedIcon', () => { await waitForApollo(); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - const createWrapperWithApollo = ({ item = mockBlockedIssue1, blockingIssuablesSpy = jest.fn().mockResolvedValue(mockBlockingIssuablesResponse1), diff --git a/spec/frontend/vue_shared/issuable/list/components/issuable_bulk_edit_sidebar_spec.js b/spec/frontend/vue_shared/issuable/list/components/issuable_bulk_edit_sidebar_spec.js index a25f92c9cf2..c23bd002ee5 100644 --- a/spec/frontend/vue_shared/issuable/list/components/issuable_bulk_edit_sidebar_spec.js +++ b/spec/frontend/vue_shared/issuable/list/components/issuable_bulk_edit_sidebar_spec.js @@ -28,7 +28,6 @@ describe('IssuableBulkEditSidebar', () => { }); afterEach(() => { - wrapper.destroy(); resetHTMLFixture(); }); diff --git a/spec/frontend/vue_shared/issuable/list/components/issuable_item_spec.js b/spec/frontend/vue_shared/issuable/list/components/issuable_item_spec.js index 2fac004875a..bb2758bcf8e 100644 --- a/spec/frontend/vue_shared/issuable/list/components/issuable_item_spec.js +++ b/spec/frontend/vue_shared/issuable/list/components/issuable_item_spec.js @@ -50,7 +50,6 @@ describe('IssuableItem', () => { }); afterEach(() => { - wrapper.destroy(); gon.gitlab_url = originalUrl; }); diff --git a/spec/frontend/vue_shared/issuable/list/components/issuable_list_root_spec.js b/spec/frontend/vue_shared/issuable/list/components/issuable_list_root_spec.js index 371844e66f4..9a4636e0f4d 100644 --- a/spec/frontend/vue_shared/issuable/list/components/issuable_list_root_spec.js +++ b/spec/frontend/vue_shared/issuable/list/components/issuable_list_root_spec.js @@ -47,10 +47,6 @@ describe('IssuableListRoot', () => { const findVueDraggable = () => wrapper.findComponent(VueDraggable); const findPageSizeSelector = () => wrapper.findComponent(PageSizeSelector); - afterEach(() => { - wrapper.destroy(); - }); - describe('computed', () => { beforeEach(() => { wrapper = createComponent(); diff --git a/spec/frontend/vue_shared/issuable/list/components/issuable_tabs_spec.js b/spec/frontend/vue_shared/issuable/list/components/issuable_tabs_spec.js index 27985895c62..9cdd4d75c42 100644 --- a/spec/frontend/vue_shared/issuable/list/components/issuable_tabs_spec.js +++ b/spec/frontend/vue_shared/issuable/list/components/issuable_tabs_spec.js @@ -35,7 +35,6 @@ describe('IssuableTabs', () => { afterEach(() => { setLanguage(null); - wrapper.destroy(); }); const findAllGlBadges = () => wrapper.findAllComponents(GlBadge); diff --git a/spec/frontend/vue_shared/issuable/show/components/issuable_body_spec.js b/spec/frontend/vue_shared/issuable/show/components/issuable_body_spec.js index cee84806b43..7e665b7c76e 100644 --- a/spec/frontend/vue_shared/issuable/show/components/issuable_body_spec.js +++ b/spec/frontend/vue_shared/issuable/show/components/issuable_body_spec.js @@ -48,10 +48,6 @@ describe('IssuableBody', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('computed', () => { describe('isUpdated', () => { it.each` diff --git a/spec/frontend/vue_shared/issuable/show/components/issuable_description_spec.js b/spec/frontend/vue_shared/issuable/show/components/issuable_description_spec.js index ea58cc2baf5..b4f1c286158 100644 --- a/spec/frontend/vue_shared/issuable/show/components/issuable_description_spec.js +++ b/spec/frontend/vue_shared/issuable/show/components/issuable_description_spec.js @@ -24,10 +24,6 @@ describe('IssuableDescription', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('mounted', () => { it('calls `renderGFM`', () => { expect(renderGFM).toHaveBeenCalledTimes(1); diff --git a/spec/frontend/vue_shared/issuable/show/components/issuable_edit_form_spec.js b/spec/frontend/vue_shared/issuable/show/components/issuable_edit_form_spec.js index 159be4cd1ef..0d6cd1ad00b 100644 --- a/spec/frontend/vue_shared/issuable/show/components/issuable_edit_form_spec.js +++ b/spec/frontend/vue_shared/issuable/show/components/issuable_edit_form_spec.js @@ -43,6 +43,9 @@ describe('IssuableEditForm', () => { }); afterEach(() => { + // note: the order of wrapper.destroy() and jest.resetAllMocks() matters. + // maybe it'll help with investigation on how to remove this wrapper.destroy() call + // eslint-disable-next-line @gitlab/vtu-no-explicit-wrapper-destroy wrapper.destroy(); jest.resetAllMocks(); }); diff --git a/spec/frontend/vue_shared/issuable/show/components/issuable_header_spec.js b/spec/frontend/vue_shared/issuable/show/components/issuable_header_spec.js index 6a8b9ef77a9..d9f1b6c15a8 100644 --- a/spec/frontend/vue_shared/issuable/show/components/issuable_header_spec.js +++ b/spec/frontend/vue_shared/issuable/show/components/issuable_header_spec.js @@ -33,7 +33,6 @@ describe('IssuableHeader', () => { }; afterEach(() => { - wrapper.destroy(); resetHTMLFixture(); }); diff --git a/spec/frontend/vue_shared/issuable/show/components/issuable_show_root_spec.js b/spec/frontend/vue_shared/issuable/show/components/issuable_show_root_spec.js index edfd55c8bb4..f976e0499f0 100644 --- a/spec/frontend/vue_shared/issuable/show/components/issuable_show_root_spec.js +++ b/spec/frontend/vue_shared/issuable/show/components/issuable_show_root_spec.js @@ -41,10 +41,6 @@ describe('IssuableShowRoot', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('template', () => { const { statusIcon, diff --git a/spec/frontend/vue_shared/issuable/sidebar/components/issuable_sidebar_root_spec.js b/spec/frontend/vue_shared/issuable/sidebar/components/issuable_sidebar_root_spec.js index 6c9e5f85fa0..f2509aead77 100644 --- a/spec/frontend/vue_shared/issuable/sidebar/components/issuable_sidebar_root_spec.js +++ b/spec/frontend/vue_shared/issuable/sidebar/components/issuable_sidebar_root_spec.js @@ -38,7 +38,6 @@ describe('IssuableSidebarRoot', () => { }; afterEach(() => { - wrapper.destroy(); resetHTMLFixture(); }); diff --git a/spec/frontend/vue_shared/new_namespace/components/legacy_container_spec.js b/spec/frontend/vue_shared/new_namespace/components/legacy_container_spec.js index 52f36aa0e77..052ff518468 100644 --- a/spec/frontend/vue_shared/new_namespace/components/legacy_container_spec.js +++ b/spec/frontend/vue_shared/new_namespace/components/legacy_container_spec.js @@ -11,9 +11,7 @@ describe('Legacy container component', () => { }; afterEach(() => { - wrapper.destroy(); resetHTMLFixture(); - wrapper = null; }); describe('when selector targets real node', () => { diff --git a/spec/frontend/vue_shared/new_namespace/components/welcome_spec.js b/spec/frontend/vue_shared/new_namespace/components/welcome_spec.js index c90131fea9a..cc8a8d86d19 100644 --- a/spec/frontend/vue_shared/new_namespace/components/welcome_spec.js +++ b/spec/frontend/vue_shared/new_namespace/components/welcome_spec.js @@ -27,9 +27,7 @@ describe('Welcome page', () => { }); afterEach(() => { - wrapper.destroy(); window.location.hash = ''; - wrapper = null; }); it('tracks link clicks', async () => { diff --git a/spec/frontend/vue_shared/new_namespace/new_namespace_page_spec.js b/spec/frontend/vue_shared/new_namespace/new_namespace_page_spec.js index 40f75a0a8d6..5ff7b9f390a 100644 --- a/spec/frontend/vue_shared/new_namespace/new_namespace_page_spec.js +++ b/spec/frontend/vue_shared/new_namespace/new_namespace_page_spec.js @@ -33,7 +33,6 @@ describe('Experimental new project creation app', () => { }; afterEach(() => { - wrapper.destroy(); window.location.hash = ''; }); diff --git a/spec/frontend/vue_shared/security_configuration/components/section_layout_spec.js b/spec/frontend/vue_shared/security_configuration/components/section_layout_spec.js index 136fe74b0d6..d258658d5e2 100644 --- a/spec/frontend/vue_shared/security_configuration/components/section_layout_spec.js +++ b/spec/frontend/vue_shared/security_configuration/components/section_layout_spec.js @@ -21,10 +21,6 @@ describe('Section Layout component', () => { const findHeading = () => wrapper.find('h2'); const findLoader = () => wrapper.findComponent(SectionLoader); - afterEach(() => { - wrapper.destroy(); - }); - describe('basic structure', () => { beforeEach(() => { createComponent({ heading: 'testheading' }); diff --git a/spec/frontend/vue_shared/security_reports/components/manage_via_mr_spec.js b/spec/frontend/vue_shared/security_reports/components/manage_via_mr_spec.js index 0a5e46d9263..6345393951c 100644 --- a/spec/frontend/vue_shared/security_reports/components/manage_via_mr_spec.js +++ b/spec/frontend/vue_shared/security_reports/components/manage_via_mr_spec.js @@ -56,10 +56,6 @@ describe('ManageViaMr component', () => { ); } - afterEach(() => { - wrapper.destroy(); - }); - // This component supports different report types/mutations depending on // whether it's in a CE or EE context. This makes sure we are only testing // the ones available in the current test context. diff --git a/spec/frontend/vue_shared/security_reports/components/security_report_download_dropdown_spec.js b/spec/frontend/vue_shared/security_reports/components/security_report_download_dropdown_spec.js index 5f2b13a79c9..299a3d62421 100644 --- a/spec/frontend/vue_shared/security_reports/components/security_report_download_dropdown_spec.js +++ b/spec/frontend/vue_shared/security_reports/components/security_report_download_dropdown_spec.js @@ -15,11 +15,6 @@ describe('SecurityReportDownloadDropdown component', () => { const findDropdown = () => wrapper.findComponent(GlDropdown); const findDropdownItems = () => wrapper.findAllComponents(GlDropdownItem); - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('given report artifacts', () => { beforeEach(() => { artifacts = [ diff --git a/spec/frontend/vue_shared/security_reports/security_reports_app_spec.js b/spec/frontend/vue_shared/security_reports/security_reports_app_spec.js index ae02f38e7fe..257f59612e8 100644 --- a/spec/frontend/vue_shared/security_reports/security_reports_app_spec.js +++ b/spec/frontend/vue_shared/security_reports/security_reports_app_spec.js @@ -74,10 +74,6 @@ describe('Security reports app', () => { const findDownloadDropdown = () => wrapper.findComponent(SecurityReportDownloadDropdown); const findHelpIconComponent = () => wrapper.findComponent(HelpIcon); - afterEach(() => { - wrapper.destroy(); - }); - describe('given the artifacts query is loading', () => { beforeEach(() => { createComponent({ diff --git a/spec/frontend/webhooks/components/form_url_app_spec.js b/spec/frontend/webhooks/components/form_url_app_spec.js index 45a39d2dd58..cbeff184e9d 100644 --- a/spec/frontend/webhooks/components/form_url_app_spec.js +++ b/spec/frontend/webhooks/components/form_url_app_spec.js @@ -19,10 +19,6 @@ describe('FormUrlApp', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - const findAllRadioButtons = () => wrapper.findAllComponents(GlFormRadio); const findRadioGroup = () => wrapper.findComponent(GlFormRadioGroup); const findUrlMaskDisable = () => findAllRadioButtons().at(0); diff --git a/spec/frontend/whats_new/components/app_spec.js b/spec/frontend/whats_new/components/app_spec.js index 265e0344286..000b07f4dfd 100644 --- a/spec/frontend/whats_new/components/app_spec.js +++ b/spec/frontend/whats_new/components/app_spec.js @@ -71,7 +71,6 @@ describe('App', () => { }; afterEach(() => { - wrapper.destroy(); unmockTracking(); }); diff --git a/spec/frontend/whats_new/components/feature_spec.js b/spec/frontend/whats_new/components/feature_spec.js index 099054bf8ca..d69ac2803df 100644 --- a/spec/frontend/whats_new/components/feature_spec.js +++ b/spec/frontend/whats_new/components/feature_spec.js @@ -30,11 +30,6 @@ describe("What's new single feature", () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - it('renders the date', () => { createWrapper({ feature: exampleFeature }); diff --git a/spec/frontend/whats_new/utils/get_drawer_body_height_spec.js b/spec/frontend/whats_new/utils/get_drawer_body_height_spec.js index b199f4f0c49..79717b8767e 100644 --- a/spec/frontend/whats_new/utils/get_drawer_body_height_spec.js +++ b/spec/frontend/whats_new/utils/get_drawer_body_height_spec.js @@ -11,10 +11,6 @@ describe('~/whats_new/utils/get_drawer_body_height', () => { }); }); - afterEach(() => { - drawerWrapper.destroy(); - }); - const setClientHeight = (el, height) => { Object.defineProperty(el, 'clientHeight', { get() { diff --git a/spec/frontend/work_items/components/app_spec.js b/spec/frontend/work_items/components/app_spec.js index 95034085493..d799e8042b1 100644 --- a/spec/frontend/work_items/components/app_spec.js +++ b/spec/frontend/work_items/components/app_spec.js @@ -12,10 +12,6 @@ describe('Work Items Application', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders a component', () => { createComponent(); diff --git a/spec/frontend/work_items/components/item_state_spec.js b/spec/frontend/work_items/components/item_state_spec.js index c3cc2fbc556..c3bdbfe030e 100644 --- a/spec/frontend/work_items/components/item_state_spec.js +++ b/spec/frontend/work_items/components/item_state_spec.js @@ -21,10 +21,6 @@ describe('ItemState', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders label and dropdown', () => { createComponent(); diff --git a/spec/frontend/work_items/components/item_title_spec.js b/spec/frontend/work_items/components/item_title_spec.js index 6361f8dafc4..aef310319ab 100644 --- a/spec/frontend/work_items/components/item_title_spec.js +++ b/spec/frontend/work_items/components/item_title_spec.js @@ -19,10 +19,6 @@ describe('ItemTitle', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders title contents', () => { expect(findInputEl().attributes()).toMatchObject({ 'data-placeholder': 'Add a title...', diff --git a/spec/frontend/work_items/components/work_item_actions_spec.js b/spec/frontend/work_items/components/work_item_actions_spec.js index 3c312fb4552..a0db8172bf6 100644 --- a/spec/frontend/work_items/components/work_item_actions_spec.js +++ b/spec/frontend/work_items/components/work_item_actions_spec.js @@ -52,10 +52,6 @@ describe('WorkItemActions component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders modal', () => { createComponent(); diff --git a/spec/frontend/work_items/components/work_item_assignees_spec.js b/spec/frontend/work_items/components/work_item_assignees_spec.js index e85f62b881d..2a8159f7294 100644 --- a/spec/frontend/work_items/components/work_item_assignees_spec.js +++ b/spec/frontend/work_items/components/work_item_assignees_spec.js @@ -113,10 +113,6 @@ describe('WorkItemAssignees component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('passes the correct data-user-id attribute', () => { createComponent(); diff --git a/spec/frontend/work_items/components/work_item_description_rendered_spec.js b/spec/frontend/work_items/components/work_item_description_rendered_spec.js index 0ab2546440b..4f1d49ee2e5 100644 --- a/spec/frontend/work_items/components/work_item_description_rendered_spec.js +++ b/spec/frontend/work_items/components/work_item_description_rendered_spec.js @@ -29,10 +29,6 @@ describe('WorkItemDescription', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders gfm', async () => { createComponent(); diff --git a/spec/frontend/work_items/components/work_item_description_spec.js b/spec/frontend/work_items/components/work_item_description_spec.js index ecb6404f261..44b43440944 100644 --- a/spec/frontend/work_items/components/work_item_description_spec.js +++ b/spec/frontend/work_items/components/work_item_description_spec.js @@ -99,10 +99,6 @@ describe('WorkItemDescription', () => { } }; - afterEach(() => { - wrapper.destroy(); - }); - describe('editing description with workItemsMvc FF enabled', () => { beforeEach(() => { workItemsMvc = true; diff --git a/spec/frontend/work_items/components/work_item_detail_modal_spec.js b/spec/frontend/work_items/components/work_item_detail_modal_spec.js index 938cf6e6f51..1bdf5d1c840 100644 --- a/spec/frontend/work_items/components/work_item_detail_modal_spec.js +++ b/spec/frontend/work_items/components/work_item_detail_modal_spec.js @@ -82,10 +82,6 @@ describe('WorkItemDetailModal component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders WorkItemDetail', () => { createComponent(); diff --git a/spec/frontend/work_items/components/work_item_detail_spec.js b/spec/frontend/work_items/components/work_item_detail_spec.js index 6984e385e42..d20e5f8d1b3 100644 --- a/spec/frontend/work_items/components/work_item_detail_spec.js +++ b/spec/frontend/work_items/components/work_item_detail_spec.js @@ -147,7 +147,6 @@ describe('WorkItemDetail component', () => { }; afterEach(() => { - wrapper.destroy(); setWindowLocation(''); }); diff --git a/spec/frontend/work_items/components/work_item_due_date_spec.js b/spec/frontend/work_items/components/work_item_due_date_spec.js index 7ebaf8209c7..b4811db8bed 100644 --- a/spec/frontend/work_items/components/work_item_due_date_spec.js +++ b/spec/frontend/work_items/components/work_item_due_date_spec.js @@ -46,10 +46,6 @@ describe('WorkItemDueDate component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('when can update', () => { describe('start date', () => { describe('`Add start date` button', () => { diff --git a/spec/frontend/work_items/components/work_item_labels_spec.js b/spec/frontend/work_items/components/work_item_labels_spec.js index 0b6ab5c3290..6d51448194b 100644 --- a/spec/frontend/work_items/components/work_item_labels_spec.js +++ b/spec/frontend/work_items/components/work_item_labels_spec.js @@ -72,10 +72,6 @@ describe('WorkItemLabels component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('has a label', () => { createComponent(); diff --git a/spec/frontend/work_items/components/work_item_links/okr_actions_split_button_spec.js b/spec/frontend/work_items/components/work_item_links/okr_actions_split_button_spec.js index 5fbd8e7e1a7..688dccbda79 100644 --- a/spec/frontend/work_items/components/work_item_links/okr_actions_split_button_spec.js +++ b/spec/frontend/work_items/components/work_item_links/okr_actions_split_button_spec.js @@ -15,10 +15,6 @@ describe('RelatedItemsTree', () => { wrapper = createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - describe('OkrActionsSplitButton', () => { describe('template', () => { it('renders objective and key results sections', () => { diff --git a/spec/frontend/work_items/components/work_item_links/work_item_link_child_spec.js b/spec/frontend/work_items/components/work_item_links/work_item_link_child_spec.js index 254d94bab28..ca181c346b5 100644 --- a/spec/frontend/work_items/components/work_item_links/work_item_link_child_spec.js +++ b/spec/frontend/work_items/components/work_item_links/work_item_link_child_spec.js @@ -67,10 +67,6 @@ describe('WorkItemLinkChild', () => { createAlert.mockClear(); }); - afterEach(() => { - wrapper.destroy(); - }); - it.each` status | childItem | statusIconName | statusIconColorClass | rawTimestamp | tooltipContents ${'open'} | ${workItemTask} | ${'issue-open-m'} | ${'gl-text-green-500'} | ${workItemTask.createdAt} | ${'Created'} diff --git a/spec/frontend/work_items/components/work_item_links/work_item_links_form_spec.js b/spec/frontend/work_items/components/work_item_links/work_item_links_form_spec.js index 480f8fbcc58..5184b24d202 100644 --- a/spec/frontend/work_items/components/work_item_links/work_item_links_form_spec.js +++ b/spec/frontend/work_items/components/work_item_links/work_item_links_form_spec.js @@ -75,10 +75,6 @@ describe('WorkItemLinksForm', () => { const findConfidentialCheckbox = () => wrapper.findComponent(GlFormCheckbox); const findAddChildButton = () => wrapper.findByTestId('add-child-button'); - afterEach(() => { - wrapper.destroy(); - }); - describe('creating a new work item', () => { beforeEach(async () => { await createComponent(); diff --git a/spec/frontend/work_items/components/work_item_links/work_item_links_menu_spec.js b/spec/frontend/work_items/components/work_item_links/work_item_links_menu_spec.js index e3f3b74f296..4e53fc2987b 100644 --- a/spec/frontend/work_items/components/work_item_links/work_item_links_menu_spec.js +++ b/spec/frontend/work_items/components/work_item_links/work_item_links_menu_spec.js @@ -17,10 +17,6 @@ describe('WorkItemLinksMenu', () => { createComponent(); }); - afterEach(() => { - wrapper.destroy(); - }); - it('renders dropdown and dropdown items', () => { expect(findDropdown().exists()).toBe(true); expect(findRemoveDropdownItem().exists()).toBe(true); diff --git a/spec/frontend/work_items/components/work_item_state_spec.js b/spec/frontend/work_items/components/work_item_state_spec.js index b24d940d56a..d1262057c73 100644 --- a/spec/frontend/work_items/components/work_item_state_spec.js +++ b/spec/frontend/work_items/components/work_item_state_spec.js @@ -44,10 +44,6 @@ describe('WorkItemState component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders state', () => { createComponent(); diff --git a/spec/frontend/work_items/components/work_item_title_spec.js b/spec/frontend/work_items/components/work_item_title_spec.js index a549aad5cd8..34391b74cf7 100644 --- a/spec/frontend/work_items/components/work_item_title_spec.js +++ b/spec/frontend/work_items/components/work_item_title_spec.js @@ -41,10 +41,6 @@ describe('WorkItemTitle component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders title', () => { createComponent(); diff --git a/spec/frontend/work_items/components/work_item_type_icon_spec.js b/spec/frontend/work_items/components/work_item_type_icon_spec.js index dfcf9be3d61..a5e955c4dbf 100644 --- a/spec/frontend/work_items/components/work_item_type_icon_spec.js +++ b/spec/frontend/work_items/components/work_item_type_icon_spec.js @@ -17,10 +17,6 @@ function createComponent(propsData) { describe('Work Item type component', () => { const findIcon = () => wrapper.findComponent(GlIcon); - afterEach(() => { - wrapper.destroy(); - }); - describe.each` workItemType | workItemIconName | iconName | text | showTooltipOnHover ${'TASK'} | ${''} | ${'issue-type-task'} | ${'Task'} | ${false} diff --git a/spec/frontend/work_items/pages/create_work_item_spec.js b/spec/frontend/work_items/pages/create_work_item_spec.js index 0a168f1ade5..b963f041dd9 100644 --- a/spec/frontend/work_items/pages/create_work_item_spec.js +++ b/spec/frontend/work_items/pages/create_work_item_spec.js @@ -70,7 +70,6 @@ describe('Create work item component', () => { }; afterEach(() => { - wrapper.destroy(); fakeApollo = null; }); diff --git a/spec/frontend/work_items/pages/work_item_root_spec.js b/spec/frontend/work_items/pages/work_item_root_spec.js index a766962771a..37326910e13 100644 --- a/spec/frontend/work_items/pages/work_item_root_spec.js +++ b/spec/frontend/work_items/pages/work_item_root_spec.js @@ -44,10 +44,6 @@ describe('Work items root component', () => { }); }; - afterEach(() => { - wrapper.destroy(); - }); - it('renders WorkItemDetail', () => { createComponent(); diff --git a/spec/frontend/work_items/router_spec.js b/spec/frontend/work_items/router_spec.js index ef9ae4a2eab..8ebf76d40c8 100644 --- a/spec/frontend/work_items/router_spec.js +++ b/spec/frontend/work_items/router_spec.js @@ -88,6 +88,7 @@ describe('Work items router', () => { }); afterEach(() => { + // eslint-disable-next-line @gitlab/vtu-no-explicit-wrapper-destroy wrapper.destroy(); window.location.hash = ''; }); diff --git a/spec/frontend/work_items_hierarchy/components/app_spec.js b/spec/frontend/work_items_hierarchy/components/app_spec.js index 124ff5f1608..22fd7d5f48a 100644 --- a/spec/frontend/work_items_hierarchy/components/app_spec.js +++ b/spec/frontend/work_items_hierarchy/components/app_spec.js @@ -24,10 +24,6 @@ describe('WorkItemsHierarchy App', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('survey banner', () => { it('shows when the banner is visible', () => { createComponent({}, { bannerVisible: true }); diff --git a/spec/frontend/work_items_hierarchy/components/hierarchy_spec.js b/spec/frontend/work_items_hierarchy/components/hierarchy_spec.js index 084aaa754ab..dfdef7915dd 100644 --- a/spec/frontend/work_items_hierarchy/components/hierarchy_spec.js +++ b/spec/frontend/work_items_hierarchy/components/hierarchy_spec.js @@ -40,10 +40,6 @@ describe('WorkItemsHierarchy Hierarchy', () => { ); }; - afterEach(() => { - wrapper.destroy(); - }); - describe('available structure', () => { let items = []; |