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