Skip to content
Snippets Groups Projects
Verified Commit 4255c415 authored by Savas Vedova's avatar Savas Vedova Committed by GitLab
Browse files

Merge branch 'update-pipeline-report-text' into 'master'

Update pipeline findings description and report label

See merge request !142783



Merged-by: Savas Vedova's avatarSavas Vedova <svedova@gitlab.com>
Approved-by: Savas Vedova's avatarSavas Vedova <svedova@gitlab.com>
Approved-by: default avatarBecka Lippert <rlippert@gitlab.com>
Approved-by: default avatarLee Tickett <ltickett@gitlab.com>
Co-authored-by: Lorenz van Herwaarden's avatarlorenzvanherwaarden <lvanherwaarden@gitlab.com>
parents 33a4aadc 5c701bf2
No related branches found
No related tags found
2 merge requests!144312Change service start (cut-off) date for code suggestions to March 15th,!142783Update pipeline findings description and report label
Pipeline #1155992687 passed
<script>
import { GlEmptyState, GlButton } from '@gitlab/ui';
import { GlEmptyState, GlLink, GlSprintf } from '@gitlab/ui';
import pipelineSecurityReportSummaryQuery from 'ee/security_dashboard/graphql/queries/pipeline_security_report_summary.query.graphql';
import { reportTypeToSecurityReportTypeEnum } from 'ee/vue_shared/security_reports/constants';
import { fetchPolicies } from '~/lib/graphql';
......@@ -24,7 +24,8 @@ export default {
SecurityReportsSummary,
SecurityDashboard,
PipelineVulnerabilityReport: () => import('./pipeline_vulnerability_report.vue'),
GlButton,
GlSprintf,
GlLink,
},
mixins: [glFeatureFlagMixin()],
provide() {
......@@ -139,7 +140,7 @@ export default {
'SecurityReports|Check the messages generated while parsing the following security reports, as they may prevent the results from being ingested by GitLab. Ensure the security report conforms to a supported %{helpPageLinkStart}JSON schema%{helpPageLinkEnd}.',
),
pageDescription: s__(
`SecurityReports|Results show vulnerabilities introduced by the merge request, in addition to existing vulnerabilities from the latest successful pipeline in your project's default branch.`,
'SecurityReports|Results show vulnerability findings from the latest successful %{helpPageLinkStart}pipeline%{helpPageLinkEnd}.',
),
pageDescriptionHelpLink: helpPagePath(
'user/application_security/vulnerability_report/pipeline.html',
......@@ -150,15 +151,14 @@ export default {
<template>
<div class="gl-mt-5">
<p>
{{ $options.i18n.pageDescription }}
<gl-button
class="gl-ml-2 vertical-align-text-top"
icon="question-o"
variant="link"
target="_blank"
:href="$options.i18n.pageDescriptionHelpLink"
/>
<p data-testid="page-description">
<gl-sprintf :message="$options.i18n.pageDescription">
<template #helpPageLink="{ content }">
<gl-link :href="$options.i18n.pageDescriptionHelpLink" target="_blank">{{
content
}}</gl-link>
</template>
</gl-sprintf>
</p>
<div v-if="hasScans" class="gl-mb-5">
......
......@@ -19,7 +19,7 @@ export const i18n = {
loading: s__('ciReport|Security scanning is loading'),
loadingError: s__('ciReport|%{scanner}: Loading resulted in an error'),
error: s__('ciReport|Security reports failed loading results'),
fullReport: s__('ciReport|Full report'),
viewAllPipelineFindings: s__('ciReport|View all pipeline findings'),
helpPopoverTitle: s__('ciReport|Security scan results'),
helpPopoverContent: s__(
'ciReport|New vulnerabilities are vulnerabilities that the security scan detects in the merge request that are different to existing vulnerabilities in the default branch.',
......
......@@ -243,7 +243,7 @@ export default {
return [
{
href: `${this.mr.pipeline.path}/security`,
text: this.$options.i18n.fullReport,
text: this.$options.i18n.viewAllPipelineFindings,
trackFullReportClicked: true,
},
];
......
......@@ -46,7 +46,7 @@
sign_in(user)
visit security_project_pipeline_path(project, ci_pipeline)
expect(page).to have_content "Results show vulnerabilities introduced by the merge request"
expect(page).to have_content "Results show vulnerability findings from the latest successful pipeline."
# Results should be paginated
expect(page).to have_content("Test finding", count: 20)
......
import { GlEmptyState, GlButton } from '@gitlab/ui';
import { GlEmptyState, GlLink, GlSprintf } from '@gitlab/ui';
import { mapValues, pick } from 'lodash';
import Vue from 'vue';
import VueApollo from 'vue-apollo';
......@@ -233,15 +233,14 @@ describe('Pipeline Security Dashboard component', () => {
describe('page description', () => {
it('shows page description and help link', () => {
factory();
expect(wrapper.html()).toContain(PipelineSecurityDashboard.i18n.pageDescription);
expect(wrapper.findComponent(GlButton).attributes()).toMatchObject({
variant: 'link',
icon: 'question-o',
target: '_blank',
href: PipelineSecurityDashboard.i18n.pageDescriptionHelpLink,
});
factory({ stubs: { GlSprintf } });
expect(wrapper.findByTestId('page-description').text()).toBe(
'Results show vulnerability findings from the latest successful pipeline.',
);
expect(wrapper.findComponent(GlLink).attributes('href')).toBe(
'/help/user/application_security/vulnerability_report/pipeline.html',
);
});
});
......
......@@ -311,13 +311,13 @@ describe('MR Widget Security Reports', () => {
expect(mockAxios.history.get).toHaveLength(2);
});
it('should display the full report button', async () => {
it('should display the view all pipeline findings button', async () => {
await createComponent();
expect(findWidget().props('actionButtons')).toEqual([
{
href: '/path/to/pipeline/security',
text: 'Full report',
text: 'View all pipeline findings',
trackFullReportClicked: true,
},
]);
......
......@@ -45104,7 +45104,7 @@ msgstr ""
msgid "SecurityReports|Report has expired"
msgstr ""
 
msgid "SecurityReports|Results show vulnerabilities introduced by the merge request, in addition to existing vulnerabilities from the latest successful pipeline in your project's default branch."
msgid "SecurityReports|Results show vulnerability findings from the latest successful %{helpPageLinkStart}pipeline%{helpPageLinkEnd}."
msgstr ""
 
msgid "SecurityReports|Scan details"
......@@ -58167,6 +58167,9 @@ msgid_plural "ciReport|Used by %{packagesString}, and %{lastPackage}"
msgstr[0] ""
msgstr[1] ""
 
msgid "ciReport|View all pipeline findings"
msgstr ""
msgid "ciReport|View full report"
msgstr ""
 
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment