Commit 621e7b07 authored by Fernando's avatar Fernando

Apply maintainer feedback

* Restructure vue templates
* Fix unit test
parent 08f51415
......@@ -131,26 +131,24 @@ export default {
<template v-else>{{ s__('Licenses|Specified policies in this project') }}</template>
</header>
<template>
<gl-tabs v-model="tabIndex" content-class="pt-0">
<gl-tab data-testid="licensesTab">
<template #title>
<span data-testid="licensesTabTitle">{{ s__('Licenses|Detected in Project') }}</span>
<gl-badge pill>{{ licenseCount }}</gl-badge>
</template>
<gl-tabs v-model="tabIndex" content-class="pt-0">
<gl-tab data-testid="licensesTab">
<template #title>
<span data-testid="licensesTabTitle">{{ s__('Licenses|Detected in Project') }}</span>
<gl-badge pill>{{ licenseCount }}</gl-badge>
</template>
<detected-licenses-table />
</gl-tab>
<detected-licenses-table />
</gl-tab>
<gl-tab data-testid="policiesTab">
<template #title>
<span data-testid="policiesTabTitle">{{ s__('Licenses|Policies') }}</span>
<gl-badge pill>{{ policyCount }}</gl-badge>
</template>
<gl-tab data-testid="policiesTab">
<template #title>
<span data-testid="policiesTabTitle">{{ s__('Licenses|Policies') }}</span>
<gl-badge pill>{{ policyCount }}</gl-badge>
</template>
<license-management />
</gl-tab>
</gl-tabs>
</template>
<license-management />
</gl-tab>
</gl-tabs>
</div>
</template>
......@@ -106,34 +106,34 @@ export default {
<template v-else>
<div class="table-section gl-d-flex gl-pl-2 section-70" role="rowheader">
{{ s__('Licenses|Policy') }}
<gl-icon
v-if="isTooltipEnabled"
ref="reportInfo"
name="question"
class="text-info gl-ml-1 gl-cursor-pointer"
:aria-label="__('help')"
:size="14"
/>
<gl-popover
v-if="isTooltipEnabled"
:target="() => $refs.reportInfo.$el"
placement="bottom"
triggers="click blur"
:css-classes="['gl-mt-3']"
>
<div class="h5">{{ __('Allowed') }}</div>
<span class="text-secondary">
{{ s__('Licenses|Acceptable license to be used in the project') }}</span
<template v-if="isTooltipEnabled">
<gl-icon
ref="reportInfo"
name="question"
class="text-info gl-ml-1 gl-cursor-pointer"
:aria-label="__('help')"
:size="14"
/>
<gl-popover
:target="() => $refs.reportInfo.$el"
placement="bottom"
triggers="click blur"
:css-classes="['gl-mt-3']"
>
<div class="h5">{{ __('Denied') }}</div>
<span class="text-secondary">
{{
s__(
'Licenses|Disallow Merge request if detected and will instruct the developer to remove',
)
}}</span
>
</gl-popover>
<div class="h5">{{ __('Allowed') }}</div>
<span class="text-secondary">
{{ s__('Licenses|Acceptable license to be used in the project') }}</span
>
<div class="h5">{{ __('Denied') }}</div>
<span class="text-secondary">
{{
s__(
'Licenses|Disallow Merge request if detected and will instruct the developer to remove',
)
}}</span
>
</gl-popover>
</template>
</div>
<div class="table-section section-30" role="rowheader">
......
......@@ -199,11 +199,11 @@ describe('License Management', () => {
describe.each([true, false])(
'when licenseComplianceDeniesMr feature flag is %p',
({ licenseComplianceDeniesMr }) => {
licenseComplianceDeniesMr => {
it('should not show the developer only tooltip', () => {
createComponent({
state: { isLoadingManagedLicenses: false },
isAdmin: false,
isAdmin: true,
provide: {
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