Commit f0d98939 authored by Mike Jang's avatar Mike Jang Committed by Kushal Pandya

Migrate self monitor form button

parent c3a1afa6
<script> <script>
/* eslint-disable vue/no-v-html */ /* eslint-disable vue/no-v-html */
import Vue from 'vue'; import Vue from 'vue';
import { GlFormGroup, GlDeprecatedButton, GlModal, GlToast, GlToggle } from '@gitlab/ui'; import { GlFormGroup, GlButton, GlModal, GlToast, GlToggle } from '@gitlab/ui';
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import { __, s__, sprintf } from '~/locale'; import { __, s__, sprintf } from '~/locale';
import { visitUrl, getBaseURL } from '~/lib/utils/url_utility'; import { visitUrl, getBaseURL } from '~/lib/utils/url_utility';
...@@ -11,7 +11,7 @@ Vue.use(GlToast); ...@@ -11,7 +11,7 @@ Vue.use(GlToast);
export default { export default {
components: { components: {
GlFormGroup, GlFormGroup,
GlDeprecatedButton, GlButton,
GlModal, GlModal,
GlToggle, GlToggle,
}, },
...@@ -123,7 +123,7 @@ export default { ...@@ -123,7 +123,7 @@ export default {
<h4 class="js-section-header"> <h4 class="js-section-header">
{{ s__('SelfMonitoring|Self monitoring') }} {{ s__('SelfMonitoring|Self monitoring') }}
</h4> </h4>
<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__('SelfMonitoring|Enable or disable instance self monitoring') }} {{ s__('SelfMonitoring|Enable or disable instance self monitoring') }}
</p> </p>
...@@ -146,6 +146,7 @@ export default { ...@@ -146,6 +146,7 @@ export default {
:ok-title="__('Delete project')" :ok-title="__('Delete project')"
:cancel-title="__('Cancel')" :cancel-title="__('Cancel')"
ok-variant="danger" ok-variant="danger"
category="primary"
@ok="deleteProject" @ok="deleteProject"
@cancel="hideSelfMonitorModal" @cancel="hideSelfMonitorModal"
> >
......
...@@ -15,13 +15,16 @@ exports[`self monitor component When the self monitor project has not been creat ...@@ -15,13 +15,16 @@ exports[`self monitor component When the self monitor project has not been creat
</h4> </h4>
<gl-deprecated-button-stub <gl-button-stub
buttontextclasses=""
category="primary"
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"
...@@ -56,6 +59,7 @@ exports[`self monitor component When the self monitor project has not been creat ...@@ -56,6 +59,7 @@ exports[`self monitor component When the self monitor project has not been creat
<gl-modal-stub <gl-modal-stub
cancel-title="Cancel" cancel-title="Cancel"
category="primary"
modalclass="" modalclass=""
modalid="delete-self-monitor-modal" modalid="delete-self-monitor-modal"
ok-title="Delete project" ok-title="Delete project"
......
import { shallowMount } from '@vue/test-utils'; import { 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 SelfMonitor from '~/self_monitor/components/self_monitor_form.vue'; import SelfMonitor from '~/self_monitor/components/self_monitor_form.vue';
import { createStore } from '~/self_monitor/store'; import { createStore } from '~/self_monitor/store';
...@@ -42,7 +42,7 @@ describe('self monitor component', () => { ...@@ -42,7 +42,7 @@ describe('self monitor component', () => {
it('renders as an expand button by default', () => { it('renders as an expand button by default', () => {
wrapper = shallowMount(SelfMonitor, { store }); wrapper = shallowMount(SelfMonitor, { store });
const button = wrapper.find(GlDeprecatedButton); const button = wrapper.find(GlButton);
expect(button.text()).toBe('Expand'); expect(button.text()).toBe('Expand');
}); });
......
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