diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 04:45:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 04:45:44 +0300 |
commit | 85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch) | |
tree | 9160f299afd8c80c038f08e1545be119f5e3f1e1 /spec/frontend/projects | |
parent | 15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff) |
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'spec/frontend/projects')
6 files changed, 23 insertions, 29 deletions
diff --git a/spec/frontend/projects/commits/components/author_select_spec.js b/spec/frontend/projects/commits/components/author_select_spec.js index d6fac6f5f79..68c285a4097 100644 --- a/spec/frontend/projects/commits/components/author_select_spec.js +++ b/spec/frontend/projects/commits/components/author_select_spec.js @@ -1,11 +1,6 @@ import { shallowMount, createLocalVue } from '@vue/test-utils'; import Vuex from 'vuex'; -import { - GlNewDropdown, - GlNewDropdownHeader, - GlSearchBoxByType, - GlNewDropdownItem, -} from '@gitlab/ui'; +import { GlDropdown, GlDropdownSectionHeader, GlSearchBoxByType, GlDropdownItem } from '@gitlab/ui'; import * as urlUtility from '~/lib/utils/url_utility'; import AuthorSelect from '~/projects/commits/components/author_select.vue'; import { createStore } from '~/projects/commits/store'; @@ -63,10 +58,10 @@ describe('Author Select', () => { }); const findDropdownContainer = () => wrapper.find({ ref: 'dropdownContainer' }); - const findDropdown = () => wrapper.find(GlNewDropdown); - const findDropdownHeader = () => wrapper.find(GlNewDropdownHeader); + const findDropdown = () => wrapper.find(GlDropdown); + const findDropdownHeader = () => wrapper.find(GlDropdownSectionHeader); const findSearchBox = () => wrapper.find(GlSearchBoxByType); - const findDropdownItems = () => wrapper.findAll(GlNewDropdownItem); + const findDropdownItems = () => wrapper.findAll(GlDropdownItem); describe('user is searching via "filter by commit message"', () => { it('disables dropdown container', () => { @@ -133,11 +128,7 @@ describe('Author Select', () => { const authorName = 'lorem'; findSearchBox().vm.$emit('input', authorName); - expect(store.actions.fetchAuthors).toHaveBeenCalledWith( - expect.anything(), - authorName, - undefined, - ); + expect(store.actions.fetchAuthors).toHaveBeenCalledWith(expect.anything(), authorName); }); }); diff --git a/spec/frontend/projects/components/__snapshots__/project_delete_button_spec.js.snap b/spec/frontend/projects/components/__snapshots__/project_delete_button_spec.js.snap index 44220bdef64..455467e7b29 100644 --- a/spec/frontend/projects/components/__snapshots__/project_delete_button_spec.js.snap +++ b/spec/frontend/projects/components/__snapshots__/project_delete_button_spec.js.snap @@ -51,12 +51,12 @@ exports[`Project remove modal initialized matches the snapshot 1`] = ` variant="danger" > <gl-sprintf-stub - message="Once a project is permanently deleted it %{strongStart}cannot be recovered%{strongEnd}. Permanently deleting this project will %{strongStart}immediately delete%{strongEnd} its respositories and %{strongStart}all related resources%{strongEnd} including issues, merge requests etc." + message="Once a project is permanently deleted it %{strongStart}cannot be recovered%{strongEnd}. Permanently deleting this project will %{strongStart}immediately delete%{strongEnd} its repositories and %{strongStart}all related resources%{strongEnd} including issues, merge requests etc." /> </gl-alert-stub> <p> - This action cannot be undone. You will lose the project's respository and all conent: issues, merge requests, etc. + This action cannot be undone. You will lose the project's repository and all content: issues, merge requests, etc. </p> <p @@ -66,7 +66,9 @@ exports[`Project remove modal initialized matches the snapshot 1`] = ` </p> <p> - <code> + <code + class="gl-white-space-pre-wrap" + > foo </code> </p> diff --git a/spec/frontend/projects/components/shared/__snapshots__/delete_button_spec.js.snap b/spec/frontend/projects/components/shared/__snapshots__/delete_button_spec.js.snap index a43acc8c002..692b8f6cf52 100644 --- a/spec/frontend/projects/components/shared/__snapshots__/delete_button_spec.js.snap +++ b/spec/frontend/projects/components/shared/__snapshots__/delete_button_spec.js.snap @@ -55,7 +55,9 @@ exports[`Project remove modal intialized matches the snapshot 1`] = ` </p> <p> - <code> + <code + class="gl-white-space-pre-wrap" + > foo </code> </p> diff --git a/spec/frontend/projects/settings/access_dropdown_spec.js b/spec/frontend/projects/settings/access_dropdown_spec.js index 6d323b0408b..3b375c5610f 100644 --- a/spec/frontend/projects/settings/access_dropdown_spec.js +++ b/spec/frontend/projects/settings/access_dropdown_spec.js @@ -1,5 +1,4 @@ import $ from 'jquery'; -import '~/gl_dropdown'; import AccessDropdown from '~/projects/settings/access_dropdown'; import { LEVEL_TYPES } from '~/projects/settings/constants'; 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 4c873bdfd60..0f3b699f6b2 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 @@ -195,7 +195,7 @@ describe('ServiceDeskRoot', () => { .$nextTick() .then(waitForPromises) .then(() => { - expect(wrapper.html()).toContain('Template was successfully saved.'); + expect(wrapper.html()).toContain('Changes were successfully made.'); }); }); diff --git a/spec/frontend/projects/settings_service_desk/components/service_desk_setting_spec.js b/spec/frontend/projects/settings_service_desk/components/service_desk_setting_spec.js index 7fe310aa400..cb46751f66a 100644 --- a/spec/frontend/projects/settings_service_desk/components/service_desk_setting_spec.js +++ b/spec/frontend/projects/settings_service_desk/components/service_desk_setting_spec.js @@ -26,16 +26,16 @@ describe('ServiceDeskSetting', () => { }); it('should see activation checkbox', () => { - expect(wrapper.contains('#service-desk-checkbox')).toBe(true); + expect(wrapper.find('#service-desk-checkbox').exists()).toBe(true); }); it('should see main panel with the email info', () => { - expect(wrapper.contains('#incoming-email-describer')).toBe(true); + expect(wrapper.find('#incoming-email-describer').exists()).toBe(true); }); it('should see loading spinner and not the incoming email', () => { expect(wrapper.find(GlLoadingIcon).exists()).toBe(true); - expect(wrapper.contains('.incoming-email')).toBe(false); + expect(wrapper.find('.incoming-email').exists()).toBe(false); }); }); }); @@ -78,7 +78,7 @@ describe('ServiceDeskSetting', () => { }); it('renders a copy to clipboard button', () => { - expect(wrapper.contains('.qa-clipboard-button')).toBe(true); + expect(wrapper.find('.qa-clipboard-button').exists()).toBe(true); expect(wrapper.find('.qa-clipboard-button').element.dataset.clipboardText).toBe( incomingEmail, ); @@ -93,7 +93,7 @@ describe('ServiceDeskSetting', () => { }, }); - expect(wrapper.contains('#service-desk-template-select')).toBe(true); + expect(wrapper.find('#service-desk-template-select').exists()).toBe(true); }); it('renders a dropdown with a default value of ""', () => { @@ -163,7 +163,7 @@ describe('ServiceDeskSetting', () => { }, }); - expect(wrapper.find('button.btn-success').text()).toContain('Save template'); + expect(wrapper.find('button.btn-success').text()).toContain('Save changes'); }); it('emits a save event with the chosen template when the save button is clicked', () => { @@ -202,15 +202,15 @@ describe('ServiceDeskSetting', () => { }); it('does not render email panel', () => { - expect(wrapper.contains('#incoming-email-describer')).toBe(false); + expect(wrapper.find('#incoming-email-describer').exists()).toBe(false); }); it('does not render template dropdown', () => { - expect(wrapper.contains('#service-desk-template-select')).toBe(false); + expect(wrapper.find('#service-desk-template-select').exists()).toBe(false); }); it('does not render template save button', () => { - expect(wrapper.contains('button.btn-success')).toBe(false); + expect(wrapper.find('button.btn-success').exists()).toBe(false); }); it('emits an event to turn on Service Desk when the toggle is clicked', () => { |