Commit 38640295 authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch 'project-header-buttons' into 'master'

Update deprecated project header buttons

Closes #219882

See merge request gitlab-org/gitlab!37141
parents 7b32c4f2 685d0ebc
<script> <script>
import { GlTooltipDirective, GlLink, GlDeprecatedButton } from '@gitlab/ui'; import { GlTooltipDirective, GlLink, GlButton } from '@gitlab/ui';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue'; import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue';
...@@ -9,7 +9,7 @@ export default { ...@@ -9,7 +9,7 @@ export default {
Icon, Icon,
ProjectAvatar, ProjectAvatar,
GlLink, GlLink,
GlDeprecatedButton, GlButton,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
...@@ -58,9 +58,9 @@ export default { ...@@ -58,9 +58,9 @@ export default {
</button> </button>
<ul class="dropdown-menu dropdown-menu-right"> <ul class="dropdown-menu dropdown-menu-right">
<li> <li>
<gl-deprecated-button class="js-remove-button" @click="onRemove()"> <gl-button class="js-remove-button" variant="link" @click="onRemove()">
<span class="text-danger"> {{ $options.removeProjectText }} </span> <span class="text-danger"> {{ $options.removeProjectText }} </span>
</gl-deprecated-button> </gl-button>
</li> </li>
</ul> </ul>
</div> </div>
......
...@@ -67,17 +67,19 @@ exports[`Project Header matches the snapshot 1`] = ` ...@@ -67,17 +67,19 @@ exports[`Project Header matches the snapshot 1`] = `
class="dropdown-menu dropdown-menu-right" class="dropdown-menu dropdown-menu-right"
> >
<li> <li>
<gl-deprecated-button-stub <gl-button-stub
category="tertiary"
class="js-remove-button" class="js-remove-button"
size="md" icon=""
variant="secondary" size="medium"
variant="link"
> >
<span <span
class="text-danger" class="text-danger"
> >
Remove Remove
</span> </span>
</gl-deprecated-button-stub> </gl-button-stub>
</li> </li>
</ul> </ul>
</div> </div>
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import component from 'ee/environments_dashboard/components/dashboard/project_header.vue'; import component from 'ee/environments_dashboard/components/dashboard/project_header.vue';
import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue'; import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue';
...@@ -79,7 +79,7 @@ describe('Project Header', () => { ...@@ -79,7 +79,7 @@ describe('Project Header', () => {
.filter(w => w.text() === 'Remove'); .filter(w => w.text() === 'Remove');
removeLink removeLink
.at(0) .at(0)
.find(GlDeprecatedButton) .find(GlButton)
.vm.$emit('click'); .vm.$emit('click');
return wrapper.vm.$nextTick().then(() => { return wrapper.vm.$nextTick().then(() => {
......
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