Commit a04a9c38 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Improve usability of the code quality widget

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 9fd035a1
...@@ -151,19 +151,19 @@ export default { ...@@ -151,19 +151,19 @@ export default {
class="code-quality-container" class="code-quality-container"
v-if="hasIssues" v-if="hasIssues"
v-show="!isCollapsed"> v-show="!isCollapsed">
<issues-block
class="js-mr-code-new-issues"
v-if="mr.codeclimateMetrics.newIssues.length"
type="failed"
:issues="mr.codeclimateMetrics.newIssues"
/>
<issues-block <issues-block
class="js-mr-code-resolved-issues" class="js-mr-code-resolved-issues"
v-if="mr.codeclimateMetrics.resolvedIssues.length" v-if="mr.codeclimateMetrics.resolvedIssues.length"
type="success" type="success"
:issues="mr.codeclimateMetrics.resolvedIssues" :issues="mr.codeclimateMetrics.resolvedIssues"
/> />
<issues-block
class="js-mr-code-new-issues"
v-if="mr.codeclimateMetrics.newIssues.length"
type="failed"
:issues="mr.codeclimateMetrics.newIssues"
/>
</div> </div>
</div> </div>
<div <div
......
...@@ -31,6 +31,7 @@ export default { ...@@ -31,6 +31,7 @@ export default {
aria-hidden="true"> aria-hidden="true">
</i> </i>
<span> <span>
<span v-if="type === 'success'">Fixed:</span>
{{issue.check_name}} {{issue.check_name}}
{{issue.location.path}} {{issue.location.path}}
{{issue.location.positions}} {{issue.location.positions}}
......
...@@ -30,7 +30,7 @@ describe('Merge Request Code Quality Issues', () => { ...@@ -30,7 +30,7 @@ describe('Merge Request Code Quality Issues', () => {
it('should render issue', () => { it('should render issue', () => {
expect( expect(
vm.$el.querySelector('li span').textContent.trim().replace(/\s+/g, ''), vm.$el.querySelector('li span').textContent.trim().replace(/\s+/g, ''),
).toEqual('foobar8121'); ).toEqual('Fixed:foobar8121');
}); });
}); });
...@@ -50,7 +50,7 @@ describe('Merge Request Code Quality Issues', () => { ...@@ -50,7 +50,7 @@ describe('Merge Request Code Quality Issues', () => {
it('should render issue without position and lines', () => { it('should render issue without position and lines', () => {
expect( expect(
vm.$el.querySelector('li span').textContent.trim().replace(/\s+/g, ''), vm.$el.querySelector('li span').textContent.trim().replace(/\s+/g, ''),
).toEqual('foobar'); ).toEqual('Fixed:foobar');
}); });
}); });
......
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