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
325bb7aa
Commit
325bb7aa
authored
Jan 28, 2022
by
Alexander Turinske
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update policy drawer to match designs
- ensure heading is h4 - update test ids to be consistent
parent
fe7dcdd0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
ee/app/assets/javascripts/threat_monitoring/components/policy_drawer/policy_drawer.vue
...eat_monitoring/components/policy_drawer/policy_drawer.vue
+5
-2
ee/spec/frontend/threat_monitoring/components/policy_drawer/policy_drawer_spec.js
...monitoring/components/policy_drawer/policy_drawer_spec.js
+3
-2
No files found.
ee/app/assets/javascripts/threat_monitoring/components/policy_drawer/policy_drawer.vue
View file @
325bb7aa
...
@@ -72,7 +72,7 @@ export default {
...
@@ -72,7 +72,7 @@ export default {
v-on=
"$listeners"
v-on=
"$listeners"
>
>
<template
v-if=
"policy"
#title
>
<template
v-if=
"policy"
#title
>
<h
3
class=
"gl-my-0 gl-mr-3"
>
{{
policy
.
name
}}
</h3
>
<h
4
class=
"gl-my-0 gl-mr-3"
>
{{
policy
.
name
}}
</h4
>
</
template
>
</
template
>
<
template
v-if=
"policy"
#header
>
<
template
v-if=
"policy"
#header
>
<gl-button
<gl-button
...
@@ -92,7 +92,10 @@ export default {
...
@@ -92,7 +92,10 @@ export default {
<p>
<p>
{{ s__("NetworkPolicies|Define this policy's location, conditions and actions.") }}
{{ s__("NetworkPolicies|Define this policy's location, conditions and actions.") }}
</p>
</p>
<policy-yaml-editor
:value=
"policyYaml"
data-testid=
"default-policy-yaml-editor"
/>
<policy-yaml-editor
:value=
"policyYaml"
data-testid=
"policy-yaml-editor-default-component"
/>
</div>
</div>
</gl-tab>
</gl-tab>
<gl-tab
v-if=
"policyComponent"
title=
"Yaml"
>
<gl-tab
v-if=
"policyComponent"
title=
"Yaml"
>
...
...
ee/spec/frontend/threat_monitoring/components/policy_drawer/policy_drawer_spec.js
View file @
325bb7aa
...
@@ -31,7 +31,8 @@ describe('PolicyDrawer component', () => {
...
@@ -31,7 +31,8 @@ describe('PolicyDrawer component', () => {
const
findAllTabs
=
()
=>
wrapper
.
findAllComponents
(
GlTab
);
const
findAllTabs
=
()
=>
wrapper
.
findAllComponents
(
GlTab
);
const
findCiliumNetworkPolicy
=
()
=>
wrapper
.
findComponent
(
CiliumNetworkPolicy
);
const
findCiliumNetworkPolicy
=
()
=>
wrapper
.
findComponent
(
CiliumNetworkPolicy
);
const
findScanExecutionPolicy
=
()
=>
wrapper
.
findComponent
(
ScanExecutionPolicy
);
const
findScanExecutionPolicy
=
()
=>
wrapper
.
findComponent
(
ScanExecutionPolicy
);
const
findDefaultPolicyEditor
=
()
=>
wrapper
.
findByTestId
(
'
default-policy-yaml-editor
'
);
const
findDefaultComponentPolicyEditor
=
()
=>
wrapper
.
findByTestId
(
'
policy-yaml-editor-default-component
'
);
const
findTabPolicyEditor
=
()
=>
wrapper
.
findByTestId
(
'
policy-yaml-editor-tab-content
'
);
const
findTabPolicyEditor
=
()
=>
wrapper
.
findByTestId
(
'
policy-yaml-editor-tab-content
'
);
// Shared assertions
// Shared assertions
...
@@ -69,7 +70,7 @@ describe('PolicyDrawer component', () => {
...
@@ -69,7 +70,7 @@ describe('PolicyDrawer component', () => {
});
});
it
(
'
renders network policy editor with manifest
'
,
()
=>
{
it
(
'
renders network policy editor with manifest
'
,
()
=>
{
expect
(
findDefaultPolicyEditor
().
attributes
(
'
value
'
)).
toBe
(
mockGenericPolicy
.
yaml
);
expect
(
findDefault
Component
PolicyEditor
().
attributes
(
'
value
'
)).
toBe
(
mockGenericPolicy
.
yaml
);
});
});
itRendersEditButton
();
itRendersEditButton
();
...
...
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