Commit b38f54ed authored by Mark Florian's avatar Mark Florian

Add pinning tests

These are [temporary tests][1] designed to idenitfy the complete
rendering behaviour of the existing implementation to support
a refactoring. They will be thrown away once the refactoring is
complete.

[1]: https://web.archive.org/web/20170826101146/http://wiki.c2.com/?PinningTests
parent 5a925f1e
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Security Configuration App given no enabled scanners matches the snapshot 1`] = `
<body>
<article>
<header>
<h4
class="my-3"
>
Security Configuration
</h4>
<h5
class="gl-font-lg mt-5"
>
Testing & Compliance
</h5>
<p>
The status of the table below only applies to the default branch and is based on the
<a
class="gl-link"
href="/markrian/qr/-/pipelines/249400518"
rel="noopener"
target="_blank"
>
latest pipeline
</a>
. Once you've enabled a scan for the default branch, any subsequent feature branch you create will include the scan.
</p>
</header>
<!---->
<!---->
<table
aria-busy="false"
aria-colcount="3"
aria-describedby="__BVID__76__caption_"
class="table b-table gl-table b-table-stacked-md"
id="__BVID__76"
role="table"
>
<!---->
<!---->
<thead
class=""
role="rowgroup"
>
<!---->
<tr
class=""
role="row"
>
<th
aria-colindex="1"
class="gl-text-gray-900 gl-bg-transparent! gl-border-b-1! gl-border-b-solid! gl-border-gray-100!"
role="columnheader"
scope="col"
>
Security Control
</th>
<th
aria-colindex="2"
class="gl-text-gray-900 gl-bg-transparent! gl-border-b-1! gl-border-b-solid! gl-border-gray-100!"
role="columnheader"
scope="col"
>
Status
</th>
<th
aria-colindex="3"
class="gl-text-gray-900 gl-bg-transparent! gl-border-b-1! gl-border-b-solid! gl-border-gray-100!"
role="columnheader"
scope="col"
>
Manage
</th>
</tr>
</thead>
<tbody
role="rowgroup"
>
<!---->
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Static Application Security Testing (SAST)
</div>
<div>
Analyze your source code for known vulnerabilities.
<a
aria-label="Feature documentation for Static Application Security Testing (SAST)"
class="gl-link"
href="/help/user/application_security/sast/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Not enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<a
class="btn btn-success btn-md gl-button"
data-testid="enableButton"
href="/markrian/qr/-/security/configuration/sast"
>
<!---->
<!---->
<span
class="gl-button-text"
>
Enable
</span>
</a>
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Dynamic Application Security Testing (DAST)
</div>
<div>
Analyze a review version of your web application.
<a
aria-label="Feature documentation for Dynamic Application Security Testing (DAST)"
class="gl-link"
href="/help/user/application_security/dast/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Not enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
DAST Scans
</div>
<div>
Saved scan settings and target site settings which are reusable.
<a
aria-label="Feature documentation for DAST Scans"
class="gl-link"
href="/help/user/application_security/dast/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Available for on-demand DAST
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<a
class="btn btn-default btn-md gl-button"
data-testid="manageButton"
href="/markrian/qr/-/security/configuration/dast_profiles"
>
<!---->
<!---->
<span
class="gl-button-text"
>
Manage
</span>
</a>
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Dependency Scanning
</div>
<div>
Analyze your dependencies for known vulnerabilities.
<a
aria-label="Feature documentation for Dependency Scanning"
class="gl-link"
href="/help/user/application_security/dependency_scanning/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Not enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Container Scanning
</div>
<div>
Check your Docker images for known vulnerabilities.
<a
aria-label="Feature documentation for Container Scanning"
class="gl-link"
href="/help/user/application_security/container_scanning/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Not enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Secret Detection
</div>
<div>
Analyze your source code and git history for secrets.
<a
aria-label="Feature documentation for Secret Detection"
class="gl-link"
href="/help/user/application_security/secret_detection/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Not enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Coverage Fuzzing
</div>
<div>
Find bugs in your code with coverage-guided fuzzing.
<a
aria-label="Feature documentation for Coverage Fuzzing"
class="gl-link"
href="/help/user/application_security/coverage_fuzzing/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Not enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
API Fuzzing
</div>
<div>
Find bugs in your code with API fuzzing.
<a
aria-label="Feature documentation for API Fuzzing"
class="gl-link"
href="/help/user/application_security/api_fuzzing/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Not enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
License Compliance
</div>
<div>
Search your project dependencies for their licenses and apply policies.
<a
aria-label="Feature documentation for License Compliance"
class="gl-link"
href="/help/user/compliance/license_compliance/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Not enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<!---->
<!---->
</tbody>
<!---->
</table>
<!---->
</article>
</body>
`;
exports[`Security Configuration App given some enabled by ADO matches the snapshot 1`] = `
<body>
<article>
<header>
<h4
class="my-3"
>
Security Configuration
</h4>
<h5
class="gl-font-lg mt-5"
>
Testing & Compliance
</h5>
<p>
Several security scans are enabled because
<a
class="gl-link"
href="/help/topics/autodevops/index"
rel="noopener"
target="_blank"
>
Auto DevOps
</a>
is enabled on this project
</p>
</header>
<!---->
<!---->
<table
aria-busy="false"
aria-colcount="3"
aria-describedby="__BVID__139__caption_"
class="table b-table gl-table b-table-stacked-md"
id="__BVID__139"
role="table"
>
<!---->
<!---->
<thead
class=""
role="rowgroup"
>
<!---->
<tr
class=""
role="row"
>
<th
aria-colindex="1"
class="gl-text-gray-900 gl-bg-transparent! gl-border-b-1! gl-border-b-solid! gl-border-gray-100!"
role="columnheader"
scope="col"
>
Security Control
</th>
<th
aria-colindex="2"
class="gl-text-gray-900 gl-bg-transparent! gl-border-b-1! gl-border-b-solid! gl-border-gray-100!"
role="columnheader"
scope="col"
>
Status
</th>
<th
aria-colindex="3"
class="gl-text-gray-900 gl-bg-transparent! gl-border-b-1! gl-border-b-solid! gl-border-gray-100!"
role="columnheader"
scope="col"
>
Manage
</th>
</tr>
</thead>
<tbody
role="rowgroup"
>
<!---->
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Static Application Security Testing (SAST)
</div>
<div>
Analyze your source code for known vulnerabilities.
<a
aria-label="Feature documentation for Static Application Security Testing (SAST)"
class="gl-link"
href="/help/user/application_security/sast/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Not enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<a
class="btn btn-success btn-md gl-button"
data-testid="enableButton"
href="/markrian-test/test-public-project/-/security/configuration/sast"
>
<!---->
<!---->
<span
class="gl-button-text"
>
Enable
</span>
</a>
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Dynamic Application Security Testing (DAST)
</div>
<div>
Analyze a review version of your web application.
<a
aria-label="Feature documentation for Dynamic Application Security Testing (DAST)"
class="gl-link"
href="/help/user/application_security/dast/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Not enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
DAST Scans
</div>
<div>
Saved scan settings and target site settings which are reusable.
<a
aria-label="Feature documentation for DAST Scans"
class="gl-link"
href="/help/user/application_security/dast/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Available for on-demand DAST
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<a
class="btn btn-default btn-md gl-button"
data-testid="manageButton"
href="/markrian-test/test-public-project/-/security/configuration/dast_profiles"
>
<!---->
<!---->
<span
class="gl-button-text"
>
Manage
</span>
</a>
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Dependency Scanning
</div>
<div>
Analyze your dependencies for known vulnerabilities.
<a
aria-label="Feature documentation for Dependency Scanning"
class="gl-link"
href="/help/user/application_security/dependency_scanning/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Not enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Container Scanning
</div>
<div>
Check your Docker images for known vulnerabilities.
<a
aria-label="Feature documentation for Container Scanning"
class="gl-link"
href="/help/user/application_security/container_scanning/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Enabled with Auto DevOps
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Secret Detection
</div>
<div>
Analyze your source code and git history for secrets.
<a
aria-label="Feature documentation for Secret Detection"
class="gl-link"
href="/help/user/application_security/secret_detection/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Enabled with Auto DevOps
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Coverage Fuzzing
</div>
<div>
Find bugs in your code with coverage-guided fuzzing.
<a
aria-label="Feature documentation for Coverage Fuzzing"
class="gl-link"
href="/help/user/application_security/coverage_fuzzing/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Not enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
API Fuzzing
</div>
<div>
Find bugs in your code with API fuzzing.
<a
aria-label="Feature documentation for API Fuzzing"
class="gl-link"
href="/help/user/application_security/api_fuzzing/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Not enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<a
class="btn btn-success btn-md gl-button"
data-testid="enableButton"
href="/markrian-test/test-public-project/-/security/configuration/api_fuzzing"
>
<!---->
<!---->
<span
class="gl-button-text"
>
Enable
</span>
</a>
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
License Compliance
</div>
<div>
Search your project dependencies for their licenses and apply policies.
<a
aria-label="Feature documentation for License Compliance"
class="gl-link"
href="/help/user/compliance/license_compliance/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Enabled with Auto DevOps
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<!---->
<!---->
</tbody>
<!---->
</table>
<!---->
</article>
</body>
`;
exports[`Security Configuration App given some enabled scanners (gitlab-ui) matches the snapshot 1`] = `
<body>
<article>
<header>
<h4
class="my-3"
>
Security Configuration
</h4>
<h5
class="gl-font-lg mt-5"
>
Testing & Compliance
</h5>
<p>
The status of the table below only applies to the default branch and is based on the
<a
class="gl-link"
href="/gitlab-org/gitlab-ui/-/pipelines/263335857"
rel="noopener"
target="_blank"
>
latest pipeline
</a>
. Once you've enabled a scan for the default branch, any subsequent feature branch you create will include the scan.
</p>
</header>
<!---->
<!---->
<table
aria-busy="false"
aria-colcount="3"
aria-describedby="__BVID__9__caption_"
class="table b-table gl-table b-table-stacked-md"
id="__BVID__9"
role="table"
>
<!---->
<!---->
<thead
class=""
role="rowgroup"
>
<!---->
<tr
class=""
role="row"
>
<th
aria-colindex="1"
class="gl-text-gray-900 gl-bg-transparent! gl-border-b-1! gl-border-b-solid! gl-border-gray-100!"
role="columnheader"
scope="col"
>
Security Control
</th>
<th
aria-colindex="2"
class="gl-text-gray-900 gl-bg-transparent! gl-border-b-1! gl-border-b-solid! gl-border-gray-100!"
role="columnheader"
scope="col"
>
Status
</th>
<th
aria-colindex="3"
class="gl-text-gray-900 gl-bg-transparent! gl-border-b-1! gl-border-b-solid! gl-border-gray-100!"
role="columnheader"
scope="col"
>
Manage
</th>
</tr>
</thead>
<tbody
role="rowgroup"
>
<!---->
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Static Application Security Testing (SAST)
</div>
<div>
Analyze your source code for known vulnerabilities.
<a
aria-label="Feature documentation for Static Application Security Testing (SAST)"
class="gl-link"
href="/help/user/application_security/sast/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Enabled
<br />
<a
class="gl-link"
href="/gitlab-org/gitlab-ui/-/blame/main/.gitlab-ci.yml"
>
View history
</a>
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<a
class="btn btn-default btn-md gl-button"
data-testid="configureButton"
href="/gitlab-org/gitlab-ui/-/security/configuration/sast"
>
<!---->
<!---->
<span
class="gl-button-text"
>
Configure
</span>
</a>
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Dynamic Application Security Testing (DAST)
</div>
<div>
Analyze a review version of your web application.
<a
aria-label="Feature documentation for Dynamic Application Security Testing (DAST)"
class="gl-link"
href="/help/user/application_security/dast/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Not enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
DAST Scans
</div>
<div>
Saved scan settings and target site settings which are reusable.
<a
aria-label="Feature documentation for DAST Scans"
class="gl-link"
href="/help/user/application_security/dast/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Available for on-demand DAST
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<a
class="btn btn-default btn-md gl-button"
data-testid="manageButton"
href="/gitlab-org/gitlab-ui/-/security/configuration/dast_profiles"
>
<!---->
<!---->
<span
class="gl-button-text"
>
Manage
</span>
</a>
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Dependency Scanning
</div>
<div>
Analyze your dependencies for known vulnerabilities.
<a
aria-label="Feature documentation for Dependency Scanning"
class="gl-link"
href="/help/user/application_security/dependency_scanning/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Container Scanning
</div>
<div>
Check your Docker images for known vulnerabilities.
<a
aria-label="Feature documentation for Container Scanning"
class="gl-link"
href="/help/user/application_security/container_scanning/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Secret Detection
</div>
<div>
Analyze your source code and git history for secrets.
<a
aria-label="Feature documentation for Secret Detection"
class="gl-link"
href="/help/user/application_security/secret_detection/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
Coverage Fuzzing
</div>
<div>
Find bugs in your code with coverage-guided fuzzing.
<a
aria-label="Feature documentation for Coverage Fuzzing"
class="gl-link"
href="/help/user/application_security/coverage_fuzzing/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Not enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
API Fuzzing
</div>
<div>
Find bugs in your code with API fuzzing.
<a
aria-label="Feature documentation for API Fuzzing"
class="gl-link"
href="/help/user/application_security/api_fuzzing/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Not enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<a
class="btn btn-success btn-md gl-button"
data-testid="enableButton"
href="/gitlab-org/gitlab-ui/-/security/configuration/api_fuzzing"
>
<!---->
<!---->
<span
class="gl-button-text"
>
Enable
</span>
</a>
</div>
</td>
</tr>
<tr
class=""
data-testid="security-scanner-row"
role="row"
>
<td
aria-colindex="1"
class=""
data-label="Security Control"
role="cell"
>
<div>
<div
class="gl-text-gray-900"
>
License Compliance
</div>
<div>
Search your project dependencies for their licenses and apply policies.
<a
aria-label="Feature documentation for License Compliance"
class="gl-link"
href="/help/user/compliance/license_compliance/index"
rel="noopener"
target="_blank"
>
More information
</a>
</div>
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
<div>
Enabled
<!---->
</div>
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Manage"
role="cell"
>
<div>
<!---->
</div>
</td>
</tr>
<!---->
<!---->
</tbody>
<!---->
</table>
<!---->
</article>
</body>
`;
import Vue, { nextTick } from 'vue';
import { initSecurityConfiguration } from 'ee/security_configuration';
import { resetHTMLFixture } from 'helpers/fixtures';
import { someEnabledEl, noneEnabledEl, someEnabledWithAutoDevOpsEl } from './mock_data';
const errorsAndWarnings = [];
const errorWarnHandler = (error, vm, info) => {
errorsAndWarnings.push(`Vue error/warning: Message: ${error}
vm.name: ${vm.name}
info: ${JSON.stringify(info)}
`);
};
Vue.config.errorHandler = errorWarnHandler;
Vue.config.warnHandler = errorWarnHandler;
describe('Security Configuration App', () => {
describe.each`
context | mountElHtml
${'some enabled scanners (gitlab-ui)'} | ${someEnabledEl}
${'no enabled scanners'} | ${noneEnabledEl}
${'some enabled by ADO'} | ${someEnabledWithAutoDevOpsEl}
`('given $context', ({ mountElHtml }) => {
beforeEach(() => {
setFixtures(mountElHtml);
const el = document.querySelector('#js-security-configuration');
initSecurityConfiguration(el);
return nextTick();
});
afterEach(() => {
resetHTMLFixture();
});
it('matches the snapshot', () => {
expect(errorsAndWarnings).toEqual([]);
expect(document.body).toMatchSnapshot();
});
});
});
export const someEnabledEl = `
<div data-auto-devops-help-page-path="/help/topics/autodevops/index" data-auto-devops-path="/gitlab-org/gitlab-ui/-/settings/ci_cd#autodevops-settings" data-auto-fix-enabled="{&quot;dependency_scanning&quot;:true,&quot;container_scanning&quot;:true}" data-auto-fix-help-path="/" data-auto-fix-user-path="/" data-can-enable-auto-devops data-can-toggle-auto-fix-settings data-container-scanning-help-path="/help/user/application_security/container_scanning/index" data-create-sast-merge-request-path="/gitlab-org/gitlab-ui/-/security/configuration/sast" data-dependency-scanning-help-path="/help/user/application_security/dependency_scanning/index" data-features="[{&quot;type&quot;:&quot;sast&quot;,&quot;configured&quot;:true,&quot;status&quot;:&quot;Enabled&quot;,&quot;configuration_path&quot;:&quot;/gitlab-org/gitlab-ui/-/security/configuration/sast&quot;},{&quot;type&quot;:&quot;dast&quot;,&quot;configured&quot;:false,&quot;status&quot;:&quot;Not enabled&quot;,&quot;configuration_path&quot;:null},{&quot;type&quot;:&quot;dast_profiles&quot;,&quot;configured&quot;:true,&quot;status&quot;:&quot;Available for on-demand DAST&quot;,&quot;configuration_path&quot;:&quot;/gitlab-org/gitlab-ui/-/security/configuration/dast_profiles&quot;},{&quot;type&quot;:&quot;dependency_scanning&quot;,&quot;configured&quot;:true,&quot;status&quot;:&quot;Enabled&quot;,&quot;configuration_path&quot;:null},{&quot;type&quot;:&quot;container_scanning&quot;,&quot;configured&quot;:true,&quot;status&quot;:&quot;Enabled&quot;,&quot;configuration_path&quot;:null},{&quot;type&quot;:&quot;secret_detection&quot;,&quot;configured&quot;:true,&quot;status&quot;:&quot;Enabled&quot;,&quot;configuration_path&quot;:null},{&quot;type&quot;:&quot;coverage_fuzzing&quot;,&quot;configured&quot;:false,&quot;status&quot;:&quot;Not enabled&quot;,&quot;configuration_path&quot;:null},{&quot;type&quot;:&quot;api_fuzzing&quot;,&quot;configured&quot;:false,&quot;status&quot;:&quot;Not enabled&quot;,&quot;configuration_path&quot;:&quot;/gitlab-org/gitlab-ui/-/security/configuration/api_fuzzing&quot;},{&quot;type&quot;:&quot;license_scanning&quot;,&quot;configured&quot;:true,&quot;status&quot;:&quot;Enabled&quot;,&quot;configuration_path&quot;:null}]" data-gitlab-ci-history-path="/gitlab-org/gitlab-ui/-/blame/main/.gitlab-ci.yml" data-gitlab-ci-present data-help-page-path="/help/user/application_security/index" data-latest-pipeline-path="/gitlab-org/gitlab-ui/-/pipelines/263335857" data-toggle-autofix-setting-endpoint="configuration/auto_fix" id="js-security-configuration"></div>`;
export const noneEnabledEl = `
<div data-auto-devops-help-page-path="/help/topics/autodevops/index" data-auto-devops-path="/markrian/qr/-/settings/ci_cd#autodevops-settings" data-auto-fix-enabled="{&quot;dependency_scanning&quot;:true,&quot;container_scanning&quot;:true}" data-auto-fix-help-path="/" data-auto-fix-user-path="/" data-can-enable-auto-devops data-can-toggle-auto-fix-settings data-container-scanning-help-path="/help/user/application_security/container_scanning/index" data-create-sast-merge-request-path="/markrian/qr/-/security/configuration/sast" data-dependency-scanning-help-path="/help/user/application_security/dependency_scanning/index" data-features="[{&quot;type&quot;:&quot;sast&quot;,&quot;configured&quot;:false,&quot;status&quot;:&quot;Not enabled&quot;,&quot;configuration_path&quot;:&quot;/markrian/qr/-/security/configuration/sast&quot;},{&quot;type&quot;:&quot;dast&quot;,&quot;configured&quot;:false,&quot;status&quot;:&quot;Not enabled&quot;,&quot;configuration_path&quot;:null},{&quot;type&quot;:&quot;dast_profiles&quot;,&quot;configured&quot;:true,&quot;status&quot;:&quot;Available for on-demand DAST&quot;,&quot;configuration_path&quot;:&quot;/markrian/qr/-/security/configuration/dast_profiles&quot;},{&quot;type&quot;:&quot;dependency_scanning&quot;,&quot;configured&quot;:false,&quot;status&quot;:&quot;Not enabled&quot;,&quot;configuration_path&quot;:null},{&quot;type&quot;:&quot;container_scanning&quot;,&quot;configured&quot;:false,&quot;status&quot;:&quot;Not enabled&quot;,&quot;configuration_path&quot;:null},{&quot;type&quot;:&quot;secret_detection&quot;,&quot;configured&quot;:false,&quot;status&quot;:&quot;Not enabled&quot;,&quot;configuration_path&quot;:null},{&quot;type&quot;:&quot;coverage_fuzzing&quot;,&quot;configured&quot;:false,&quot;status&quot;:&quot;Not enabled&quot;,&quot;configuration_path&quot;:null},{&quot;type&quot;:&quot;api_fuzzing&quot;,&quot;configured&quot;:false,&quot;status&quot;:&quot;Not enabled&quot;,&quot;configuration_path&quot;:null},{&quot;type&quot;:&quot;license_scanning&quot;,&quot;configured&quot;:false,&quot;status&quot;:&quot;Not enabled&quot;,&quot;configuration_path&quot;:null}]" data-gitlab-ci-history-path="/markrian/qr/-/blame/master/.gitlab-ci.yml" data-gitlab-ci-present data-help-page-path="/help/user/application_security/index" data-latest-pipeline-path="/markrian/qr/-/pipelines/249400518" data-toggle-autofix-setting-endpoint="configuration/auto_fix" id="js-security-configuration"></div>`;
export const someEnabledWithAutoDevOpsEl = `
<div data-auto-devops-enabled data-auto-devops-help-page-path="/help/topics/autodevops/index" data-auto-devops-path="/markrian-test/test-public-project/-/settings/ci_cd#autodevops-settings" data-auto-fix-enabled="{&quot;dependency_scanning&quot;:true,&quot;container_scanning&quot;:true}" data-auto-fix-help-path="/" data-auto-fix-user-path="/" data-can-enable-auto-devops data-can-toggle-auto-fix-settings data-container-scanning-help-path="/help/user/application_security/container_scanning/index" data-create-sast-merge-request-path="/markrian-test/test-public-project/-/security/configuration/sast" data-dependency-scanning-help-path="/help/user/application_security/dependency_scanning/index" data-features="[{&quot;type&quot;:&quot;sast&quot;,&quot;configured&quot;:false,&quot;status&quot;:&quot;Not enabled&quot;,&quot;configuration_path&quot;:&quot;/markrian-test/test-public-project/-/security/configuration/sast&quot;},{&quot;type&quot;:&quot;dast&quot;,&quot;configured&quot;:false,&quot;status&quot;:&quot;Not enabled&quot;,&quot;configuration_path&quot;:null},{&quot;type&quot;:&quot;dast_profiles&quot;,&quot;configured&quot;:true,&quot;status&quot;:&quot;Available for on-demand DAST&quot;,&quot;configuration_path&quot;:&quot;/markrian-test/test-public-project/-/security/configuration/dast_profiles&quot;},{&quot;type&quot;:&quot;dependency_scanning&quot;,&quot;configured&quot;:false,&quot;status&quot;:&quot;Not enabled&quot;,&quot;configuration_path&quot;:null},{&quot;type&quot;:&quot;container_scanning&quot;,&quot;configured&quot;:true,&quot;status&quot;:&quot;Enabled with Auto DevOps&quot;,&quot;configuration_path&quot;:null},{&quot;type&quot;:&quot;secret_detection&quot;,&quot;configured&quot;:true,&quot;status&quot;:&quot;Enabled with Auto DevOps&quot;,&quot;configuration_path&quot;:null},{&quot;type&quot;:&quot;coverage_fuzzing&quot;,&quot;configured&quot;:false,&quot;status&quot;:&quot;Not enabled&quot;,&quot;configuration_path&quot;:null},{&quot;type&quot;:&quot;api_fuzzing&quot;,&quot;configured&quot;:false,&quot;status&quot;:&quot;Not enabled&quot;,&quot;configuration_path&quot;:&quot;/markrian-test/test-public-project/-/security/configuration/api_fuzzing&quot;},{&quot;type&quot;:&quot;license_scanning&quot;,&quot;configured&quot;:true,&quot;status&quot;:&quot;Enabled with Auto DevOps&quot;,&quot;configuration_path&quot;:null}]" data-gitlab-ci-history-path="/markrian-test/test-public-project/-/blame/master/.gitlab-ci.yml" data-help-page-path="/help/user/application_security/index" data-latest-pipeline-path="/markrian-test/test-public-project/-/pipelines/255361656" data-toggle-autofix-setting-endpoint="configuration/auto_fix" id="js-security-configuration"></div>`;
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