Commit e6e504ac authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch 'selhorn-buyrunner-button' into 'master'

Replace deprecated-button - shared runner minutes

Closes #219784

See merge request gitlab-org/gitlab!39393
parents 4eaed32a 0019deb5
<script> <script>
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import { s__, sprintf } from '~/locale'; import { s__, sprintf } from '~/locale';
export default { export default {
components: { components: {
GlDeprecatedButton, GlButton,
}, },
props: { props: {
quotaUsed: { quotaUsed: {
...@@ -55,13 +55,14 @@ export default { ...@@ -55,13 +55,14 @@ export default {
<a :href="runnersPath">{{ __('Runners page.') }}</a> <a :href="runnersPath">{{ __('Runners page.') }}</a>
</template> </template>
</p> </p>
<gl-deprecated-button <gl-button
v-if="subscriptionsMoreMinutesUrl" v-if="subscriptionsMoreMinutesUrl"
variant="danger" variant="danger"
category="primary"
:href="subscriptionsMoreMinutesUrl" :href="subscriptionsMoreMinutesUrl"
class="btn-inverted" class="btn-inverted"
> >
{{ __('Purchase more minutes') }} {{ __('Purchase more minutes') }}
</gl-deprecated-button> </gl-button>
</div> </div>
</template> </template>
import SharedRunnerLimitBlock from 'ee/jobs/components/shared_runner_limit_block.vue'; import SharedRunnerLimitBlock from 'ee/jobs/components/shared_runner_limit_block.vue';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import { trimText } from 'helpers/text_helper'; import { trimText } from 'helpers/text_helper';
describe('Shared Runner Limit Block', () => { describe('Shared Runner Limit Block', () => {
...@@ -40,12 +40,12 @@ describe('Shared Runner Limit Block', () => { ...@@ -40,12 +40,12 @@ describe('Shared Runner Limit Block', () => {
); );
}); });
it('renders call to action gl-deprecated-button with the right href', () => { it('renders call to action gl-button with the right href', () => {
const glDeprecatedButton = wrapper.find(GlDeprecatedButton); const glButton = wrapper.find(GlButton);
expect(glDeprecatedButton.isVisible()).toBe(true); expect(glButton.isVisible()).toBe(true);
expect(glDeprecatedButton.attributes('variant')).toBe('danger'); expect(glButton.attributes('variant')).toBe('danger');
expect(glDeprecatedButton.attributes('href')).toBe(subscriptionsMoreMinutesUrl); expect(glButton.attributes('href')).toBe(subscriptionsMoreMinutesUrl);
}); });
}); });
......
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