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
a36d6df2
Commit
a36d6df2
authored
May 05, 2021
by
Brandon Labuschagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply initial review feedback
parent
6aa8044f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
app/assets/javascripts/analytics/devops_report/components/devops_score.vue
...ripts/analytics/devops_report/components/devops_score.vue
+1
-1
spec/frontend/admin/analytics/devops_score/components/devops_score_spec.js
...in/analytics/devops_score/components/devops_score_spec.js
+4
-4
spec/helpers/dev_ops_report_helper_spec.rb
spec/helpers/dev_ops_report_helper_spec.rb
+6
-3
No files found.
app/assets/javascripts/analytics/devops_report/components/devops_score.vue
View file @
a36d6df2
...
@@ -71,7 +71,7 @@ export default {
...
@@ -71,7 +71,7 @@ export default {
:svg-path=
"noDataImagePath"
:svg-path=
"noDataImagePath"
>
>
<template
#description
>
<template
#description
>
<
div>
{{
__
(
'
It may be several days before you see feature usage data.
'
)
}}
</div
>
<
p
class=
"gl-mb-0"
>
{{
__
(
'
It may be several days before you see feature usage data.
'
)
}}
</p
>
<gl-link
:href=
"devopsReportDocsPath"
>
{{
<gl-link
:href=
"devopsReportDocsPath"
>
{{
__
(
'
Our documentation includes an example DevOps Score report.
'
)
__
(
'
Our documentation includes an example DevOps Score report.
'
)
}}
</gl-link>
}}
</gl-link>
...
...
spec/frontend/admin/analytics/devops_score/components/devops_score_spec.js
View file @
a36d6df2
...
@@ -25,8 +25,8 @@ describe('DevopsScore', () => {
...
@@ -25,8 +25,8 @@ describe('DevopsScore', () => {
);
);
};
};
const
findTable
=
()
=>
wrapper
.
find
(
GlTable
);
const
findTable
=
()
=>
wrapper
.
find
Component
(
GlTable
);
const
findEmptyState
=
()
=>
wrapper
.
find
(
GlEmptyState
);
const
findEmptyState
=
()
=>
wrapper
.
find
Component
(
GlEmptyState
);
const
findCol
=
(
testId
)
=>
findTable
().
find
(
`[data-testid="
${
testId
}
"]`
);
const
findCol
=
(
testId
)
=>
findTable
().
find
(
`[data-testid="
${
testId
}
"]`
);
const
findUsageCol
=
()
=>
findCol
(
'
usageCol
'
);
const
findUsageCol
=
()
=>
findCol
(
'
usageCol
'
);
const
findDevopsScoreApp
=
()
=>
wrapper
.
findByTestId
(
'
devops-score-app
'
);
const
findDevopsScoreApp
=
()
=>
wrapper
.
findByTestId
(
'
devops-score-app
'
);
...
@@ -48,7 +48,7 @@ describe('DevopsScore', () => {
...
@@ -48,7 +48,7 @@ describe('DevopsScore', () => {
});
});
it
(
'
contains a link to the feature documentation
'
,
()
=>
{
it
(
'
contains a link to the feature documentation
'
,
()
=>
{
expect
(
wrapper
.
find
(
GlLink
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
Component
(
GlLink
).
exists
()).
toBe
(
true
);
});
});
});
});
...
@@ -78,7 +78,7 @@ describe('DevopsScore', () => {
...
@@ -78,7 +78,7 @@ describe('DevopsScore', () => {
});
});
it
(
'
displays the single stat section
'
,
()
=>
{
it
(
'
displays the single stat section
'
,
()
=>
{
const
component
=
wrapper
.
find
(
GlSingleStat
);
const
component
=
wrapper
.
find
Component
(
GlSingleStat
);
expect
(
component
.
exists
()).
toBe
(
true
);
expect
(
component
.
exists
()).
toBe
(
true
);
expect
(
component
.
props
(
'
value
'
)).
toBe
(
devopsScoreMetricsData
.
averageScore
.
value
);
expect
(
component
.
props
(
'
value
'
)).
toBe
(
devopsScoreMetricsData
.
averageScore
.
value
);
...
...
spec/helpers/dev_ops_report_helper_spec.rb
View file @
a36d6df2
...
@@ -9,9 +9,6 @@ RSpec.describe DevOpsReportHelper do
...
@@ -9,9 +9,6 @@ RSpec.describe DevOpsReportHelper do
describe
'#devops_score_metrics'
do
describe
'#devops_score_metrics'
do
let
(
:devops_score_metrics
)
{
helper
.
devops_score_metrics
(
subject
)
}
let
(
:devops_score_metrics
)
{
helper
.
devops_score_metrics
(
subject
)
}
let
(
:devops_score_metrics_blank
)
{
helper
.
devops_score_metrics
({})
}
it
{
expect
(
devops_score_metrics_blank
).
to
eq
({})
}
it
{
expect
(
devops_score_metrics
[
:averageScore
]).
to
eq
({
scoreLevel:
{
icon:
"status-alert"
,
label:
"Moderate"
,
variant:
"warning"
},
value:
"55.9"
}
)
}
it
{
expect
(
devops_score_metrics
[
:averageScore
]).
to
eq
({
scoreLevel:
{
icon:
"status-alert"
,
label:
"Moderate"
,
variant:
"warning"
},
value:
"55.9"
}
)
}
...
@@ -34,5 +31,11 @@ RSpec.describe DevOpsReportHelper do
...
@@ -34,5 +31,11 @@ RSpec.describe DevOpsReportHelper do
it
{
expect
(
devops_score_metrics
[
:averageScore
]).
to
eq
({
scoreLevel:
{
icon:
"status_success_solid"
,
label:
"High"
,
variant:
"success"
},
value:
"82.0"
}
)
}
it
{
expect
(
devops_score_metrics
[
:averageScore
]).
to
eq
({
scoreLevel:
{
icon:
"status_success_solid"
,
label:
"High"
,
variant:
"success"
},
value:
"82.0"
}
)
}
end
end
describe
'with blank metrics'
do
let
(
:devops_score_metrics
)
{
helper
.
devops_score_metrics
({})
}
it
{
expect
(
devops_score_metrics
).
to
eq
({})
}
end
end
end
end
end
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