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
953f690e
Commit
953f690e
authored
Apr 28, 2021
by
Alexander Turinske
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply 5 suggestion(s) to 1 file(s)
parent
96ee9d72
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
ee/spec/frontend/threat_monitoring/components/policy_editor/policy_editor_spec.js
...monitoring/components/policy_editor/policy_editor_spec.js
+5
-5
No files found.
ee/spec/frontend/threat_monitoring/components/policy_editor/policy_editor_spec.js
View file @
953f690e
...
...
@@ -236,12 +236,12 @@ spec:
});
it
(
'
adds a new rule
'
,
async
()
=>
{
expect
(
wrapper
.
findAll
(
PolicyRuleBuilder
)).
toHaveLength
(
1
);
expect
(
wrapper
.
findAll
Components
(
PolicyRuleBuilder
)).
toHaveLength
(
1
);
const
button
=
findAddRuleButton
();
button
.
vm
.
$emit
(
'
click
'
);
button
.
vm
.
$emit
(
'
click
'
);
await
wrapper
.
vm
.
$nextTick
();
const
elements
=
wrapper
.
findAll
(
PolicyRuleBuilder
);
const
elements
=
wrapper
.
findAll
Components
(
PolicyRuleBuilder
);
expect
(
elements
).
toHaveLength
(
3
);
elements
.
wrappers
.
forEach
((
builder
,
idx
)
=>
{
...
...
@@ -259,11 +259,11 @@ spec:
it
(
'
removes a new rule
'
,
async
()
=>
{
findAddRuleButton
().
vm
.
$emit
(
'
click
'
);
await
wrapper
.
vm
.
$nextTick
();
expect
(
wrapper
.
findAll
(
PolicyRuleBuilder
)).
toHaveLength
(
2
);
expect
(
wrapper
.
findAll
Components
(
PolicyRuleBuilder
)).
toHaveLength
(
2
);
findPolicyRuleBuilder
().
vm
.
$emit
(
'
remove
'
);
await
wrapper
.
vm
.
$nextTick
();
expect
(
wrapper
.
findAll
(
PolicyRuleBuilder
)).
toHaveLength
(
1
);
expect
(
wrapper
.
findAll
Components
(
PolicyRuleBuilder
)).
toHaveLength
(
1
);
});
it
(
'
updates yaml editor value on switch to yaml editor
'
,
async
()
=>
{
...
...
@@ -371,7 +371,7 @@ spec:
it
(
'
presents existing policy
'
,
()
=>
{
expect
(
findPolicyName
().
attributes
().
value
).
toEqual
(
'
policy
'
);
expect
(
wrapper
.
findAll
(
PolicyRuleBuilder
).
length
).
toEqual
(
1
);
expect
(
wrapper
.
findAll
Components
(
PolicyRuleBuilder
)).
toHaveLength
(
1
);
});
it
(
'
updates existing policy and redirects to a threat monitoring path
'
,
async
()
=>
{
...
...
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