Skip to content
代码片段 群组 项目
提交 7b9a1c9b 编辑于 作者: Jannik Lehmann's avatar Jannik Lehmann
浏览文件

Hide state and configure Button for Sast_Iac on Security Config Page

上级 4093dce8
No related branches found
No related tags found
无相关合并请求
......@@ -2,6 +2,7 @@
import { GlButton, GlCard, GlIcon, GlLink } from '@gitlab/ui';
import { __, s__, sprintf } from '~/locale';
import ManageViaMr from '~/vue_shared/security_configuration/components/manage_via_mr.vue';
import { REPORT_TYPE_SAST_IAC } from '~/vue_shared/security_reports/constants';
export default {
components: {
......@@ -17,6 +18,9 @@ export default {
required: true,
},
},
sast: {
REPORT_TYPE_SAST_IAC,
},
computed: {
available() {
return this.feature.available;
......@@ -84,7 +88,13 @@ export default {
<div class="gl-display-flex gl-align-items-baseline">
<h3 class="gl-font-lg gl-m-0 gl-mr-3">{{ feature.name }}</h3>
<!-- This condition is a temporary hack to not display any wrong information
until this BE Bug is fixed: https://gitlab.com/gitlab-org/gitlab/-/issues/350307
More Information: https://gitlab.com/gitlab-org/gitlab/-/issues/350307#note_825447417
-->
<div
v-if="feature.type !== $options.sast.REPORT_TYPE_SAST_IAC"
:class="statusClasses"
data-testid="feature-status"
:data-qa-selector="`${feature.type}_status`"
......@@ -109,7 +119,12 @@ export default {
<gl-link :href="feature.helpPath">{{ $options.i18n.learnMore }}</gl-link>
</p>
<template v-if="available">
<!-- This condition is a temporary hack to not display any wrong information
until this BE Bug is fixed: https://gitlab.com/gitlab-org/gitlab/-/issues/350307
More Information: https://gitlab.com/gitlab-org/gitlab/-/issues/350307#note_825447417
-->
<template v-if="available && feature.type !== $options.sast.REPORT_TYPE_SAST_IAC">
<gl-button
v-if="feature.configurationPath"
:href="feature.configurationPath"
......
......@@ -56,13 +56,6 @@
within_sast_iac_card do
expect(page).to have_text('Infrastructure as Code (IaC) Scanning')
expect(page).to have_text('Not enabled')
expect(page).to have_button('Configure with a merge request')
click_button 'Configure with a merge request'
wait_for_requests
expect(page).to have_current_path(project_new_merge_request_path(project), ignore_query: true)
end
end
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册