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