Commit a97bc269 authored by Taurie Davis's avatar Taurie Davis

Migrate repo file status icon tooltip to gitlab ui

parent c0e4df7d
<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