Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
cdf7104d
Commit
cdf7104d
authored
Jan 05, 2022
by
Alexander Turinske
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update agent vulnerability report tests
- add code comment explaining some non-standard code
parent
073f1fe0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
7 deletions
+23
-7
ee/app/assets/javascripts/security_dashboard/components/agent/agent_vulnerability_report.vue
...dashboard/components/agent/agent_vulnerability_report.vue
+7
-0
ee/spec/frontend/security_dashboard/components/agent/__snapshots__/agent_vulnerability_report_spec.js.snap
...ent/__snapshots__/agent_vulnerability_report_spec.js.snap
+15
-0
ee/spec/frontend/security_dashboard/components/agent/agent_vulnerability_report_spec.js
...board/components/agent/agent_vulnerability_report_spec.js
+1
-7
No files found.
ee/app/assets/javascripts/security_dashboard/components/agent/agent_vulnerability_report.vue
View file @
cdf7104d
...
...
@@ -16,6 +16,13 @@ export default {
VulnerabilityFilters
,
VulnerabilityListGraphql
,
},
/**
* Normally we should only use provide when bootstrapping an application, but this is an exception
* because there is a CE/EE split in `app/assets/javascripts/clusters/agents/index.js` (where
* these values are only needed for EE) and there is necessary rename/variable naming that only
* makes sense in the context of being in the `app/assets/javascripts/security_dashboard`
* directory.
*/
provide
()
{
return
{
dashboardDocumentation
:
helpPagePath
(
'
user/application_security/security_dashboard/index
'
),
...
...
ee/spec/frontend/security_dashboard/components/agent/__snapshots__/agent_vulnerability_report_spec.js.snap
0 → 100644
View file @
cdf7104d
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Agent vulnerability report component renders 1`] = `
<div>
<vulnerability-filters-stub
class="security-dashboard-filters gl-mt-7"
filters="[object Object],[object Object],[object Object]"
/>
<vulnerability-list-graphql-stub
fields="[object Object],[object Object],[object Object],[object Object],,[object Object]"
query="[object Object]"
/>
</div>
`;
ee/spec/frontend/security_dashboard/components/agent/agent_vulnerability_report_spec.js
View file @
cdf7104d
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
VulnerabilityListGraphql
from
'
ee/security_dashboard/components/shared/vulnerability_report/vulnerability_list_graphql.vue
'
;
import
VulnerabilityFilters
from
'
ee/security_dashboard/components/shared/vulnerability_report/vulnerability_filters.vue
'
;
import
AgentVulnerabilityReport
from
'
ee/security_dashboard/components/agent/agent_vulnerability_report.vue
'
;
describe
(
'
Agent vulnerability report component
'
,
()
=>
{
...
...
@@ -12,9 +10,6 @@ describe('Agent vulnerability report component', () => {
wrapper
=
shallowMount
(
AgentVulnerabilityReport
,
{
provide
});
};
const
findVulnerabilityFilters
=
()
=>
wrapper
.
findComponent
(
VulnerabilityFilters
);
const
findVulnerabilityList
=
()
=>
wrapper
.
findComponent
(
VulnerabilityListGraphql
);
afterEach
(()
=>
{
wrapper
.
destroy
();
});
...
...
@@ -22,7 +17,6 @@ describe('Agent vulnerability report component', () => {
it
(
'
renders
'
,
()
=>
{
createWrapper
();
expect
(
findVulnerabilityFilters
().
exists
()).
toBe
(
true
);
expect
(
findVulnerabilityList
().
exists
()).
toBe
(
true
);
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment