Commit fe40c80a authored by Miguel Rincon's avatar Miguel Rincon

Merge branch 'remove-project' into 'master'

Button migration in security dashboard

Closes #219849

See merge request gitlab-org/gitlab!38741
parents 34f28a6d c71e422a
<script> <script>
import { import {
GlDeprecatedBadge as GlBadge, GlDeprecatedBadge as GlBadge,
GlDeprecatedButton, GlButton,
GlLoadingIcon, GlLoadingIcon,
GlTooltipDirective, GlTooltipDirective,
} from '@gitlab/ui'; } from '@gitlab/ui';
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';
export default { export default {
components: { components: {
GlBadge, GlBadge,
GlDeprecatedButton, GlButton,
GlLoadingIcon, GlLoadingIcon,
Icon,
ProjectAvatar, ProjectAvatar,
}, },
directives: { directives: {
...@@ -55,14 +53,13 @@ export default { ...@@ -55,14 +53,13 @@ export default {
<span> <span>
{{ project.name_with_namespace || project.nameWithNamespace }} {{ project.name_with_namespace || project.nameWithNamespace }}
</span> </span>
<gl-deprecated-button <gl-button
v-gl-tooltip v-gl-tooltip
class="ml-auto bg-transparent border-0 p-0 text-secondary js-projects-list-project-remove" icon="remove"
class="gl-ml-auto js-projects-list-project-remove"
:title="s__('SecurityReports|Remove project from dashboard')" :title="s__('SecurityReports|Remove project from dashboard')"
@click="projectRemoved(project)" @click="projectRemoved(project)"
> />
<icon name="remove" />
</gl-deprecated-button>
</li> </li>
</ul> </ul>
<p v-else class="text-secondary js-projects-list-empty-message"> <p v-else class="text-secondary js-projects-list-empty-message">
......
---
title: Button migration to component
merge_request:
author:
type: changed
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedBadge as GlBadge, GlDeprecatedButton, GlLoadingIcon } from '@gitlab/ui'; import { GlDeprecatedBadge as GlBadge, GlButton, GlLoadingIcon } from '@gitlab/ui';
import ProjectList from 'ee/security_dashboard/components/first_class_project_manager/project_list.vue'; import ProjectList from 'ee/security_dashboard/components/first_class_project_manager/project_list.vue';
import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue'; import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue';
...@@ -96,7 +96,7 @@ describe('Project List component', () => { ...@@ -96,7 +96,7 @@ describe('Project List component', () => {
const mockProjects = generateMockProjects(1); const mockProjects = generateMockProjects(1);
const [projectData] = mockProjects; const [projectData] = mockProjects;
factory({ projects: mockProjects, stubs: { GlDeprecatedButton } }); factory({ projects: mockProjects, stubs: { GlButton } });
getFirstRemoveButton().vm.$emit('click'); getFirstRemoveButton().vm.$emit('click');
......
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