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