Commit 79f7a27c authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'repo-file-status-icon-tooltip' into 'master'

Migrate repo file status icon tooltip to gitlab ui

See merge request gitlab-org/gitlab!46839
parents 7fc63bf1 a97bc269
<script>
import { GlIcon } from '@gitlab/ui';
import { GlIcon, GlTooltipDirective } from '@gitlab/ui';
import { __, sprintf } from '~/locale';
import tooltip from '~/vue_shared/directives/tooltip';
import '~/lib/utils/datetime_utility';
export default {
......@@ -9,7 +8,7 @@ export default {
GlIcon,
},
directives: {
tooltip,
GlTooltip: GlTooltipDirective,
},
props: {
file: {
......@@ -28,7 +27,7 @@ export default {
</script>
<template>
<span v-if="file.file_lock" v-tooltip :title="lockTooltip" data-container="body">
<span v-if="file.file_lock" v-gl-tooltip :title="lockTooltip" data-container="body">
<gl-icon name="lock" class="file-status-icon" />
</span>
</template>
......@@ -134,9 +134,7 @@ describe('RepoTab', () => {
});
it('renders a tooltip', () => {
expect(wrapper.find('span:nth-child(2)').attributes('data-original-title')).toContain(
'Locked by testuser',
);
expect(wrapper.find('span:nth-child(2)').attributes('title')).toBe('Locked by testuser');
});
});
......
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