Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e471df7f
Commit
e471df7f
authored
Mar 02, 2021
by
David O'Regan
Committed by
Andrew Fontaine
Mar 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: counter badges are misaligned in License Compliance tabs
parent
35a6042b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
ee/app/assets/javascripts/license_compliance/components/app.vue
.../assets/javascripts/license_compliance/components/app.vue
+2
-2
ee/changelogs/unreleased/323206-counter-badge-alignment.yml
ee/changelogs/unreleased/323206-counter-badge-alignment.yml
+5
-0
ee/spec/frontend/license_compliance/components/app_spec.js
ee/spec/frontend/license_compliance/components/app_spec.js
+13
-3
No files found.
ee/app/assets/javascripts/license_compliance/components/app.vue
View file @
e471df7f
...
@@ -139,7 +139,7 @@ export default {
...
@@ -139,7 +139,7 @@ export default {
<gl-tab
data-testid=
"licensesTab"
>
<gl-tab
data-testid=
"licensesTab"
>
<
template
#title
>
<
template
#title
>
<span
data-testid=
"licensesTabTitle"
>
{{
s__
(
'
Licenses|Detected in Project
'
)
}}
</span>
<span
data-testid=
"licensesTabTitle"
>
{{
s__
(
'
Licenses|Detected in Project
'
)
}}
</span>
<gl-badge>
{{
licenseCount
}}
</gl-badge>
<gl-badge
size=
"sm"
class=
"gl-tab-counter-badge"
>
{{
licenseCount
}}
</gl-badge>
</
template
>
</
template
>
<detected-licenses-table
/>
<detected-licenses-table
/>
...
@@ -150,7 +150,7 @@ export default {
...
@@ -150,7 +150,7 @@ export default {
<span
data-qa-selector=
"policies_tab"
data-testid=
"policiesTabTitle"
>
{{
<span
data-qa-selector=
"policies_tab"
data-testid=
"policiesTabTitle"
>
{{
s__
(
'
Licenses|Policies
'
)
s__
(
'
Licenses|Policies
'
)
}}
</span>
}}
</span>
<gl-badge>
{{
policyCount
}}
</gl-badge>
<gl-badge
size=
"sm"
class=
"gl-tab-counter-badge"
>
{{
policyCount
}}
</gl-badge>
</
template
>
</
template
>
<license-management
/>
<license-management
/>
...
...
ee/changelogs/unreleased/323206-counter-badge-alignment.yml
0 → 100644
View file @
e471df7f
---
title
:
Counter badges are misaligned in License Compliance tabs
merge_request
:
55517
author
:
type
:
fixed
ee/spec/frontend/license_compliance/components/app_spec.js
View file @
e471df7f
...
@@ -177,7 +177,7 @@ describe('Project Licenses', () => {
...
@@ -177,7 +177,7 @@ describe('Project Licenses', () => {
it
(
'
renders a "Detected in project" tab and a "Policies" tab
'
,
()
=>
{
it
(
'
renders a "Detected in project" tab and a "Policies" tab
'
,
()
=>
{
expect
(
wrapper
.
find
(
GlTabs
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
(
GlTabs
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
(
GlTab
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
(
GlTab
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
findAll
(
GlTab
)).
toHaveLength
(
2
);
expect
(
wrapper
.
findAll
Components
(
GlTab
)).
toHaveLength
(
2
);
});
});
it
(
'
it renders the "Detected in project" table
'
,
()
=>
{
it
(
'
it renders the "Detected in project" table
'
,
()
=>
{
...
@@ -279,11 +279,21 @@ describe('Project Licenses', () => {
...
@@ -279,11 +279,21 @@ describe('Project Licenses', () => {
);
);
it
(
'
it renders the correct count in "Detected in project" tab
'
,
()
=>
{
it
(
'
it renders the correct count in "Detected in project" tab
'
,
()
=>
{
expect
(
wrapper
.
findAll
(
GlBadge
).
at
(
0
).
text
()).
toBe
(
pageInfo
.
total
.
toString
());
expect
(
wrapper
.
findAll
Components
(
GlBadge
).
at
(
0
).
text
()).
toBe
(
pageInfo
.
total
.
toString
());
});
});
it
(
'
it renders the correct count in "Policies" tab
'
,
()
=>
{
it
(
'
it renders the correct count in "Policies" tab
'
,
()
=>
{
expect
(
wrapper
.
findAll
(
GlBadge
).
at
(
1
).
text
()).
toBe
(
managedLicenses
.
length
.
toString
());
expect
(
wrapper
.
findAllComponents
(
GlBadge
).
at
(
1
).
text
()).
toBe
(
managedLicenses
.
length
.
toString
(),
);
});
it
(
'
it renders the correct type of badge styling
'
,
()
=>
{
const
badges
=
[
wrapper
.
findAllComponents
(
GlBadge
).
at
(
0
),
wrapper
.
findAllComponents
(
GlBadge
).
at
(
1
),
];
badges
.
forEach
((
badge
)
=>
expect
(
badge
.
classes
()).
toContain
(
'
gl-tab-counter-badge
'
));
});
});
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment