diff options
Diffstat (limited to 'spec/frontend/grafana_integration/components')
-rw-r--r-- | spec/frontend/grafana_integration/components/__snapshots__/grafana_integration_spec.js.snap | 30 | ||||
-rw-r--r-- | spec/frontend/grafana_integration/components/grafana_integration_spec.js | 11 |
2 files changed, 24 insertions, 17 deletions
diff --git a/spec/frontend/grafana_integration/components/__snapshots__/grafana_integration_spec.js.snap b/spec/frontend/grafana_integration/components/__snapshots__/grafana_integration_spec.js.snap index 1595f6c9fff..0e16b726c4b 100644 --- a/spec/frontend/grafana_integration/components/__snapshots__/grafana_integration_spec.js.snap +++ b/spec/frontend/grafana_integration/components/__snapshots__/grafana_integration_spec.js.snap @@ -12,17 +12,19 @@ exports[`grafana integration component default state to match the default snapsh class="js-section-header h4" > - Grafana Authentication + Grafana authentication </h3> - <gl-deprecated-button-stub + <gl-button-stub + category="primary" class="js-settings-toggle" - size="md" - variant="secondary" + icon="" + size="medium" + variant="default" > Expand - </gl-deprecated-button-stub> + </gl-button-stub> <p class="js-section-sub-header" @@ -90,14 +92,20 @@ exports[`grafana integration component default state to match the default snapsh </p> </gl-form-group-stub> - <gl-deprecated-button-stub - size="md" - variant="success" + <div + class="gl-display-flex gl-justify-content-end" > + <gl-button-stub + category="primary" + icon="" + size="medium" + variant="success" + > + + Save Changes - Save Changes - - </gl-deprecated-button-stub> + </gl-button-stub> + </div> </form> </div> </section> diff --git a/spec/frontend/grafana_integration/components/grafana_integration_spec.js b/spec/frontend/grafana_integration/components/grafana_integration_spec.js index 3df200a98e4..df88a336c09 100644 --- a/spec/frontend/grafana_integration/components/grafana_integration_spec.js +++ b/spec/frontend/grafana_integration/components/grafana_integration_spec.js @@ -1,11 +1,11 @@ import { mount, shallowMount } from '@vue/test-utils'; -import { GlDeprecatedButton } from '@gitlab/ui'; +import { GlButton } from '@gitlab/ui'; import { TEST_HOST } from 'helpers/test_constants'; import GrafanaIntegration from '~/grafana_integration/components/grafana_integration.vue'; import { createStore } from '~/grafana_integration/store'; import axios from '~/lib/utils/axios_utils'; import { refreshCurrentPage } from '~/lib/utils/url_utility'; -import createFlash from '~/flash'; +import { deprecatedCreateFlash as createFlash } from '~/flash'; jest.mock('~/lib/utils/url_utility'); jest.mock('~/flash'); @@ -44,14 +44,14 @@ describe('grafana integration component', () => { it('renders header text', () => { wrapper = shallowMount(GrafanaIntegration, { store }); - expect(wrapper.find('.js-section-header').text()).toBe('Grafana Authentication'); + expect(wrapper.find('.js-section-header').text()).toBe('Grafana authentication'); }); describe('expand/collapse button', () => { it('renders as an expand button by default', () => { wrapper = shallowMount(GrafanaIntegration, { store }); - const button = wrapper.find(GlDeprecatedButton); + const button = wrapper.find(GlButton); expect(button.text()).toBe('Expand'); }); @@ -77,8 +77,7 @@ describe('grafana integration component', () => { }); describe('submit button', () => { - const findSubmitButton = () => - wrapper.find('.settings-content form').find(GlDeprecatedButton); + const findSubmitButton = () => wrapper.find('.settings-content form').find(GlButton); const endpointRequest = [ operationsSettingsEndpoint, |