Commit d607e7e2 authored by Maria Vrachni's avatar Maria Vrachni Committed by Simon Knox

Update unit test attributes

* Update attribute we check to reflect new component attributes
parent 5e7565eb
<script> <script>
import { GlIcon } from '@gitlab/ui'; import { GlIcon, GlTooltipDirective } from '@gitlab/ui';
import tooltip from '~/vue_shared/directives/tooltip';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
import { COMMON_STR } from '../constants'; import { COMMON_STR } from '../constants';
...@@ -9,7 +8,7 @@ export default { ...@@ -9,7 +8,7 @@ export default {
GlIcon, GlIcon,
}, },
directives: { directives: {
tooltip, GlTooltip: GlTooltipDirective,
}, },
props: { props: {
parentGroup: { parentGroup: {
...@@ -47,12 +46,10 @@ export default { ...@@ -47,12 +46,10 @@ export default {
<div class="controls d-flex justify-content-end"> <div class="controls d-flex justify-content-end">
<a <a
v-if="group.canLeave" v-if="group.canLeave"
v-tooltip v-gl-tooltip.top
:href="group.leavePath" :href="group.leavePath"
:title="leaveBtnTitle" :title="leaveBtnTitle"
:aria-label="leaveBtnTitle" :aria-label="leaveBtnTitle"
data-container="body"
data-placement="bottom"
data-testid="leave-group-btn" data-testid="leave-group-btn"
class="leave-group btn btn-xs no-expand gl-text-gray-500 gl-ml-5" class="leave-group btn btn-xs no-expand gl-text-gray-500 gl-ml-5"
@click.prevent="onLeaveGroup" @click.prevent="onLeaveGroup"
...@@ -61,12 +58,10 @@ export default { ...@@ -61,12 +58,10 @@ export default {
</a> </a>
<a <a
v-if="group.canEdit" v-if="group.canEdit"
v-tooltip v-gl-tooltip.top
:href="group.editPath" :href="group.editPath"
:title="editBtnTitle" :title="editBtnTitle"
:aria-label="editBtnTitle" :aria-label="editBtnTitle"
data-container="body"
data-placement="bottom"
data-testid="edit-group-btn" data-testid="edit-group-btn"
class="edit-group btn btn-xs no-expand gl-text-gray-500 gl-ml-5" class="edit-group btn btn-xs no-expand gl-text-gray-500 gl-ml-5"
> >
......
---
title: Update Tooltip in Groups to use gl-tooltip
merge_request: 45305
author:
type: other
...@@ -50,7 +50,7 @@ describe('ItemActions', () => { ...@@ -50,7 +50,7 @@ describe('ItemActions', () => {
expect(findEditGroupBtn().classes()).toContain('no-expand'); expect(findEditGroupBtn().classes()).toContain('no-expand');
expect(findEditGroupBtn().attributes('href')).toBe(group.editPath); expect(findEditGroupBtn().attributes('href')).toBe(group.editPath);
expect(findEditGroupBtn().attributes('aria-label')).toBe('Edit group'); expect(findEditGroupBtn().attributes('aria-label')).toBe('Edit group');
expect(findEditGroupBtn().attributes('data-original-title')).toBe('Edit group'); expect(findEditGroupBtn().attributes('title')).toBe('Edit group');
expect(findEditGroupIcon().exists()).toBe(true); expect(findEditGroupIcon().exists()).toBe(true);
expect(findEditGroupIcon().props('name')).toBe('settings'); expect(findEditGroupIcon().props('name')).toBe('settings');
}); });
...@@ -70,7 +70,7 @@ describe('ItemActions', () => { ...@@ -70,7 +70,7 @@ describe('ItemActions', () => {
expect(findLeaveGroupBtn().classes()).toContain('no-expand'); expect(findLeaveGroupBtn().classes()).toContain('no-expand');
expect(findLeaveGroupBtn().attributes('href')).toBe(group.leavePath); expect(findLeaveGroupBtn().attributes('href')).toBe(group.leavePath);
expect(findLeaveGroupBtn().attributes('aria-label')).toBe('Leave this group'); expect(findLeaveGroupBtn().attributes('aria-label')).toBe('Leave this group');
expect(findLeaveGroupBtn().attributes('data-original-title')).toBe('Leave this group'); expect(findLeaveGroupBtn().attributes('title')).toBe('Leave this group');
expect(findLeaveGroupIcon().exists()).toBe(true); expect(findLeaveGroupIcon().exists()).toBe(true);
expect(findLeaveGroupIcon().props('name')).toBe('leave'); expect(findLeaveGroupIcon().props('name')).toBe('leave');
}); });
......
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