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
c9d2f0ee
Commit
c9d2f0ee
authored
Mar 09, 2021
by
Alexander Turinske
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix forEach tests for all formGroups
parent
af8a8978
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
16 deletions
+20
-16
ee/spec/frontend/security_configuration/dast_scanner_profiles_form/components/dast_scanner_profiles_form_spec.js
...ofiles_form/components/dast_scanner_profiles_form_spec.js
+12
-8
ee/spec/frontend/security_configuration/dast_site_profiles_form/components/dast_site_auth_section_spec.js
...e_profiles_form/components/dast_site_auth_section_spec.js
+8
-8
No files found.
ee/spec/frontend/security_configuration/dast_scanner_profiles_form/components/dast_scanner_profiles_form_spec.js
View file @
c9d2f0ee
...
...
@@ -285,19 +285,21 @@ describe('DAST Scanner Profile', () => {
});
describe
(
'
when profile does not come from a policy
'
,
()
=>
{
let
formGroups
;
beforeEach
(()
=>
{
createComponent
({
propsData
:
{
profile
:
defaultProfile
,
},
});
formGroups
=
findAllFormGroups
().
wrappers
;
});
it
(
'
should enable all form groups
'
,
()
=>
{
const
formGroups
=
findAllFormGroups
();
for
(
let
i
=
0
;
i
<
formGroups
.
length
;
i
+=
1
)
{
expect
(
formGroups
.
at
(
i
).
attributes
(
'
disabled
'
)).
toBe
(
undefined
);
}
formGroups
.
forEach
((
formGroup
)
=>
{
expect
(
formGroup
.
attributes
(
'
disabled
'
)).
toBe
(
undefined
);
});
});
it
(
'
should show the policy profile alert
'
,
()
=>
{
...
...
@@ -306,12 +308,15 @@ describe('DAST Scanner Profile', () => {
});
describe
(
'
when profile does comes from a policy
'
,
()
=>
{
let
formGroups
;
beforeEach
(()
=>
{
createComponent
({
propsData
:
{
profile
:
policyScannerProfile
,
},
});
formGroups
=
findAllFormGroups
().
wrappers
;
});
it
(
'
should show the policy profile alert
'
,
()
=>
{
...
...
@@ -319,10 +324,9 @@ describe('DAST Scanner Profile', () => {
});
it
(
'
should disable all form groups
'
,
()
=>
{
const
formGroups
=
findAllFormGroups
();
for
(
let
i
=
0
;
i
<
formGroups
.
length
;
i
+=
1
)
{
expect
(
formGroups
.
at
(
i
).
attributes
(
'
disabled
'
)).
toBe
(
'
true
'
);
}
formGroups
.
forEach
((
formGroup
)
=>
{
expect
(
formGroup
.
attributes
(
'
disabled
'
)).
toBe
(
'
true
'
);
});
});
it
(
'
should disable the save button
'
,
()
=>
{
...
...
ee/spec/frontend/security_configuration/dast_site_profiles_form/components/dast_site_auth_section_spec.js
View file @
c9d2f0ee
...
...
@@ -121,20 +121,20 @@ describe('DastSiteAuthSection', () => {
describe
(
'
when profile does not come from a policy
'
,
()
=>
{
it
(
'
should enable all form groups
'
,
()
=>
{
createComponent
({
mountFn
:
shallowMount
,
fields
:
{
enabled
:
true
}
});
const
formGroups
=
findAllFormGroups
();
for
(
let
i
=
0
;
i
<
formGroups
.
length
;
i
+=
1
)
{
expect
(
formGroup
s
.
at
(
i
)
.
attributes
(
'
disabled
'
)).
toBe
(
undefined
);
}
const
formGroups
=
findAllFormGroups
()
.
wrappers
;
for
mGroups
.
forEach
((
formGroup
)
=>
{
expect
(
formGroup
.
attributes
(
'
disabled
'
)).
toBe
(
undefined
);
}
);
});
});
describe
(
'
when profile does comes from a policy
'
,
()
=>
{
it
(
'
should disable all form groups
'
,
()
=>
{
createComponent
({
mountFn
:
shallowMount
,
disabled
:
true
,
fields
:
{
enabled
:
true
}
});
const
formGroups
=
findAllFormGroups
();
for
(
let
i
=
0
;
i
<
formGroups
.
length
;
i
+=
1
)
{
expect
(
formGroup
s
.
at
(
i
)
.
attributes
(
'
disabled
'
)).
toBe
(
'
true
'
);
}
const
formGroups
=
findAllFormGroups
()
.
wrappers
;
for
mGroups
.
forEach
((
formGroup
)
=>
{
expect
(
formGroup
.
attributes
(
'
disabled
'
)).
toBe
(
'
true
'
);
}
);
});
});
});
...
...
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