diff options
Diffstat (limited to 'spec/frontend/clusters/components')
5 files changed, 85 insertions, 25 deletions
diff --git a/spec/frontend/clusters/components/__snapshots__/applications_spec.js.snap b/spec/frontend/clusters/components/__snapshots__/applications_spec.js.snap index 3328ec724fd..b6e89281fef 100644 --- a/spec/frontend/clusters/components/__snapshots__/applications_spec.js.snap +++ b/spec/frontend/clusters/components/__snapshots__/applications_spec.js.snap @@ -94,7 +94,7 @@ exports[`Applications Prometheus application shows the correct description 1`] = Prometheus is an open-source monitoring system with <a class="gl-link" - href="https://docs.gitlab.com/ce/user/project/integrations/prometheus.html" + href="https://docs.gitlab.com/ee/user/project/integrations/prometheus.html" rel="noopener noreferrer" target="_blank" > diff --git a/spec/frontend/clusters/components/__snapshots__/remove_cluster_confirmation_spec.js.snap b/spec/frontend/clusters/components/__snapshots__/remove_cluster_confirmation_spec.js.snap index 93b757e008a..15eeadcc8b8 100644 --- a/spec/frontend/clusters/components/__snapshots__/remove_cluster_confirmation_spec.js.snap +++ b/spec/frontend/clusters/components/__snapshots__/remove_cluster_confirmation_spec.js.snap @@ -5,14 +5,17 @@ exports[`Remove cluster confirmation modal renders splitbutton with modal includ class="gl-display-flex gl-justify-content-end" > <div - class="dropdown b-dropdown gl-dropdown btn-group" + class="dropdown b-dropdown gl-new-dropdown btn-group" + menu-class="dropdown-menu-large" > <button - class="btn btn-danger" + class="btn btn-danger btn-md gl-button split-content-button" type="button" > + <!----> + <span - class="gl-dropdown-toggle-text" + class="gl-new-dropdown-button-text" > Remove integration and resources </span> @@ -22,7 +25,7 @@ exports[`Remove cluster confirmation modal renders splitbutton with modal includ <button aria-expanded="false" aria-haspopup="true" - class="btn dropdown-toggle btn-danger dropdown-toggle-split" + class="btn dropdown-toggle btn-danger btn-md gl-button gl-dropdown-toggle dropdown-toggle-split" type="button" > <span @@ -32,29 +35,58 @@ exports[`Remove cluster confirmation modal renders splitbutton with modal includ </span> </button> <ul - class="dropdown-menu dropdown-menu-selectable dropdown-menu-large" + class="dropdown-menu dropdown-menu-large" role="menu" tabindex="-1" > + <!----> + <li + class="gl-new-dropdown-item" role="presentation" > <button - class="dropdown-item is-active" + class="dropdown-item" role="menuitem" type="button" > - <strong> - Remove integration and resources - </strong> + <svg + class="gl-icon s16 gl-new-dropdown-item-check-icon" + data-testid="mobile-issue-close-icon" + > + <use + href="#mobile-issue-close" + /> + </svg> + + <!----> - <div> - Deletes all GitLab resources attached to this cluster during removal + <!----> + + <div + class="gl-new-dropdown-item-text-wrapper" + > + <p + class="gl-new-dropdown-item-text-primary" + > + <strong> + Remove integration and resources + </strong> + + <div> + Deletes all GitLab resources attached to this cluster during removal + </div> + </p> + + <!----> </div> + + <!----> </button> </li> <li + class="gl-new-dropdown-divider" role="presentation" > <hr @@ -64,6 +96,7 @@ exports[`Remove cluster confirmation modal renders splitbutton with modal includ /> </li> <li + class="gl-new-dropdown-item" role="presentation" > <button @@ -71,13 +104,38 @@ exports[`Remove cluster confirmation modal renders splitbutton with modal includ role="menuitem" type="button" > - <strong> - Remove integration - </strong> + <svg + class="gl-icon s16 gl-new-dropdown-item-check-icon gl-visibility-hidden" + data-testid="mobile-issue-close-icon" + > + <use + href="#mobile-issue-close" + /> + </svg> + + <!----> - <div> - Removes cluster from project but keeps associated resources + <!----> + + <div + class="gl-new-dropdown-item-text-wrapper" + > + <p + class="gl-new-dropdown-item-text-primary" + > + <strong> + Remove integration + </strong> + + <div> + Removes cluster from project but keeps associated resources + </div> + </p> + + <!----> </div> + + <!----> </button> </li> diff --git a/spec/frontend/clusters/components/fluentd_output_settings_spec.js b/spec/frontend/clusters/components/fluentd_output_settings_spec.js index c263679a45c..25db8785edc 100644 --- a/spec/frontend/clusters/components/fluentd_output_settings_spec.js +++ b/spec/frontend/clusters/components/fluentd_output_settings_spec.js @@ -1,5 +1,5 @@ import { shallowMount } from '@vue/test-utils'; -import { GlAlert, GlDeprecatedDropdown, GlFormCheckbox } from '@gitlab/ui'; +import { GlAlert, GlDropdown, GlFormCheckbox } from '@gitlab/ui'; import FluentdOutputSettings from '~/clusters/components/fluentd_output_settings.vue'; import { APPLICATION_STATUS, FLUENTD } from '~/clusters/constants'; import eventHub from '~/clusters/event_hub'; @@ -36,7 +36,7 @@ describe('FluentdOutputSettings', () => { }; const findSaveButton = () => wrapper.find({ ref: 'saveBtn' }); const findCancelButton = () => wrapper.find({ ref: 'cancelBtn' }); - const findProtocolDropdown = () => wrapper.find(GlDeprecatedDropdown); + const findProtocolDropdown = () => wrapper.find(GlDropdown); const findCheckbox = name => wrapper.findAll(GlFormCheckbox).wrappers.find(x => x.text() === name); const findHost = () => wrapper.find('#fluentd-host'); diff --git a/spec/frontend/clusters/components/ingress_modsecurity_settings_spec.js b/spec/frontend/clusters/components/ingress_modsecurity_settings_spec.js index 3a9a608b2e2..1f07a0b7908 100644 --- a/spec/frontend/clusters/components/ingress_modsecurity_settings_spec.js +++ b/spec/frontend/clusters/components/ingress_modsecurity_settings_spec.js @@ -1,5 +1,5 @@ import { shallowMount } from '@vue/test-utils'; -import { GlAlert, GlToggle, GlDeprecatedDropdown } from '@gitlab/ui'; +import { GlAlert, GlToggle, GlDropdown } from '@gitlab/ui'; import IngressModsecuritySettings from '~/clusters/components/ingress_modsecurity_settings.vue'; import { APPLICATION_STATUS, INGRESS } from '~/clusters/constants'; import eventHub from '~/clusters/event_hub'; @@ -28,10 +28,12 @@ describe('IngressModsecuritySettings', () => { }); }; - const findSaveButton = () => wrapper.find('.btn-success'); - const findCancelButton = () => wrapper.find('[variant="secondary"]'); + const findSaveButton = () => + wrapper.find('[data-qa-selector="save_ingress_modsecurity_settings"]'); + const findCancelButton = () => + wrapper.find('[data-qa-selector="cancel_ingress_modsecurity_settings"]'); const findModSecurityToggle = () => wrapper.find(GlToggle); - const findModSecurityDropdown = () => wrapper.find(GlDeprecatedDropdown); + const findModSecurityDropdown = () => wrapper.find(GlDropdown); describe('when ingress is installed', () => { beforeEach(() => { diff --git a/spec/frontend/clusters/components/knative_domain_editor_spec.js b/spec/frontend/clusters/components/knative_domain_editor_spec.js index 11ebe1b5d61..b7f76211fd6 100644 --- a/spec/frontend/clusters/components/knative_domain_editor_spec.js +++ b/spec/frontend/clusters/components/knative_domain_editor_spec.js @@ -1,5 +1,5 @@ import { shallowMount } from '@vue/test-utils'; -import { GlDeprecatedDropdownItem, GlButton } from '@gitlab/ui'; +import { GlDropdownItem, GlButton } from '@gitlab/ui'; import KnativeDomainEditor from '~/clusters/components/knative_domain_editor.vue'; import { APPLICATION_STATUS } from '~/clusters/constants'; @@ -112,7 +112,7 @@ describe('KnativeDomainEditor', () => { createComponent({ knative: { ...knative, availableDomains: [newDomain] } }); jest.spyOn(wrapper.vm, 'selectDomain'); - wrapper.find(GlDeprecatedDropdownItem).vm.$emit('click'); + wrapper.find(GlDropdownItem).vm.$emit('click'); return wrapper.vm.$nextTick().then(() => { expect(wrapper.vm.selectDomain).toHaveBeenCalledWith(newDomain); |