Commit faa1aa52 authored by Mike Greiling's avatar Mike Greiling

Merge branch '36483-move-the-confidence-column-in-the-security-dashboard' into 'master'

Resolve "Move the confidence column in the security dashboard"

Closes #36483

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