Commit c7c5fcff authored by Dheeraj Joshi's avatar Dheeraj Joshi

Move confidence column in the security dashboard

parent b6bcd767
---
title: Move confidence column in the security dashboard
merge_request: 20435
author: Dheeraj Joshi
type: changed
...@@ -59,12 +59,12 @@ export default { ...@@ -59,12 +59,12 @@ export default {
role="row" role="row"
> >
<div class="table-section section-10" role="rowheader">{{ s__('Reports|Severity') }}</div> <div class="table-section section-10" role="rowheader">{{ s__('Reports|Severity') }}</div>
<div class="table-section flex-grow-1" role="rowheader">
{{ s__('Reports|Vulnerability') }}
</div>
<div class="table-section section-10 ml-md-2" role="rowheader"> <div class="table-section section-10 ml-md-2" role="rowheader">
{{ s__('Reports|Confidence') }} {{ s__('Reports|Confidence') }}
</div> </div>
<div class="table-section flex-grow-1" role="rowheader">
{{ s__('Reports|Vulnerability') }}
</div>
<div class="table-section section-20" role="rowheader"></div> <div class="table-section section-20" role="rowheader"></div>
</div> </div>
......
...@@ -69,6 +69,11 @@ export default { ...@@ -69,6 +69,11 @@ export default {
<div class="table-mobile-content"><severity-badge :severity="severity" /></div> <div class="table-mobile-content"><severity-badge :severity="severity" /></div>
</div> </div>
<div class="table-section section-10 ml-md-2">
<div class="table-mobile-header" role="rowheader">{{ s__('Reports|Confidence') }}</div>
<div class="table-mobile-content text-capitalize">{{ confidence }}</div>
</div>
<div class="table-section flex-grow-1"> <div class="table-section flex-grow-1">
<div class="table-mobile-header" role="rowheader">{{ s__('Reports|Vulnerability') }}</div> <div class="table-mobile-header" role="rowheader">{{ s__('Reports|Vulnerability') }}</div>
<div class="table-mobile-content vulnerability-info"> <div class="table-mobile-content vulnerability-info">
...@@ -104,11 +109,6 @@ export default { ...@@ -104,11 +109,6 @@ export default {
</div> </div>
</div> </div>
<div class="table-section section-10 ml-md-2">
<div class="table-mobile-header" role="rowheader">{{ s__('Reports|Confidence') }}</div>
<div class="table-mobile-content text-capitalize">{{ confidence }}</div>
</div>
<div class="table-section section-20"> <div class="table-section section-20">
<div class="table-mobile-header" role="rowheader">{{ s__('Reports|Actions') }}</div> <div class="table-mobile-header" role="rowheader">{{ s__('Reports|Actions') }}</div>
<div class="table-mobile-content action-buttons d-flex justify-content-end"> <div class="table-mobile-content action-buttons d-flex justify-content-end">
......
...@@ -31,7 +31,7 @@ describe('Security Dashboard Table Row', () => { ...@@ -31,7 +31,7 @@ describe('Security Dashboard Table Row', () => {
it('should render a `–` for confidence', () => { it('should render a `–` for confidence', () => {
expect(vm.confidence).toEqual(''); expect(vm.confidence).toEqual('');
expect(vm.$el.querySelectorAll('.table-mobile-content')[2].textContent).toContain(''); expect(vm.$el.querySelectorAll('.table-mobile-content')[1].textContent).toContain('');
}); });
it('should not render action buttons', () => { it('should not render action buttons', () => {
...@@ -63,19 +63,19 @@ describe('Security Dashboard Table Row', () => { ...@@ -63,19 +63,19 @@ describe('Security Dashboard Table Row', () => {
it('should render the confidence', () => { it('should render the confidence', () => {
expect( expect(
vm.$el.querySelectorAll('.table-mobile-content')[2].textContent.toLowerCase(), vm.$el.querySelectorAll('.table-mobile-content')[1].textContent.toLowerCase(),
).toContain(props.vulnerability.confidence); ).toContain(props.vulnerability.confidence);
}); });
describe('the project name', () => { describe('the project name', () => {
it('should render the name', () => { it('should render the name', () => {
expect(vm.$el.querySelectorAll('.table-mobile-content')[1].textContent).toContain( expect(vm.$el.querySelectorAll('.table-mobile-content')[2].textContent).toContain(
props.vulnerability.name, props.vulnerability.name,
); );
}); });
it('should render the project namespace', () => { it('should render the project namespace', () => {
expect(vm.$el.querySelectorAll('.table-mobile-content')[1].textContent).toContain( expect(vm.$el.querySelectorAll('.table-mobile-content')[2].textContent).toContain(
props.vulnerability.project.full_name, props.vulnerability.project.full_name,
); );
}); });
......
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