Commit 621e7b07 authored by Fernando's avatar Fernando

Apply maintainer feedback

* Restructure vue templates
* Fix unit test
parent 08f51415
...@@ -131,7 +131,6 @@ export default { ...@@ -131,7 +131,6 @@ export default {
<template v-else>{{ s__('Licenses|Specified policies in this project') }}</template> <template v-else>{{ s__('Licenses|Specified policies in this project') }}</template>
</header> </header>
<template>
<gl-tabs v-model="tabIndex" content-class="pt-0"> <gl-tabs v-model="tabIndex" content-class="pt-0">
<gl-tab data-testid="licensesTab"> <gl-tab data-testid="licensesTab">
<template #title> <template #title>
...@@ -151,6 +150,5 @@ export default { ...@@ -151,6 +150,5 @@ export default {
<license-management /> <license-management />
</gl-tab> </gl-tab>
</gl-tabs> </gl-tabs>
</template>
</div> </div>
</template> </template>
...@@ -106,8 +106,8 @@ export default { ...@@ -106,8 +106,8 @@ export default {
<template v-else> <template v-else>
<div class="table-section gl-d-flex gl-pl-2 section-70" role="rowheader"> <div class="table-section gl-d-flex gl-pl-2 section-70" role="rowheader">
{{ s__('Licenses|Policy') }} {{ s__('Licenses|Policy') }}
<template v-if="isTooltipEnabled">
<gl-icon <gl-icon
v-if="isTooltipEnabled"
ref="reportInfo" ref="reportInfo"
name="question" name="question"
class="text-info gl-ml-1 gl-cursor-pointer" class="text-info gl-ml-1 gl-cursor-pointer"
...@@ -115,7 +115,6 @@ export default { ...@@ -115,7 +115,6 @@ export default {
:size="14" :size="14"
/> />
<gl-popover <gl-popover
v-if="isTooltipEnabled"
:target="() => $refs.reportInfo.$el" :target="() => $refs.reportInfo.$el"
placement="bottom" placement="bottom"
triggers="click blur" triggers="click blur"
...@@ -134,6 +133,7 @@ export default { ...@@ -134,6 +133,7 @@ export default {
}}</span }}</span
> >
</gl-popover> </gl-popover>
</template>
</div> </div>
<div class="table-section section-30" role="rowheader"> <div class="table-section section-30" role="rowheader">
......
...@@ -199,11 +199,11 @@ describe('License Management', () => { ...@@ -199,11 +199,11 @@ describe('License Management', () => {
describe.each([true, false])( describe.each([true, false])(
'when licenseComplianceDeniesMr feature flag is %p', 'when licenseComplianceDeniesMr feature flag is %p',
({ licenseComplianceDeniesMr }) => { licenseComplianceDeniesMr => {
it('should not show the developer only tooltip', () => { it('should not show the developer only tooltip', () => {
createComponent({ createComponent({
state: { isLoadingManagedLicenses: false }, state: { isLoadingManagedLicenses: false },
isAdmin: false, isAdmin: true,
provide: { provide: {
glFeatures: { licenseComplianceDeniesMr }, glFeatures: { licenseComplianceDeniesMr },
}, },
......
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