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
71377ae9
Commit
71377ae9
authored
Nov 26, 2021
by
Jannik Lehmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace GlTable with GlTablelite for DevOps Score
parent
96d21031
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
app/assets/javascripts/analytics/devops_reports/components/devops_score.vue
...ipts/analytics/devops_reports/components/devops_score.vue
+4
-4
spec/frontend/admin/analytics/devops_score/components/devops_score_spec.js
...in/analytics/devops_score/components/devops_score_spec.js
+4
-4
No files found.
app/assets/javascripts/analytics/devops_reports/components/devops_score.vue
View file @
71377ae9
<
script
>
import
{
GlBadge
,
GlTable
,
GlLink
,
GlEmptyState
}
from
'
@gitlab/ui
'
;
import
{
GlBadge
,
GlTable
Lite
,
GlLink
,
GlEmptyState
}
from
'
@gitlab/ui
'
;
import
{
GlSingleStat
}
from
'
@gitlab/ui/dist/charts
'
;
import
{
helpPagePath
}
from
'
~/helpers/help_page_helper
'
;
import
{
sprintf
,
s__
}
from
'
~/locale
'
;
...
...
@@ -13,7 +13,7 @@ const defaultHeaderAttrs = {
export
default
{
components
:
{
GlBadge
,
GlTable
,
GlTable
Lite
,
GlSingleStat
,
GlLink
,
GlEmptyState
,
...
...
@@ -94,7 +94,7 @@ export default {
:meta-text=
"devopsScoreMetrics.averageScore.scoreLevel.label"
:variant=
"devopsScoreMetrics.averageScore.scoreLevel.variant"
/>
<gl-table
<gl-table
-lite
:fields=
"$options.tableHeaderFields"
:items=
"devopsScoreMetrics.cards"
thead-class=
"gl-border-t-0 gl-border-b-solid gl-border-b-1 gl-border-b-gray-100"
...
...
@@ -108,7 +108,7 @@ export default {
}}
</gl-badge>
</div>
</
template
>
</gl-table>
</gl-table
-lite
>
</div>
</div>
</template>
spec/frontend/admin/analytics/devops_score/components/devops_score_spec.js
View file @
71377ae9
import
{
GlTable
,
GlBadge
,
GlEmptyState
}
from
'
@gitlab/ui
'
;
import
{
GlTable
Lite
,
GlBadge
,
GlEmptyState
}
from
'
@gitlab/ui
'
;
import
{
GlSingleStat
}
from
'
@gitlab/ui/dist/charts
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
{
extendedWrapper
}
from
'
helpers/vue_test_utils_helper
'
;
...
...
@@ -20,7 +20,7 @@ describe('DevopsScore', () => {
);
};
const
findTable
=
()
=>
wrapper
.
findComponent
(
GlTable
);
const
findTable
=
()
=>
wrapper
.
findComponent
(
GlTable
Lite
);
const
findEmptyState
=
()
=>
wrapper
.
findComponent
(
GlEmptyState
);
const
findCol
=
(
testId
)
=>
findTable
().
find
(
`[data-testid="
${
testId
}
"]`
);
const
findUsageCol
=
()
=>
findCol
(
'
usageCol
'
);
...
...
@@ -124,11 +124,11 @@ describe('DevopsScore', () => {
describe
(
'
table columns
'
,
()
=>
{
describe
(
'
Your usage
'
,
()
=>
{
it
(
'
displays the corr
r
ect value
'
,
()
=>
{
it
(
'
displays the correct value
'
,
()
=>
{
expect
(
findUsageCol
().
text
()).
toContain
(
'
3.2
'
);
});
it
(
'
displays the corr
r
ect badge
'
,
()
=>
{
it
(
'
displays the correct badge
'
,
()
=>
{
const
badge
=
findUsageCol
().
find
(
GlBadge
);
expect
(
badge
.
exists
()).
toBe
(
true
);
...
...
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