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
5c742e24
Commit
5c742e24
authored
Dec 02, 2020
by
Paul Gascou-Vaillancourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import validation status constants
parent
b51d1e56
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
ee/spec/frontend/security_configuration/dast_profiles/components/dast_site_profiles_list_spec.js
.../dast_profiles/components/dast_site_profiles_list_spec.js
+10
-9
No files found.
ee/spec/frontend/security_configuration/dast_profiles/components/dast_site_profiles_list_spec.js
View file @
5c742e24
...
...
@@ -7,6 +7,7 @@ import dastSiteValidationsQuery from 'ee/security_configuration/dast_site_valida
import
Component
from
'
ee/security_configuration/dast_profiles/components/dast_site_profiles_list.vue
'
;
import
ProfilesList
from
'
ee/security_configuration/dast_profiles/components/dast_profiles_list.vue
'
;
import
{
updateSiteProfilesStatuses
}
from
'
ee/security_configuration/dast_profiles/graphql/cache_utils
'
;
import
{
DAST_SITE_VALIDATION_STATUS
}
from
'
ee/security_configuration/dast_site_validation/constants
'
;
import
{
siteProfiles
}
from
'
../mocks/mock_data
'
;
import
*
as
responses
from
'
../mocks/apollo_mock
'
;
...
...
@@ -121,11 +122,11 @@ describe('EE - DastSiteProfileList', () => {
responses
.
dastSiteValidations
([
{
normalizedTargetUrl
:
pendingValidation
.
normalizedTargetUrl
,
status
:
'
FAILED_VALIDATION
'
,
status
:
DAST_SITE_VALIDATION_STATUS
.
FAILED
,
},
{
normalizedTargetUrl
:
inProgressValidation
.
normalizedTargetUrl
,
status
:
'
PASSED_VALIDATION
'
,
status
:
DAST_SITE_VALIDATION_STATUS
.
PASSED
,
},
]),
),
...
...
@@ -134,11 +135,11 @@ describe('EE - DastSiteProfileList', () => {
});
describe
.
each
`
status | statusEnum | label | hasValidateButton
${
'
pending
'
}
|
${
'
PENDING_VALIDATION
'
}
|
${
''
}
|
${
true
}
${
'
in-progress
'
}
|
${
'
INPROGRESS_VALIDATION
'
}
|
${
'
Validating...
'
}
|
${
false
}
${
'
passed
'
}
|
${
'
PASSED_VALIDATION
'
}
|
${
'
Validated
'
}
|
${
false
}
${
'
failed
'
}
|
${
'
FAILED_VALIDATION
'
}
|
${
'
Validation failed
'
}
|
${
true
}
status | statusEnum
| label | hasValidateButton
${
'
pending
'
}
|
${
DAST_SITE_VALIDATION_STATUS
.
PENDING
}
|
${
''
}
|
${
true
}
${
'
in-progress
'
}
|
${
DAST_SITE_VALIDATION_STATUS
.
INPROGRESS
}
|
${
'
Validating...
'
}
|
${
false
}
${
'
passed
'
}
|
${
DAST_SITE_VALIDATION_STATUS
.
PASSED
}
|
${
'
Validated
'
}
|
${
false
}
${
'
failed
'
}
|
${
DAST_SITE_VALIDATION_STATUS
.
FAILED
}
|
${
'
Validation failed
'
}
|
${
true
}
`
(
'
profile with validation $status
'
,
({
statusEnum
,
label
,
hasValidateButton
})
=>
{
const
profile
=
siteProfiles
.
find
(({
validationStatus
})
=>
validationStatus
===
statusEnum
);
...
...
@@ -171,8 +172,8 @@ describe('EE - DastSiteProfileList', () => {
it
.
each
`
nthCall | normalizedTargetUrl | status
${
1
}
|
${
pendingValidation
.
normalizedTargetUrl
}
|
${
'
FAILED_VALIDATION
'
}
${
2
}
|
${
inProgressValidation
.
normalizedTargetUrl
}
|
${
'
PASSED_VALIDATION
'
}
${
1
}
|
${
pendingValidation
.
normalizedTargetUrl
}
|
${
DAST_SITE_VALIDATION_STATUS
.
FAILED
}
${
2
}
|
${
inProgressValidation
.
normalizedTargetUrl
}
|
${
DAST_SITE_VALIDATION_STATUS
.
PASSED
}
`
(
'
in the local cache, profile with normalized URL $normalizedTargetUrl has its status set to $status
'
,
({
nthCall
,
normalizedTargetUrl
,
status
})
=>
{
...
...
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