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
da4eea76
Commit
da4eea76
authored
Dec 22, 2020
by
Lukas Eipert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run prettier on 25 spec files: 4 of 10
Mandatory not to break master. Automatically created with prettier.
parent
8ac8a1f2
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
107 additions
and
159 deletions
+107
-159
.prettierignore
.prettierignore
+0
-12
ee/spec/frontend/security_dashboard/components/first_class_project_manager/project_list_spec.js
...mponents/first_class_project_manager/project_list_spec.js
+1
-5
ee/spec/frontend/security_dashboard/components/fuzzing_artifacts_download_spec.js
...y_dashboard/components/fuzzing_artifacts_download_spec.js
+4
-1
ee/spec/frontend/security_dashboard/components/security_dashboard_table_row_spec.js
...dashboard/components/security_dashboard_table_row_spec.js
+4
-10
ee/spec/frontend/security_dashboard/components/selection_summary_spec.js
...d/security_dashboard/components/selection_summary_spec.js
+1
-3
ee/spec/frontend/security_dashboard/components/selection_summary_vuex_spec.js
...urity_dashboard/components/selection_summary_vuex_spec.js
+2
-6
ee/spec/frontend/security_dashboard/store/modules/project_selector/actions_spec.js
..._dashboard/store/modules/project_selector/actions_spec.js
+4
-1
ee/spec/frontend/sidebar/components/iteration_select_spec.js
ee/spec/frontend/sidebar/components/iteration_select_spec.js
+8
-2
ee/spec/frontend/sidebar/components/status/status_spec.js
ee/spec/frontend/sidebar/components/status/status_spec.js
+1
-5
ee/spec/frontend/storage_counter/components/usage_statistics_spec.js
...ntend/storage_counter/components/usage_statistics_spec.js
+3
-11
ee/spec/frontend/subscriptions/new/components/checkout/payment_method_spec.js
...scriptions/new/components/checkout/payment_method_spec.js
+3
-6
ee/spec/frontend/subscriptions/new/components/checkout_spec.js
...ec/frontend/subscriptions/new/components/checkout_spec.js
+4
-1
ee/spec/frontend/threat_monitoring/components/network_policy_list_spec.js
.../threat_monitoring/components/network_policy_list_spec.js
+2
-6
ee/spec/frontend/threat_monitoring/components/policy_editor/policy_rule_builder_spec.js
...ring/components/policy_editor/policy_rule_builder_spec.js
+1
-3
ee/spec/frontend/threat_monitoring/mock_data.js
ee/spec/frontend/threat_monitoring/mock_data.js
+12
-3
ee/spec/frontend/vue_mr_widget/components/approvals/approvals_auth_spec.js
...vue_mr_widget/components/approvals/approvals_auth_spec.js
+1
-4
ee/spec/frontend/vue_mr_widget/components/visual_review_app_spec.js
...ontend/vue_mr_widget/components/visual_review_app_spec.js
+4
-10
ee/spec/frontend/vue_mr_widget/ee_mr_widget_options_spec.js
ee/spec/frontend/vue_mr_widget/ee_mr_widget_options_spec.js
+6
-18
ee/spec/frontend/vue_shared/components/sidebar/epics_select/dropdown_contents_spec.js
...components/sidebar/epics_select/dropdown_contents_spec.js
+3
-18
ee/spec/frontend/vue_shared/license_compliance/components/add_license_form_dropdown_spec.js
...e_compliance/components/add_license_form_dropdown_spec.js
+1
-3
ee/spec/frontend/vue_shared/license_compliance/store/actions_spec.js
...ntend/vue_shared/license_compliance/store/actions_spec.js
+1
-3
ee/spec/frontend/vue_shared/security_reports/components/split_button_spec.js
...e_shared/security_reports/components/split_button_spec.js
+1
-5
ee/spec/frontend/vue_shared/security_reports/components/vulnerability_details_spec.js
...security_reports/components/vulnerability_details_spec.js
+21
-10
ee/spec/frontend/vulnerabilities/details_spec.js
ee/spec/frontend/vulnerabilities/details_spec.js
+4
-1
ee/spec/frontend/vulnerabilities/footer_spec.js
ee/spec/frontend/vulnerabilities/footer_spec.js
+4
-1
ee/spec/frontend/vulnerabilities/helpers_spec.js
ee/spec/frontend/vulnerabilities/helpers_spec.js
+11
-11
No files found.
.prettierignore
View file @
da4eea76
...
...
@@ -11,18 +11,6 @@ doc/api/graphql/reference/gitlab_schema.graphql
*.md
# temporarly ignored in order to migrate to prettier@2 more efficiently and iteratively:
ee/spec/frontend/security_dashboard/components
ee/spec/frontend/security_dashboard/store/modules/project_selector
ee/spec/frontend/sidebar/components
ee/spec/frontend/storage_counter/components
ee/spec/frontend/subscriptions/new/components
ee/spec/frontend/threat_monitoring
ee/spec/frontend/vue_mr_widget
ee/spec/frontend/vue_shared/components/sidebar/epics_select
ee/spec/frontend/vue_shared/license_compliance/components
ee/spec/frontend/vue_shared/license_compliance/store
ee/spec/frontend/vue_shared/security_reports/components
ee/spec/frontend/vulnerabilities
spec/frontend/alert_management/components
spec/frontend/alerts_settings
spec/frontend/authentication/u2f
...
...
ee/spec/frontend/security_dashboard/components/first_class_project_manager/project_list_spec.js
View file @
da4eea76
...
...
@@ -60,11 +60,7 @@ describe('Project List component', () => {
it
(
'
renders a project-item with an avatar
'
,
()
=>
{
factory
({
projects
:
generateMockProjects
(
1
)
});
expect
(
getFirstProjectItem
()
.
find
(
ProjectAvatar
)
.
exists
(),
).
toBe
(
true
);
expect
(
getFirstProjectItem
().
find
(
ProjectAvatar
).
exists
()).
toBe
(
true
);
});
it
(
'
renders a project-item with a project name
'
,
()
=>
{
...
...
ee/spec/frontend/security_dashboard/components/fuzzing_artifacts_download_spec.js
View file @
da4eea76
...
...
@@ -9,7 +9,10 @@ localVue.use(Vuex);
describe
(
'
Filter component
'
,
()
=>
{
const
projectId
=
1
;
const
jobs
=
[{
ref
:
'
master
'
,
name
:
'
fuzz
'
},
{
ref
:
'
master
'
,
name
:
'
fuzz 2
'
}];
const
jobs
=
[
{
ref
:
'
master
'
,
name
:
'
fuzz
'
},
{
ref
:
'
master
'
,
name
:
'
fuzz 2
'
},
];
let
wrapper
;
let
store
;
...
...
ee/spec/frontend/security_dashboard/components/security_dashboard_table_row_spec.js
View file @
da4eea76
...
...
@@ -76,11 +76,7 @@ describe('Security Dashboard Table Row', () => {
});
it
(
'
should render the severity
'
,
()
=>
{
expect
(
findContent
(
0
)
.
text
()
.
toLowerCase
(),
).
toContain
(
vulnerability
.
severity
);
expect
(
findContent
(
0
).
text
().
toLowerCase
()).
toContain
(
vulnerability
.
severity
);
});
it
(
'
should render the identifier cell
'
,
()
=>
{
...
...
@@ -90,11 +86,9 @@ describe('Security Dashboard Table Row', () => {
});
it
(
'
should render the report type
'
,
()
=>
{
expect
(
findContent
(
3
)
.
text
()
.
toLowerCase
(),
).
toContain
(
vulnerability
.
report_type
.
toLowerCase
());
expect
(
findContent
(
3
).
text
().
toLowerCase
()).
toContain
(
vulnerability
.
report_type
.
toLowerCase
(),
);
});
it
(
'
should render the scanner vendor if the scanner does exist
'
,
()
=>
{
...
...
ee/spec/frontend/security_dashboard/components/selection_summary_spec.js
View file @
da4eea76
...
...
@@ -63,9 +63,7 @@ describe('Selection Summary component', () => {
expect
(
wrapper
.
vm
.
dismissalReason
).
toBe
(
null
);
expect
(
wrapper
.
findAll
(
'
option
'
)).
toHaveLength
(
4
);
const
option
=
formSelect
()
.
findAll
(
'
option
'
)
.
at
(
1
);
const
option
=
formSelect
().
findAll
(
'
option
'
).
at
(
1
);
option
.
setSelected
();
formSelect
().
trigger
(
'
change
'
);
...
...
ee/spec/frontend/security_dashboard/components/selection_summary_vuex_spec.js
View file @
da4eea76
...
...
@@ -90,9 +90,7 @@ describe('Selection Summary', () => {
selectByIndex
(
0
);
const
option
=
formSelect
()
.
findAll
(
'
option
'
)
.
at
(
1
);
const
option
=
formSelect
().
findAll
(
'
option
'
).
at
(
1
);
option
.
setSelected
();
formSelect
().
trigger
(
'
change
'
);
...
...
@@ -108,9 +106,7 @@ describe('Selection Summary', () => {
selectByIndex
(
0
);
selectByIndex
(
1
);
const
option
=
formSelect
()
.
findAll
(
'
option
'
)
.
at
(
1
);
const
option
=
formSelect
().
findAll
(
'
option
'
).
at
(
1
);
option
.
setSelected
();
formSelect
().
trigger
(
'
change
'
);
...
...
ee/spec/frontend/security_dashboard/store/modules/project_selector/actions_spec.js
View file @
da4eea76
...
...
@@ -86,7 +86,10 @@ describe('EE projectSelector actions', () => {
it
(
`posts the selected project's ids to the add-endpoint`
,
()
=>
{
const
projectIds
=
[
'
1
'
,
'
2
'
];
state
.
selectedProjects
=
[{
id
:
projectIds
[
0
],
name
:
'
1
'
},
{
id
:
projectIds
[
1
],
name
:
'
2
'
}];
state
.
selectedProjects
=
[
{
id
:
projectIds
[
0
],
name
:
'
1
'
},
{
id
:
projectIds
[
1
],
name
:
'
2
'
},
];
state
.
projectEndpoints
.
add
=
mockAddEndpoint
;
mockAxios
.
onPost
(
mockAddEndpoint
).
replyOnce
(
200
,
mockResponse
);
...
...
ee/spec/frontend/sidebar/components/iteration_select_spec.js
View file @
da4eea76
...
...
@@ -200,7 +200,10 @@ describe('IterationSelect', () => {
beforeEach
(()
=>
{
createComponent
({
data
:
{
iterations
:
[{
id
:
'
id
'
,
title
:
'
title
'
},
{
id
:
'
123
'
,
title
:
'
123
'
}],
iterations
:
[
{
id
:
'
id
'
,
title
:
'
title
'
},
{
id
:
'
123
'
,
title
:
'
123
'
},
],
currentIteration
:
'
123
'
,
},
});
...
...
@@ -229,7 +232,10 @@ describe('IterationSelect', () => {
const
bootstrapComponent
=
mutationResp
=>
{
createComponent
({
data
:
{
iterations
:
[{
id
:
'
123
'
,
title
:
'
123
'
},
{
id
:
'
id
'
,
title
:
'
title
'
}],
iterations
:
[
{
id
:
'
123
'
,
title
:
'
123
'
},
{
id
:
'
id
'
,
title
:
'
title
'
},
],
currentIteration
:
'
123
'
,
},
mutationPromise
:
mutationResp
,
...
...
ee/spec/frontend/sidebar/components/status/status_spec.js
View file @
da4eea76
...
...
@@ -222,11 +222,7 @@ describe('Status', () => {
it
(
'
shows text to ask the user to pick an option
'
,
()
=>
{
const
message
=
'
Assign health status
'
;
expect
(
getDropdownElement
(
wrapper
)
.
find
(
'
.health-title
'
)
.
text
(),
).
toContain
(
message
);
expect
(
getDropdownElement
(
wrapper
).
find
(
'
.health-title
'
).
text
()).
toContain
(
message
);
});
it
(
'
hides form when the `edit` button is clicked
'
,
async
()
=>
{
...
...
ee/spec/frontend/storage_counter/components/usage_statistics_spec.js
View file @
da4eea76
...
...
@@ -45,9 +45,7 @@ describe('Usage Statistics component', () => {
it
(
'
renders text in total usage card footer
'
,
()
=>
{
expect
(
getStatisticsCard
(
'
totalUsage
'
)
.
find
(
'
[data-testid="statisticsCardFooter"]
'
)
.
text
(),
getStatisticsCard
(
'
totalUsage
'
).
find
(
'
[data-testid="statisticsCardFooter"]
'
).
text
(),
).
toMatchInterpolatedText
(
'
This is the total amount of storage used across your projects within this namespace.
'
,
);
...
...
@@ -55,20 +53,14 @@ describe('Usage Statistics component', () => {
it
(
'
renders text in excess usage card footer
'
,
()
=>
{
expect
(
getStatisticsCard
(
'
excessUsage
'
)
.
find
(
'
[data-testid="statisticsCardFooter"]
'
)
.
text
(),
getStatisticsCard
(
'
excessUsage
'
).
find
(
'
[data-testid="statisticsCardFooter"]
'
).
text
(),
).
toMatchInterpolatedText
(
'
This is the total amount of storage used by projects above the free 978.8KiB storage limit.
'
,
);
});
it
(
'
renders button in purchased usage card footer
'
,
()
=>
{
expect
(
getStatisticsCard
(
'
purchasedUsage
'
)
.
find
(
GlButton
)
.
exists
(),
).
toBe
(
true
);
expect
(
getStatisticsCard
(
'
purchasedUsage
'
).
find
(
GlButton
).
exists
()).
toBe
(
true
);
});
});
...
...
ee/spec/frontend/subscriptions/new/components/checkout/payment_method_spec.js
View file @
da4eea76
...
...
@@ -56,12 +56,9 @@ describe('Payment Method', () => {
describe
(
'
showing the summary
'
,
()
=>
{
it
(
'
should show the entered credit card details
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
.js-summary-line-1
'
)
.
html
()
.
replace
(
/
\s
+/g
,
'
'
),
).
toContain
(
'
Visa ending in <strong>4242</strong>
'
);
expect
(
wrapper
.
find
(
'
.js-summary-line-1
'
).
html
().
replace
(
/
\s
+/g
,
'
'
)).
toContain
(
'
Visa ending in <strong>4242</strong>
'
,
);
});
it
(
'
should show the entered credit card expiration date
'
,
()
=>
{
...
...
ee/spec/frontend/subscriptions/new/components/checkout_spec.js
View file @
da4eea76
...
...
@@ -28,7 +28,10 @@ describe('Checkout', () => {
wrapper
.
destroy
();
});
describe
.
each
([[
true
,
true
],
[
false
,
false
]])(
'
when isNewUser=%s
'
,
(
isNewUser
,
visible
)
=>
{
describe
.
each
([
[
true
,
true
],
[
false
,
false
],
])(
'
when isNewUser=%s
'
,
(
isNewUser
,
visible
)
=>
{
beforeEach
(()
=>
{
store
.
state
.
isNewUser
=
isNewUser
;
});
...
...
ee/spec/frontend/threat_monitoring/components/network_policy_list_spec.js
View file @
da4eea76
...
...
@@ -129,9 +129,7 @@ spec:
});
it
(
'
renders policies table
'
,
()
=>
{
const
namespaceHeader
=
findPoliciesTable
()
.
findAll
(
'
[role="columnheader"]
'
)
.
at
(
1
);
const
namespaceHeader
=
findPoliciesTable
().
findAll
(
'
[role="columnheader"]
'
).
at
(
1
);
expect
(
namespaceHeader
.
text
()).
toBe
(
'
Namespace
'
);
});
});
...
...
@@ -143,9 +141,7 @@ spec:
});
it
(
'
renders opened editor drawer on row selection
'
,
()
=>
{
findPoliciesTable
()
.
find
(
'
td
'
)
.
trigger
(
'
click
'
);
findPoliciesTable
().
find
(
'
td
'
).
trigger
(
'
click
'
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
const
editorDrawer
=
findEditorDrawer
();
...
...
ee/spec/frontend/threat_monitoring/components/policy_editor/policy_rule_builder_spec.js
View file @
da4eea76
...
...
@@ -37,9 +37,7 @@ describe('PolicyRuleBuilder component', () => {
function
selectFirstOption
(
sel
)
{
const
el
=
wrapper
.
find
(
sel
);
el
.
findAll
(
'
option
'
)
.
at
(
1
)
.
setSelected
();
el
.
findAll
(
'
option
'
).
at
(
1
).
setSelected
();
el
.
trigger
(
'
change
'
);
}
...
...
ee/spec/frontend/threat_monitoring/mock_data.js
View file @
da4eea76
...
...
@@ -66,14 +66,23 @@ export const mockNetworkPolicyStatisticsResponse = {
drops
:
84
,
},
ops_rate
:
{
total
:
[[
1575417600
,
56
],
[
1575504000
,
2647
]],
drops
:
[[
1575417600
,
1
],
[
1575504000
,
83
]],
total
:
[
[
1575417600
,
56
],
[
1575504000
,
2647
],
],
drops
:
[
[
1575417600
,
1
],
[
1575504000
,
83
],
],
},
};
export
const
formattedMockNetworkPolicyStatisticsResponse
=
{
opsRate
:
{
drops
:
[[
new
Date
(
'
2019-12-04T00:00:00.000Z
'
),
1
],
[
new
Date
(
'
2019-12-05T00:00:00.000Z
'
),
83
]],
drops
:
[
[
new
Date
(
'
2019-12-04T00:00:00.000Z
'
),
1
],
[
new
Date
(
'
2019-12-05T00:00:00.000Z
'
),
83
],
],
total
:
[
[
new
Date
(
'
2019-12-04T00:00:00.000Z
'
),
56
],
[
new
Date
(
'
2019-12-05T00:00:00.000Z
'
),
2647
],
...
...
ee/spec/frontend/vue_mr_widget/components/approvals/approvals_auth_spec.js
View file @
da4eea76
...
...
@@ -6,10 +6,7 @@ const TEST_PASSWORD = 'password';
// For some reason, the `Promise.resolve` needs to be deferred
// or the timing doesn't work.
const
waitForTick
=
done
=>
Promise
.
resolve
()
.
then
(
done
)
.
catch
(
done
.
fail
);
const
waitForTick
=
done
=>
Promise
.
resolve
().
then
(
done
).
catch
(
done
.
fail
);
describe
(
'
Approval auth component
'
,
()
=>
{
let
wrapper
;
...
...
ee/spec/frontend/vue_mr_widget/components/visual_review_app_spec.js
View file @
da4eea76
...
...
@@ -130,20 +130,14 @@ describe('Visual Review App Link', () => {
});
it
(
'
with review app split dropdown
'
,
()
=>
{
expect
(
wrapper
.
find
(
GlDropdown
)
.
find
(
`a[href='
${
propsData
.
link
}
']`
)
.
exists
(),
).
toEqual
(
true
);
expect
(
wrapper
.
find
(
GlDropdown
).
find
(
`a[href='
${
propsData
.
link
}
']`
).
exists
()).
toEqual
(
true
,
);
});
it
(
'
contains a list of changed pages
'
,
()
=>
{
expect
(
wrapper
.
find
(
GlDropdown
)
.
find
(
`a[href='
${
propsData
.
link
}
/example-path']`
)
.
exists
(),
wrapper
.
find
(
GlDropdown
).
find
(
`a[href='
${
propsData
.
link
}
/example-path']`
).
exists
(),
).
toEqual
(
true
);
});
...
...
ee/spec/frontend/vue_mr_widget/ee_mr_widget_options_spec.js
View file @
da4eea76
...
...
@@ -127,9 +127,7 @@ describe('ee merge request widget options', () => {
it
(
'
should render loading indicator
'
,
()
=>
{
expect
(
findExtendedSecurityWidget
()
.
querySelector
(
SAST_SELECTOR
)
.
textContent
.
trim
(),
findExtendedSecurityWidget
().
querySelector
(
SAST_SELECTOR
).
textContent
.
trim
(),
).
toContain
(
'
SAST is loading
'
);
});
});
...
...
@@ -725,9 +723,7 @@ describe('ee merge request widget options', () => {
it
(
'
should render loading indicator
'
,
()
=>
{
expect
(
findExtendedSecurityWidget
()
.
querySelector
(
DAST_SELECTOR
)
.
textContent
.
trim
(),
findExtendedSecurityWidget
().
querySelector
(
DAST_SELECTOR
).
textContent
.
trim
(),
).
toContain
(
'
DAST is loading
'
);
});
});
...
...
@@ -765,9 +761,7 @@ describe('ee merge request widget options', () => {
it
(
'
should render error indicator
'
,
done
=>
{
setImmediate
(()
=>
{
expect
(
findExtendedSecurityWidget
()
.
querySelector
(
DAST_SELECTOR
)
.
textContent
.
trim
(),
findExtendedSecurityWidget
().
querySelector
(
DAST_SELECTOR
).
textContent
.
trim
(),
).
toContain
(
'
DAST: Loading resulted in an error
'
);
done
();
});
...
...
@@ -804,9 +798,7 @@ describe('ee merge request widget options', () => {
vm
=
mountWithFeatureFlag
();
expect
(
findExtendedSecurityWidget
()
.
querySelector
(
COVERAGE_FUZZING_SELECTOR
)
.
textContent
.
trim
(),
findExtendedSecurityWidget
().
querySelector
(
COVERAGE_FUZZING_SELECTOR
).
textContent
.
trim
(),
).
toContain
(
'
Coverage fuzzing is loading
'
);
});
});
...
...
@@ -922,9 +914,7 @@ describe('ee merge request widget options', () => {
it
(
'
should render error indicator
'
,
done
=>
{
setImmediate
(()
=>
{
expect
(
findExtendedSecurityWidget
()
.
querySelector
(
SECRET_SCANNING_SELECTOR
)
.
textContent
.
trim
(),
findExtendedSecurityWidget
().
querySelector
(
SECRET_SCANNING_SELECTOR
).
textContent
.
trim
(),
).
toContain
(
'
Secret scanning: Loading resulted in an error
'
);
done
();
});
...
...
@@ -994,9 +984,7 @@ describe('ee merge request widget options', () => {
it
(
'
should render error indicator
'
,
done
=>
{
setImmediate
(()
=>
{
expect
(
findExtendedSecurityWidget
()
.
querySelector
(
API_FUZZING_SELECTOR
)
.
textContent
.
trim
(),
findExtendedSecurityWidget
().
querySelector
(
API_FUZZING_SELECTOR
).
textContent
.
trim
(),
).
toContain
(
'
API fuzzing: Loading resulted in an error
'
);
done
();
});
...
...
ee/spec/frontend/vue_shared/components/sidebar/epics_select/dropdown_contents_spec.js
View file @
da4eea76
...
...
@@ -92,24 +92,9 @@ describe('EpicsSelect', () => {
expect
(
epicsEl
).
toHaveLength
(
epics
.
length
+
2
);
// includes divider & No Epic` <li>.
expect
(
epicsEl
.
at
(
1
).
classes
()).
toContain
(
'
divider
'
);
expect
(
epicsEl
.
at
(
2
)
.
find
(
GlLink
)
.
text
(),
).
toBe
(
epics
[
0
].
title
);
expect
(
epicsEl
.
at
(
3
)
.
find
(
GlLink
)
.
text
(),
).
toBe
(
epics
[
1
].
title
);
expect
(
epicsEl
.
at
(
2
)
.
find
(
GlLink
)
.
classes
(),
).
toContain
(
'
is-active
'
);
expect
(
epicsEl
.
at
(
2
).
find
(
GlLink
).
text
()).
toBe
(
epics
[
0
].
title
);
expect
(
epicsEl
.
at
(
3
).
find
(
GlLink
).
text
()).
toBe
(
epics
[
1
].
title
);
expect
(
epicsEl
.
at
(
2
).
find
(
GlLink
).
classes
()).
toContain
(
'
is-active
'
);
});
it
(
'
should render string "No matches found" when `epics` array is empty
'
,
()
=>
{
...
...
ee/spec/frontend/vue_shared/license_compliance/components/add_license_form_dropdown_spec.js
View file @
da4eea76
...
...
@@ -25,9 +25,7 @@ describe('AddLicenseFormDropdown', () => {
jest
.
spyOn
(
vm
,
'
$emit
'
).
mockImplementation
(()
=>
{});
$
(
vm
.
$el
)
.
val
(
'
LGPL
'
)
.
trigger
(
'
change
'
);
$
(
vm
.
$el
).
val
(
'
LGPL
'
).
trigger
(
'
change
'
);
expect
(
vm
.
$emit
).
toHaveBeenCalledWith
(
'
input
'
,
'
LGPL
'
);
});
...
...
ee/spec/frontend/vue_shared/license_compliance/store/actions_spec.js
View file @
da4eea76
...
...
@@ -370,9 +370,7 @@ describe('License store actions', () => {
});
it
(
'
does not dispatch setLicenseApproval for approved licenses
'
,
done
=>
{
testAction
(
actions
.
allowLicense
,
approvedLicense
,
state
,
[],
[])
.
then
(
done
)
.
catch
(
done
.
fail
);
testAction
(
actions
.
allowLicense
,
approvedLicense
,
state
,
[],
[]).
then
(
done
).
catch
(
done
.
fail
);
});
});
...
...
ee/spec/frontend/vue_shared/security_reports/components/split_button_spec.js
View file @
da4eea76
...
...
@@ -77,10 +77,6 @@ describe('Split Button', () => {
buttons
:
buttons
.
slice
(
0
),
});
expect
(
findDropdownItems
()
.
at
(
0
)
.
props
(
'
isChecked
'
),
).
toBe
(
true
);
expect
(
findDropdownItems
().
at
(
0
).
props
(
'
isChecked
'
)).
toBe
(
true
);
});
});
ee/spec/frontend/vue_shared/security_reports/components/vulnerability_details_spec.js
View file @
da4eea76
...
...
@@ -173,7 +173,10 @@ describe('VulnerabilityDetails component', () => {
request
:
{
method
:
'
GET
'
,
url
:
'
http://foo.bar/path
'
,
headers
:
[{
name
:
'
key1
'
,
value
:
'
value1
'
},
{
name
:
'
key2
'
,
value
:
'
value2
'
}],
headers
:
[
{
name
:
'
key1
'
,
value
:
'
value1
'
},
{
name
:
'
key2
'
,
value
:
'
value2
'
},
],
},
});
componentFactory
(
vulnerability
);
...
...
@@ -225,7 +228,10 @@ describe('VulnerabilityDetails component', () => {
response
:
{
status_code
:
'
200
'
,
reason_phrase
:
'
INTERNAL SERVER ERROR
'
,
headers
:
[{
name
:
'
key1
'
,
value
:
'
value1
'
},
{
name
:
'
key2
'
,
value
:
'
value2
'
}],
headers
:
[
{
name
:
'
key1
'
,
value
:
'
value1
'
},
{
name
:
'
key2
'
,
value
:
'
value2
'
},
],
},
});
componentFactory
(
vulnerability
);
...
...
@@ -267,7 +273,10 @@ describe('VulnerabilityDetails component', () => {
response
:
{
status_code
:
'
200
'
,
reason_phrase
:
'
INTERNAL SERVER ERROR
'
,
headers
:
[{
name
:
'
key1
'
,
value
:
'
value1
'
},
{
name
:
'
key2
'
,
value
:
'
value2
'
}],
headers
:
[
{
name
:
'
key1
'
,
value
:
'
value1
'
},
{
name
:
'
key2
'
,
value
:
'
value2
'
},
],
},
},
],
...
...
@@ -312,11 +321,7 @@ describe('VulnerabilityDetails component', () => {
});
it
(
'
should render link
'
,
()
=>
{
expect
(
findLink
(
'
scanner
'
)
.
find
(
'
a
'
)
.
exists
(),
).
toBe
(
true
);
expect
(
findLink
(
'
scanner
'
).
find
(
'
a
'
).
exists
()).
toBe
(
true
);
});
});
...
...
@@ -351,11 +356,17 @@ describe('VulnerabilityDetails component', () => {
makeVulnerability
({
request
:
{
url
:
'
http://foo.bar/path
'
,
headers
:
[{
name
:
'
key1
'
,
value
:
'
value1
'
},
{
name
:
'
key2
'
,
value
:
'
value2
'
}],
headers
:
[
{
name
:
'
key1
'
,
value
:
'
value1
'
},
{
name
:
'
key2
'
,
value
:
'
value2
'
},
],
},
response
:
{
status_code
:
'
200
'
,
headers
:
[{
name
:
'
key1
'
,
value
:
'
value1
'
},
{
name
:
'
key2
'
,
value
:
'
value2
'
}],
headers
:
[
{
name
:
'
key1
'
,
value
:
'
value1
'
},
{
name
:
'
key2
'
,
value
:
'
value2
'
},
],
},
}),
);
...
...
ee/spec/frontend/vulnerabilities/details_spec.js
View file @
da4eea76
...
...
@@ -190,7 +190,10 @@ describe('Vulnerability Details', () => {
});
describe
(
'
http data
'
,
()
=>
{
const
TEST_HEADERS
=
[{
name
:
'
Name1
'
,
value
:
'
Value1
'
},
{
name
:
'
Name2
'
,
value
:
'
Value2
'
}];
const
TEST_HEADERS
=
[
{
name
:
'
Name1
'
,
value
:
'
Value1
'
},
{
name
:
'
Name2
'
,
value
:
'
Value2
'
},
];
const
EXPECT_REQUEST
=
{
label
:
'
Sent request:
'
,
content
:
'
GET http://www.gitlab.com
\n
Name1: Value1
\n
Name2: Value2
\n\n
[{"user_id":1,}]
'
,
...
...
ee/spec/frontend/vulnerabilities/footer_spec.js
View file @
da4eea76
...
...
@@ -110,7 +110,10 @@ describe('Vulnerability Footer', () => {
it
(
'
renders the history list if there are history items
'
,
()
=>
{
// The shape of this object doesn't matter for this test, we just need to verify that it's passed to the history
// entry.
const
historyItems
=
[{
id
:
1
,
note
:
'
some note
'
},
{
id
:
2
,
note
:
'
another note
'
}];
const
historyItems
=
[
{
id
:
1
,
note
:
'
some note
'
},
{
id
:
2
,
note
:
'
another note
'
},
];
mockAxios
.
onGet
(
discussionUrl
).
replyOnce
(
200
,
historyItems
,
{
date
:
Date
.
now
()
});
createWrapper
();
...
...
ee/spec/frontend/vulnerabilities/helpers_spec.js
View file @
da4eea76
...
...
@@ -2,18 +2,18 @@ import { getFormattedIssue, getAddRelatedIssueRequestParams } from 'ee/vulnerabi
describe
(
'
Vulnerabilities helpers
'
,
()
=>
{
describe
(
'
getFormattedIssue
'
,
()
=>
{
it
.
each
([{
iid
:
135
,
web_url
:
'
some/url
'
},
{
iid
:
undefined
,
web_url
:
undefined
}])(
'
returns formatted issue with expected properties for issue %s
'
,
issue
=>
{
const
formattedIssue
=
getFormattedIssue
(
issue
);
it
.
each
([
{
iid
:
135
,
web_url
:
'
some/url
'
},
{
iid
:
undefined
,
web_url
:
undefined
},
])(
'
returns formatted issue with expected properties for issue %s
'
,
issue
=>
{
const
formattedIssue
=
getFormattedIssue
(
issue
);
expect
(
formattedIssue
).
toMatchObject
({
...
issue
,
reference
:
`#
${
issue
.
iid
}
`
,
path
:
issue
.
web_url
,
});
},
);
expect
(
formattedIssue
).
toMatchObject
({
...
issue
,
reference
:
`#
${
issue
.
iid
}
`
,
path
:
issue
.
web_url
,
});
});
});
describe
(
'
getAddRelatedIssueRequestParams
'
,
()
=>
{
...
...
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