Commit 151772b3 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Merge branch '228996-migrate-deprecated-tooltip-group-list-view' into 'master'

Migrate deprecated tooltip in group list view

See merge request gitlab-org/gitlab!45390
parents 786ae99e 1aff5d45
<script>
import { GlIcon } from '@gitlab/ui';
import tooltip from '~/vue_shared/directives/tooltip';
import { GlIcon, GlTooltipDirective } from '@gitlab/ui';
export default {
components: {
GlIcon,
},
directives: {
tooltip,
GlTooltip: GlTooltipDirective,
},
props: {
title: {
......@@ -51,7 +50,7 @@ export default {
<template>
<span
v-tooltip
v-gl-tooltip
:data-placement="tooltipPlacement"
:class="cssClass"
:title="title"
......
......@@ -203,7 +203,7 @@ describe('GroupItemComponent', () => {
expect(vm.$el.querySelector('.title a.no-expand')).toBeDefined();
expect(visibilityIconEl).not.toBe(null);
expect(visibilityIconEl.dataset.originalTitle).toBe(vm.visibilityTooltip);
expect(visibilityIconEl.title).toBe(vm.visibilityTooltip);
expect(visibilityIconEl.querySelectorAll('svg').length).toBeGreaterThan(0);
expect(vm.$el.querySelector('.access-type')).toBeDefined();
......
......@@ -49,7 +49,7 @@ describe('ItemStatsValue', () => {
});
it('renders element tooltip correctly', () => {
expect(wrapper.attributes('data-original-title')).toBe('Subgroups');
expect(wrapper.attributes('title')).toBe('Subgroups');
expect(wrapper.attributes('data-placement')).toBe('left');
});
......
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