Commit 1e8d75c4 authored by Libor Vanc's avatar Libor Vanc Committed by Mike Greiling

Replaced deprecated button syntax

parent 07de2c2d
<script> <script>
import { GlDeprecatedButton, GlFormGroup, GlFormInput, GlFormCheckbox } from '@gitlab/ui'; import { GlButton, GlFormGroup, GlFormInput, GlFormCheckbox } from '@gitlab/ui';
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
GlDeprecatedButton, GlButton,
GlFormCheckbox, GlFormCheckbox,
GlFormGroup, GlFormGroup,
GlFormInput, GlFormInput,
...@@ -58,7 +58,7 @@ export default { ...@@ -58,7 +58,7 @@ export default {
<h3 class="js-section-header h4"> <h3 class="js-section-header h4">
{{ s__('GrafanaIntegration|Grafana authentication') }} {{ s__('GrafanaIntegration|Grafana authentication') }}
</h3> </h3>
<gl-deprecated-button class="js-settings-toggle">{{ __('Expand') }}</gl-deprecated-button> <gl-button class="js-settings-toggle">{{ __('Expand') }}</gl-button>
<p class="js-section-sub-header"> <p class="js-section-sub-header">
{{ s__('GrafanaIntegration|Embed Grafana charts in GitLab issues.') }} {{ s__('GrafanaIntegration|Embed Grafana charts in GitLab issues.') }}
</p> </p>
...@@ -93,9 +93,9 @@ export default { ...@@ -93,9 +93,9 @@ export default {
</a> </a>
</p> </p>
</gl-form-group> </gl-form-group>
<gl-deprecated-button variant="success" @click="updateGrafanaIntegration"> <gl-button variant="success" category="primary" @click="updateGrafanaIntegration">
{{ __('Save Changes') }} {{ __('Save Changes') }}
</gl-deprecated-button> </gl-button>
</form> </form>
</div> </div>
</section> </section>
......
...@@ -16,13 +16,15 @@ exports[`grafana integration component default state to match the default snapsh ...@@ -16,13 +16,15 @@ exports[`grafana integration component default state to match the default snapsh
</h3> </h3>
<gl-deprecated-button-stub <gl-button-stub
category="tertiary"
class="js-settings-toggle" class="js-settings-toggle"
size="md" icon=""
variant="secondary" size="medium"
variant="default"
> >
Expand Expand
</gl-deprecated-button-stub> </gl-button-stub>
<p <p
class="js-section-sub-header" class="js-section-sub-header"
...@@ -90,14 +92,16 @@ exports[`grafana integration component default state to match the default snapsh ...@@ -90,14 +92,16 @@ exports[`grafana integration component default state to match the default snapsh
</p> </p>
</gl-form-group-stub> </gl-form-group-stub>
<gl-deprecated-button-stub <gl-button-stub
size="md" category="primary"
icon=""
size="medium"
variant="success" variant="success"
> >
Save Changes Save Changes
</gl-deprecated-button-stub> </gl-button-stub>
</form> </form>
</div> </div>
</section> </section>
......
import { mount, shallowMount } from '@vue/test-utils'; 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 { TEST_HOST } from 'helpers/test_constants';
import GrafanaIntegration from '~/grafana_integration/components/grafana_integration.vue'; import GrafanaIntegration from '~/grafana_integration/components/grafana_integration.vue';
import { createStore } from '~/grafana_integration/store'; import { createStore } from '~/grafana_integration/store';
...@@ -51,7 +51,7 @@ describe('grafana integration component', () => { ...@@ -51,7 +51,7 @@ describe('grafana integration component', () => {
it('renders as an expand button by default', () => { it('renders as an expand button by default', () => {
wrapper = shallowMount(GrafanaIntegration, { store }); wrapper = shallowMount(GrafanaIntegration, { store });
const button = wrapper.find(GlDeprecatedButton); const button = wrapper.find(GlButton);
expect(button.text()).toBe('Expand'); expect(button.text()).toBe('Expand');
}); });
...@@ -77,8 +77,7 @@ describe('grafana integration component', () => { ...@@ -77,8 +77,7 @@ describe('grafana integration component', () => {
}); });
describe('submit button', () => { describe('submit button', () => {
const findSubmitButton = () => const findSubmitButton = () => wrapper.find('.settings-content form').find(GlButton);
wrapper.find('.settings-content form').find(GlDeprecatedButton);
const endpointRequest = [ const endpointRequest = [
operationsSettingsEndpoint, operationsSettingsEndpoint,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment