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
99bff445
Commit
99bff445
authored
Dec 23, 2020
by
Lukas Eipert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run prettier on 31 files - 48 of 73
Part of our prettier migration; changing the arrow-parens style.
parent
d1b6d05c
Changes
32
Show whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
67 additions
and
100 deletions
+67
-100
.prettierignore
.prettierignore
+0
-33
ee/spec/frontend/issues_analytics/components/issues_analytics_spec.js
...tend/issues_analytics/components/issues_analytics_spec.js
+1
-1
ee/spec/frontend/issues_analytics/components/issues_analytics_table_spec.js
...ssues_analytics/components/issues_analytics_table_spec.js
+3
-3
ee/spec/frontend/issues_analytics/mock_data.js
ee/spec/frontend/issues_analytics/mock_data.js
+1
-1
ee/spec/frontend/iterations/components/iteration_report_tabs_spec.js
...ntend/iterations/components/iteration_report_tabs_spec.js
+2
-2
ee/spec/frontend/iterations/components/iterations_spec.js
ee/spec/frontend/iterations/components/iterations_spec.js
+1
-1
ee/spec/frontend/license_compliance/components/app_spec.js
ee/spec/frontend/license_compliance/components/app_spec.js
+1
-1
ee/spec/frontend/license_compliance/components/license_component_links_spec.js
...nse_compliance/components/license_component_links_spec.js
+4
-4
ee/spec/frontend/license_compliance/components/licenses_table_spec.js
...tend/license_compliance/components/licenses_table_spec.js
+3
-3
ee/spec/frontend/maintenance_mode_settings/components/app_spec.js
...frontend/maintenance_mode_settings/components/app_spec.js
+1
-1
ee/spec/frontend/members/components/ldap/ldap_override_confirmation_modal_spec.js
.../components/ldap/ldap_override_confirmation_modal_spec.js
+2
-2
ee/spec/frontend/members/components/table/members_table_spec.js
...c/frontend/members/components/table/members_table_spec.js
+1
-1
ee/spec/frontend/members/utils_spec.js
ee/spec/frontend/members/utils_spec.js
+1
-1
ee/spec/frontend/notes/components/note_header_spec.js
ee/spec/frontend/notes/components/note_header_spec.js
+1
-1
ee/spec/frontend/on_demand_scans/components/on_demand_scans_app_spec.js
...nd/on_demand_scans/components/on_demand_scans_app_spec.js
+1
-1
ee/spec/frontend/on_demand_scans/components/on_demand_scans_form_spec.js
...d/on_demand_scans/components/on_demand_scans_form_spec.js
+4
-4
ee/spec/frontend/on_demand_scans/components/profile_selector/profile_selector_spec.js
...cans/components/profile_selector/profile_selector_spec.js
+3
-3
ee/spec/frontend/on_demand_scans/components/profile_selector/scanner_profile_selector_spec.js
...ponents/profile_selector/scanner_profile_selector_spec.js
+2
-2
ee/spec/frontend/on_demand_scans/components/profile_selector/site_profile_selector_spec.js
...components/profile_selector/site_profile_selector_spec.js
+2
-2
ee/spec/frontend/on_demand_scans/mocks/apollo_mocks.js
ee/spec/frontend/on_demand_scans/mocks/apollo_mocks.js
+2
-2
ee/spec/frontend/oncall_schedule/schedule/components/preset_weeks/weeks_header_sub_item_spec.js
...ule/components/preset_weeks/weeks_header_sub_item_spec.js
+1
-1
ee/spec/frontend/pages/groups/saml_providers/saml_members/store/actions_spec.js
.../groups/saml_providers/saml_members/store/actions_spec.js
+2
-2
ee/spec/frontend/projects/merge_requests/blocking_mr_input_root_spec.js
...nd/projects/merge_requests/blocking_mr_input_root_spec.js
+4
-4
ee/spec/frontend/related_items_tree/components/create_issue_form_spec.js
...d/related_items_tree/components/create_issue_form_spec.js
+2
-2
ee/spec/frontend/related_items_tree/store/actions_spec.js
ee/spec/frontend/related_items_tree/store/actions_spec.js
+6
-6
ee/spec/frontend/related_items_tree/store/mutations_spec.js
ee/spec/frontend/related_items_tree/store/mutations_spec.js
+1
-1
ee/spec/frontend/requirements/components/requirement_status_badge_spec.js
.../requirements/components/requirement_status_badge_spec.js
+2
-2
ee/spec/frontend/roadmap/components/epic_item_details_spec.js
...pec/frontend/roadmap/components/epic_item_details_spec.js
+1
-1
ee/spec/frontend/roadmap/components/epic_item_spec.js
ee/spec/frontend/roadmap/components/epic_item_spec.js
+1
-1
ee/spec/frontend/roadmap/components/epic_item_timeline_spec.js
...ec/frontend/roadmap/components/epic_item_timeline_spec.js
+1
-1
ee/spec/frontend/roadmap/components/epics_list_empty_spec.js
ee/spec/frontend/roadmap/components/epics_list_empty_spec.js
+9
-9
ee/spec/frontend/roadmap/components/milestones_list_section_spec.js
...ontend/roadmap/components/milestones_list_section_spec.js
+1
-1
No files found.
.prettierignore
View file @
99bff445
...
...
@@ -1369,39 +1369,6 @@ ee/app/assets/javascripts/vulnerabilities/components/resolution_alert.vue
ee/app/assets/javascripts/vulnerabilities/helpers.js
ee/app/assets/javascripts/vulnerabilities/vulnerabilities_init.js
## boring-brattain
ee/spec/frontend/issues_analytics/components/issues_analytics_spec.js
ee/spec/frontend/issues_analytics/components/issues_analytics_table_spec.js
ee/spec/frontend/issues_analytics/mock_data.js
ee/spec/frontend/iterations/components/iteration_report_tabs_spec.js
ee/spec/frontend/iterations/components/iterations_spec.js
ee/spec/frontend/license_compliance/components/app_spec.js
ee/spec/frontend/license_compliance/components/license_component_links_spec.js
ee/spec/frontend/license_compliance/components/licenses_table_spec.js
ee/spec/frontend/maintenance_mode_settings/components/app_spec.js
ee/spec/frontend/members/components/ldap/ldap_override_confirmation_modal_spec.js
ee/spec/frontend/members/components/table/members_table_spec.js
ee/spec/frontend/members/utils_spec.js
ee/spec/frontend/notes/components/note_header_spec.js
ee/spec/frontend/on_demand_scans/components/on_demand_scans_app_spec.js
ee/spec/frontend/on_demand_scans/components/on_demand_scans_form_spec.js
ee/spec/frontend/on_demand_scans/components/profile_selector/profile_selector_spec.js
ee/spec/frontend/on_demand_scans/components/profile_selector/scanner_profile_selector_spec.js
ee/spec/frontend/on_demand_scans/components/profile_selector/site_profile_selector_spec.js
ee/spec/frontend/on_demand_scans/mocks/apollo_mocks.js
ee/spec/frontend/oncall_schedule/schedule/components/preset_weeks/weeks_header_sub_item_spec.js
ee/spec/frontend/pages/groups/saml_providers/saml_members/store/actions_spec.js
ee/spec/frontend/projects/merge_requests/blocking_mr_input_root_spec.js
ee/spec/frontend/related_items_tree/components/create_issue_form_spec.js
ee/spec/frontend/related_items_tree/store/actions_spec.js
ee/spec/frontend/related_items_tree/store/mutations_spec.js
ee/spec/frontend/requirements/components/requirement_status_badge_spec.js
ee/spec/frontend/roadmap/components/epic_item_details_spec.js
ee/spec/frontend/roadmap/components/epic_item_spec.js
ee/spec/frontend/roadmap/components/epic_item_timeline_spec.js
ee/spec/frontend/roadmap/components/epics_list_empty_spec.js
ee/spec/frontend/roadmap/components/milestones_list_section_spec.js
## compassionate-aryabhata
ee/spec/frontend/roadmap/components/preset_months/months_header_sub_item_spec.js
ee/spec/frontend/roadmap/components/preset_quarters/quarters_header_item_spec.js
...
...
ee/spec/frontend/issues_analytics/components/issues_analytics_spec.js
View file @
99bff445
...
...
@@ -30,7 +30,7 @@ describe('Issue Analytics component', () => {
store
=
createStore
();
jest
.
spyOn
(
store
,
'
dispatch
'
).
mockImplementation
();
mountComponent
=
data
=>
{
mountComponent
=
(
data
)
=>
{
setFixtures
(
'
<div id="mock-filter"></div>
'
);
const
propsData
=
data
||
{
endpoint
:
TEST_HOST
,
...
...
ee/spec/frontend/issues_analytics/components/issues_analytics_table_spec.js
View file @
99bff445
...
...
@@ -24,12 +24,12 @@ describe('IssuesAnalyticsTable', () => {
const
findTable
=
()
=>
wrapper
.
find
(
GlTable
);
const
findIssueDetailsCol
=
rowIndex
=>
const
findIssueDetailsCol
=
(
rowIndex
)
=>
findTable
().
findAll
(
'
[data-testid="detailsCol"]
'
).
at
(
rowIndex
);
const
findAgeCol
=
rowIndex
=>
findTable
().
findAll
(
'
[data-testid="ageCol"]
'
).
at
(
rowIndex
);
const
findAgeCol
=
(
rowIndex
)
=>
findTable
().
findAll
(
'
[data-testid="ageCol"]
'
).
at
(
rowIndex
);
const
findStatusCol
=
rowIndex
=>
findTable
().
findAll
(
'
[data-testid="statusCol"]
'
).
at
(
rowIndex
);
const
findStatusCol
=
(
rowIndex
)
=>
findTable
().
findAll
(
'
[data-testid="statusCol"]
'
).
at
(
rowIndex
);
beforeEach
(()
=>
{
jest
.
spyOn
(
Date
,
'
now
'
).
mockImplementation
(()
=>
new
Date
(
'
2020-01-08
'
));
...
...
ee/spec/frontend/issues_analytics/mock_data.js
View file @
99bff445
import
{
TEST_HOST
}
from
'
helpers/test_constants
'
;
const
createIssue
=
values
=>
{
const
createIssue
=
(
values
)
=>
{
return
{
state
:
'
closed
'
,
epic
:
{
...
...
ee/spec/frontend/iterations/components/iteration_report_tabs_spec.js
View file @
99bff445
...
...
@@ -91,7 +91,7 @@ describe('Iterations report tabs', () => {
}));
const
findIssues
=
()
=>
wrapper
.
findAll
(
'
table tbody tr
'
);
const
findAssigneesForIssue
=
index
=>
findIssues
().
at
(
index
).
findAll
(
GlAvatar
);
const
findAssigneesForIssue
=
(
index
)
=>
findIssues
().
at
(
index
).
findAll
(
GlAvatar
);
beforeEach
(()
=>
{
mountComponent
();
...
...
@@ -123,7 +123,7 @@ describe('Iterations report tabs', () => {
describe
(
'
pagination
'
,
()
=>
{
const
findPagination
=
()
=>
wrapper
.
find
(
GlPagination
);
const
setPage
=
page
=>
{
const
setPage
=
(
page
)
=>
{
findPagination
().
vm
.
$emit
(
'
input
'
,
page
);
return
findPagination
().
vm
.
$nextTick
();
};
...
...
ee/spec/frontend/iterations/components/iterations_spec.js
View file @
99bff445
...
...
@@ -65,7 +65,7 @@ describe('Iterations', () => {
describe
(
'
pagination
'
,
()
=>
{
const
findPagination
=
()
=>
wrapper
.
find
(
GlPagination
);
const
setPage
=
page
=>
{
const
setPage
=
(
page
)
=>
{
findPagination
().
vm
.
$emit
(
'
input
'
,
page
);
return
findPagination
().
vm
.
$nextTick
();
};
...
...
ee/spec/frontend/license_compliance/components/app_spec.js
View file @
99bff445
...
...
@@ -83,7 +83,7 @@ const createComponent = ({ state, props, options }) => {
});
};
const
findByTestId
=
testId
=>
wrapper
.
find
(
`[data-testid="
${
testId
}
"]`
);
const
findByTestId
=
(
testId
)
=>
wrapper
.
find
(
`[data-testid="
${
testId
}
"]`
);
describe
(
'
Project Licenses
'
,
()
=>
{
afterEach
(()
=>
{
...
...
ee/spec/frontend/license_compliance/components/license_component_links_spec.js
View file @
99bff445
...
...
@@ -7,8 +7,8 @@ import LicenseComponentLinks, {
describe
(
'
LicenseComponentLinks component
'
,
()
=>
{
// data helpers
const
createComponents
=
n
=>
[...
Array
(
n
).
keys
()].
map
(
i
=>
({
const
createComponents
=
(
n
)
=>
[...
Array
(
n
).
keys
()].
map
(
(
i
)
=>
({
name
:
`component
${
i
+
1
}
`
,
version
:
(
i
+
1
)
%
2
===
0
?
null
:
`
${
i
+
1
}
.0.0`
,
}));
...
...
@@ -61,7 +61,7 @@ describe('LicenseComponentLinks component', () => {
expect
(
intersperseInstance
.
attributes
(
'
lastseparator
'
)).
toBe
(
'
and
'
);
});
it
.
each
([
3
,
5
,
8
,
13
])(
'
limits the number of visible licenses to 2
'
,
numComponents
=>
{
it
.
each
([
3
,
5
,
8
,
13
])(
'
limits the number of visible licenses to 2
'
,
(
numComponents
)
=>
{
factory
({
numComponents
});
expect
(
findComponentListItems
()).
toHaveLength
(
VISIBLE_COMPONENT_COUNT
);
...
...
@@ -96,7 +96,7 @@ describe('LicenseComponentLinks component', () => {
const
links
=
wrapper
.
findAll
(
GlLink
);
links
.
wrappers
.
forEach
(
link
=>
{
links
.
wrappers
.
forEach
(
(
link
)
=>
{
expect
(
link
.
attributes
(
'
target
'
)).
toBe
(
'
_blank
'
);
});
});
...
...
ee/spec/frontend/license_compliance/components/licenses_table_spec.js
View file @
99bff445
...
...
@@ -36,7 +36,7 @@ describe('LicensesTable component', () => {
});
});
[
true
,
false
].
forEach
(
isLoading
=>
{
[
true
,
false
].
forEach
(
(
isLoading
)
=>
{
describe
(
`given a list of licenses (
${
isLoading
?
'
loading
'
:
'
loaded
'
}
)`
,
()
=>
{
let
licenses
;
beforeEach
(()
=>
{
...
...
@@ -54,8 +54,8 @@ describe('LicensesTable component', () => {
it
(
'
passes the correct props to the table rows
'
,
()
=>
{
expect
(
findRows
()).
toHaveLength
(
licenses
.
length
);
expect
(
findRows
().
wrappers
.
map
(
x
=>
x
.
props
())).
toEqual
(
licenses
.
map
(
license
=>
({
expect
(
findRows
().
wrappers
.
map
(
(
x
)
=>
x
.
props
())).
toEqual
(
licenses
.
map
(
(
license
)
=>
({
license
,
isLoading
,
})),
...
...
ee/spec/frontend/maintenance_mode_settings/components/app_spec.js
View file @
99bff445
...
...
@@ -16,7 +16,7 @@ describe('MaintenanceModeSettingsApp', () => {
setBannerMessage
:
jest
.
fn
(),
};
const
createComponent
=
initialState
=>
{
const
createComponent
=
(
initialState
)
=>
{
const
store
=
new
Vuex
.
Store
({
state
:
{
...
MOCK_BASIC_SETTINGS_DATA
,
...
...
ee/spec/frontend/members/components/ldap/ldap_override_confirmation_modal_spec.js
View file @
99bff445
...
...
@@ -23,7 +23,7 @@ describe('LdapOverrideConfirmationModal', () => {
actions
=
{
updateLdapOverride
:
jest
.
fn
(
()
=>
new
Promise
(
resolve
=>
{
new
Promise
(
(
resolve
)
=>
{
resolveUpdateLdapOverride
=
resolve
;
}),
),
...
...
@@ -40,7 +40,7 @@ describe('LdapOverrideConfirmationModal', () => {
});
};
const
createComponent
=
state
=>
{
const
createComponent
=
(
state
)
=>
{
wrapper
=
mount
(
LdapOverrideConfirmationModal
,
{
localVue
,
store
:
createStore
(
state
),
...
...
ee/spec/frontend/members/components/table/members_table_spec.js
View file @
99bff445
...
...
@@ -26,7 +26,7 @@ describe('MemberList', () => {
});
};
const
createComponent
=
state
=>
{
const
createComponent
=
(
state
)
=>
{
wrapper
=
mount
(
MembersTable
,
{
localVue
,
store
:
createStore
(
state
),
...
...
ee/spec/frontend/members/utils_spec.js
View file @
99bff445
...
...
@@ -6,7 +6,7 @@ describe('Members Utils', () => {
it
(
'
has correct properties for each badge
'
,
()
=>
{
const
badges
=
generateBadges
(
memberMock
,
true
);
badges
.
forEach
(
badge
=>
{
badges
.
forEach
(
(
badge
)
=>
{
expect
(
badge
).
toEqual
(
expect
.
objectContaining
({
show
:
expect
.
any
(
Boolean
),
...
...
ee/spec/frontend/notes/components/note_header_spec.js
View file @
99bff445
...
...
@@ -18,7 +18,7 @@ describe('NoteHeader component', () => {
username
:
'
root
'
,
};
const
createComponent
=
props
=>
{
const
createComponent
=
(
props
)
=>
{
wrapper
=
shallowMount
(
NoteHeader
,
{
localVue
,
store
:
new
Vuex
.
Store
(),
...
...
ee/spec/frontend/on_demand_scans/components/on_demand_scans_app_spec.js
View file @
99bff445
...
...
@@ -19,7 +19,7 @@ describe('OnDemandScansApp', () => {
expect
(
wrapper
.
find
(
OnDemandScansForm
).
exists
()).
toBe
(
true
);
};
const
createComponent
=
options
=>
{
const
createComponent
=
(
options
)
=>
{
wrapper
=
shallowMount
(
OnDemandScansApp
,
merge
(
...
...
ee/spec/frontend/on_demand_scans/components/on_demand_scans_form_spec.js
View file @
99bff445
...
...
@@ -42,7 +42,7 @@ describe('OnDemandScansForm', () => {
let
requestHandlers
;
const
findForm
=
()
=>
subject
.
find
(
GlForm
);
const
findByTestId
=
testId
=>
subject
.
find
(
`[data-testid="
${
testId
}
"]`
);
const
findByTestId
=
(
testId
)
=>
subject
.
find
(
`[data-testid="
${
testId
}
"]`
);
const
findAlert
=
()
=>
findByTestId
(
'
on-demand-scan-error
'
);
const
findProfilesConflictAlert
=
()
=>
findByTestId
(
'
on-demand-scans-profiles-conflict-alert
'
);
const
findSubmitButton
=
()
=>
findByTestId
(
'
on-demand-scan-submit-button
'
);
...
...
@@ -54,7 +54,7 @@ describe('OnDemandScansForm', () => {
};
const
submitForm
=
()
=>
findForm
().
vm
.
$emit
(
'
submit
'
,
{
preventDefault
:
()
=>
{}
});
const
createMockApolloProvider
=
handlers
=>
{
const
createMockApolloProvider
=
(
handlers
)
=>
{
localVue
.
use
(
VueApollo
);
requestHandlers
=
{
...
...
@@ -255,7 +255,7 @@ describe('OnDemandScansForm', () => {
const
alert
=
findAlert
();
expect
(
alert
.
exists
()).
toBe
(
true
);
errors
.
forEach
(
error
=>
{
errors
.
forEach
(
(
error
)
=>
{
expect
(
alert
.
text
()).
toContain
(
error
);
});
});
...
...
@@ -343,7 +343,7 @@ describe('OnDemandScansForm', () => {
describe
(
'
site profile summary
'
,
()
=>
{
const
[
authEnabledProfile
]
=
siteProfiles
;
const
selectSiteProfile
=
profile
=>
{
const
selectSiteProfile
=
(
profile
)
=>
{
subject
.
find
(
SiteProfileSelector
).
vm
.
$emit
(
'
input
'
,
profile
.
id
);
return
subject
.
vm
.
$nextTick
();
};
...
...
ee/spec/frontend/on_demand_scans/components/profile_selector/profile_selector_spec.js
View file @
99bff445
...
...
@@ -13,7 +13,7 @@ describe('OnDemandScansProfileSelector', () => {
profiles
:
[],
};
const
findByTestId
=
testId
=>
wrapper
.
find
(
`[data-testid="
${
testId
}
"]`
);
const
findByTestId
=
(
testId
)
=>
wrapper
.
find
(
`[data-testid="
${
testId
}
"]`
);
const
findProfilesLibraryPathLink
=
()
=>
findByTestId
(
'
manage-profiles-link
'
);
const
findProfilesDropdown
=
()
=>
findByTestId
(
'
profiles-dropdown
'
);
const
findCreateNewProfileLink
=
()
=>
findByTestId
(
'
create-profile-link
'
);
...
...
@@ -21,7 +21,7 @@ describe('OnDemandScansProfileSelector', () => {
const
parseDropdownItems
=
()
=>
findProfilesDropdown
()
.
findAll
(
GlDropdownItem
)
.
wrappers
.
map
(
x
=>
({
.
wrappers
.
map
(
(
x
)
=>
({
text
:
x
.
text
(),
isChecked
:
x
.
props
(
'
isChecked
'
),
}));
...
...
@@ -106,7 +106,7 @@ describe('OnDemandScansProfileSelector', () => {
it
(
'
shows dropdown items for each profile
'
,
()
=>
{
expect
(
parseDropdownItems
()).
toEqual
(
scannerProfiles
.
map
(
x
=>
({
scannerProfiles
.
map
(
(
x
)
=>
({
text
:
x
.
profileName
,
isChecked
:
false
,
})),
...
...
ee/spec/frontend/on_demand_scans/components/profile_selector/scanner_profile_selector_spec.js
View file @
99bff445
...
...
@@ -9,7 +9,7 @@ const TEST_NEW_PATH = '/test/new/scanner/profile/path';
const
TEST_ATTRS
=
{
'
data-foo
'
:
'
bar
'
,
};
const
profiles
=
scannerProfiles
.
map
(
x
=>
{
const
profiles
=
scannerProfiles
.
map
(
(
x
)
=>
{
const
suffix
=
x
.
scanType
===
'
ACTIVE
'
?
'
Active
'
:
'
Passive
'
;
return
{
...
x
,
dropdownLabel
:
`
${
x
.
profileName
}
(
${
suffix
}
)`
};
});
...
...
@@ -106,7 +106,7 @@ describe('OnDemandScansScannerProfileSelector', () => {
expect
(
sel
.
props
()).
toEqual
({
libraryPath
:
TEST_LIBRARY_PATH
,
newProfilePath
:
TEST_NEW_PATH
,
profiles
:
scannerProfiles
.
map
(
x
=>
({
...
x
,
dropdownLabel
:
`
${
x
.
profileName
}
`
})),
profiles
:
scannerProfiles
.
map
(
(
x
)
=>
({
...
x
,
dropdownLabel
:
`
${
x
.
profileName
}
`
})),
value
:
null
,
});
expect
(
sel
.
attributes
()).
toMatchObject
(
TEST_ATTRS
);
...
...
ee/spec/frontend/on_demand_scans/components/profile_selector/site_profile_selector_spec.js
View file @
99bff445
...
...
@@ -9,7 +9,7 @@ const TEST_NEW_PATH = '/test/new/site/profile/path';
const
TEST_ATTRS
=
{
'
data-foo
'
:
'
bar
'
,
};
const
profiles
=
siteProfiles
.
map
(
x
=>
{
const
profiles
=
siteProfiles
.
map
(
(
x
)
=>
{
const
suffix
=
x
.
validationStatus
===
'
PASSED_VALIDATION
'
?
'
Validated
'
:
'
Not Validated
'
;
return
{
...
x
,
...
...
@@ -115,7 +115,7 @@ describe('OnDemandScansSiteProfileSelector', () => {
expect
(
sel
.
props
()).
toEqual
({
libraryPath
:
TEST_LIBRARY_PATH
,
newProfilePath
:
TEST_NEW_PATH
,
profiles
:
siteProfiles
.
map
(
x
=>
({
profiles
:
siteProfiles
.
map
(
(
x
)
=>
({
...
x
,
dropdownLabel
:
`
${
x
.
profileName
}
:
${
x
.
targetUrl
}
`
,
})),
...
...
ee/spec/frontend/on_demand_scans/mocks/apollo_mocks.js
View file @
99bff445
...
...
@@ -14,7 +14,7 @@ export const dastScannerProfiles = (profiles = scannerProfiles) => ({
project
:
{
scannerProfiles
:
{
...
defaults
,
edges
:
profiles
.
map
(
profile
=>
({
edges
:
profiles
.
map
(
(
profile
)
=>
({
cursor
:
''
,
node
:
profile
,
})),
...
...
@@ -28,7 +28,7 @@ export const dastSiteProfiles = (profiles = siteProfiles) => ({
project
:
{
siteProfiles
:
{
...
defaults
,
edges
:
profiles
.
map
(
profile
=>
({
edges
:
profiles
.
map
(
(
profile
)
=>
({
cursor
:
''
,
node
:
profile
,
})),
...
...
ee/spec/frontend/oncall_schedule/schedule/components/preset_weeks/weeks_header_sub_item_spec.js
View file @
99bff445
...
...
@@ -36,7 +36,7 @@ describe('WeeksHeaderSubItemComponent', () => {
it
(
'
returns `headerSubItems` array of dates containing days of week from timeframeItem
'
,
()
=>
{
expect
(
wrapper
.
vm
.
headerSubItems
).
toBeInstanceOf
(
Array
);
expect
(
wrapper
.
vm
.
headerSubItems
).
toHaveLength
(
7
);
wrapper
.
vm
.
headerSubItems
.
forEach
(
subItem
=>
{
wrapper
.
vm
.
headerSubItems
.
forEach
(
(
subItem
)
=>
{
expect
(
subItem
).
toBeInstanceOf
(
Date
);
});
});
...
...
ee/spec/frontend/pages/groups/saml_providers/saml_members/store/actions_spec.js
View file @
99bff445
...
...
@@ -23,7 +23,7 @@ describe('saml_members actions', () => {
});
describe
(
'
fetchPage
'
,
()
=>
{
it
(
'
should commit RECEIVE_SAML_MEMBERS_SUCCESS mutation on correct data
'
,
done
=>
{
it
(
'
should commit RECEIVE_SAML_MEMBERS_SUCCESS mutation on correct data
'
,
(
done
)
=>
{
const
members
=
[
{
id
:
1
,
name
:
'
user 1
'
,
group_saml_identity
:
null
},
{
id
:
2
,
name
:
'
user 2
'
,
group_saml_identity
:
{
extern_uid
:
'
a
'
}
},
...
...
@@ -72,7 +72,7 @@ describe('saml_members actions', () => {
);
});
it
(
'
should show flash on wrong data
'
,
done
=>
{
it
(
'
should show flash on wrong data
'
,
(
done
)
=>
{
Api
.
groupMembers
.
mockReturnValue
(
Promise
.
reject
(
new
Error
()));
testAction
(
fetchPage
,
undefined
,
state
,
[],
[],
()
=>
{
expect
(
flash
).
toHaveBeenCalledTimes
(
1
);
...
...
ee/spec/frontend/projects/merge_requests/blocking_mr_input_root_spec.js
View file @
99bff445
...
...
@@ -6,19 +6,19 @@ describe('blocking mr input root', () => {
let
wrapper
;
const
getInput
=
()
=>
wrapper
.
find
(
RelatedIssuableInput
);
const
addTokenizedInput
=
input
=>
{
const
addTokenizedInput
=
(
input
)
=>
{
getInput
().
vm
.
$emit
(
'
addIssuableFormInput
'
,
{
untouchedRawReferences
:
[
input
],
touchedReference
:
''
,
});
};
const
addInput
=
input
=>
{
const
addInput
=
(
input
)
=>
{
getInput
().
vm
.
$emit
(
'
addIssuableFormInput
'
,
{
untouchedRawReferences
:
[],
touchedReference
:
input
,
});
};
const
removeRef
=
index
=>
{
const
removeRef
=
(
index
)
=>
{
getInput
().
vm
.
$emit
(
'
pendingIssuableRemoveRequest
'
,
index
);
};
const
createComponent
=
(
propsData
=
{})
=>
{
...
...
@@ -71,7 +71,7 @@ describe('blocking mr input root', () => {
});
describe
(
'
hidden inputs
'
,
()
=>
{
const
createHiddenInputExpectation
=
selector
=>
bool
=>
{
const
createHiddenInputExpectation
=
(
selector
)
=>
(
bool
)
=>
{
expect
(
wrapper
.
find
(
selector
).
element
.
value
).
toBe
(
`
${
bool
}
`
);
};
...
...
ee/spec/frontend/related_items_tree/components/create_issue_form_spec.js
View file @
99bff445
...
...
@@ -187,7 +187,7 @@ describe('CreateIssueForm', () => {
it
(
'
renders Projects dropdown contents containing only matching project when searchKey is provided
'
,
()
=>
{
const
searchKey
=
'
Underscore
'
;
const
filteredMockProjects
=
mockProjects
.
filter
(
project
=>
project
.
name
===
searchKey
);
const
filteredMockProjects
=
mockProjects
.
filter
(
(
project
)
=>
project
.
name
===
searchKey
);
jest
.
spyOn
(
wrapper
.
vm
,
'
fetchProjects
'
).
mockImplementation
(
jest
.
fn
());
wrapper
.
find
(
GlDeprecatedDropdown
).
trigger
(
'
click
'
);
...
...
@@ -208,7 +208,7 @@ describe('CreateIssueForm', () => {
it
(
'
renders Projects dropdown contents containing string string "No matches found" when searchKey provided does not match any project
'
,
()
=>
{
const
searchKey
=
"
this-project-shouldn't exist
"
;
const
filteredMockProjects
=
mockProjects
.
filter
(
project
=>
project
.
name
===
searchKey
);
const
filteredMockProjects
=
mockProjects
.
filter
(
(
project
)
=>
project
.
name
===
searchKey
);
jest
.
spyOn
(
wrapper
.
vm
,
'
fetchProjects
'
).
mockImplementation
(
jest
.
fn
());
wrapper
.
find
(
GlDeprecatedDropdown
).
trigger
(
'
click
'
);
...
...
ee/spec/frontend/related_items_tree/store/actions_spec.js
View file @
99bff445
...
...
@@ -40,7 +40,7 @@ describe('RelatedItemTree', () => {
describe
(
'
store
'
,
()
=>
{
describe
(
'
actions
'
,
()
=>
{
let
state
;
const
mockItems
=
mockEpics
.
map
(
item
=>
const
mockItems
=
mockEpics
.
map
(
(
item
)
=>
epicUtils
.
formatChildItem
(
Object
.
assign
(
item
,
{
type
:
ChildType
.
Epic
})),
);
...
...
@@ -101,9 +101,9 @@ describe('RelatedItemTree', () => {
});
describe
(
'
updateChildrenCount
'
,
()
=>
{
const
mockEpicsWithType
=
mockEpics
.
map
(
item
=>
({
...
item
,
type
:
ChildType
.
Epic
}));
const
mockEpicsWithType
=
mockEpics
.
map
(
(
item
)
=>
({
...
item
,
type
:
ChildType
.
Epic
}));
const
mockIssuesWithType
=
mockIssues
.
map
(
item
=>
({
...
item
,
type
:
ChildType
.
Issue
}));
const
mockIssuesWithType
=
mockIssues
.
map
(
(
item
)
=>
({
...
item
,
type
:
ChildType
.
Issue
}));
it
(
'
should update openedEpics, by incrementing it
'
,
()
=>
{
testAction
(
...
...
@@ -826,7 +826,7 @@ describe('RelatedItemTree', () => {
state
.
issuableType
=
issuableTypesMap
.
EPIC
;
state
.
isEpic
=
true
;
const
mockEpicsWithoutPerm
=
mockEpics
.
map
(
item
=>
({
const
mockEpicsWithoutPerm
=
mockEpics
.
map
(
(
item
)
=>
({
...
item
,
pathIdSeparator
:
PathIdSeparator
.
Epic
,
userPermissions
:
{
adminEpic
:
undefined
},
...
...
@@ -1511,7 +1511,7 @@ describe('RelatedItemTree', () => {
beforeEach
(()
=>
{
requestSpy
=
jest
.
fn
();
axiosMock
.
onPost
(
issuesEndpoint
).
replyOnce
(
config
=>
requestSpy
(
config
));
axiosMock
.
onPost
(
issuesEndpoint
).
replyOnce
(
(
config
)
=>
requestSpy
(
config
));
context
=
{
state
:
{
...
...
@@ -1551,7 +1551,7 @@ describe('RelatedItemTree', () => {
requestSpy
.
mockReturnValue
([
500
,
''
]);
});
it
(
'
fails and shows flash message
'
,
done
=>
{
it
(
'
fails and shows flash message
'
,
(
done
)
=>
{
return
actions
.
createNewIssue
(
context
,
payload
)
.
then
(()
=>
done
.
fail
(
'
expected action to throw error!
'
))
...
...
ee/spec/frontend/related_items_tree/store/mutations_spec.js
View file @
99bff445
...
...
@@ -118,7 +118,7 @@ describe('RelatedItemsTree', () => {
mutations
[
types
.
SET_ITEM_CHILDREN_FLAGS
](
state
,
data
);
data
.
children
.
forEach
(
item
=>
{
data
.
children
.
forEach
(
(
item
)
=>
{
expect
(
state
.
childrenFlags
[
item
.
reference
]).
toEqual
(
expect
.
objectContaining
({
itemExpanded
:
false
,
...
...
ee/spec/frontend/requirements/components/requirement_status_badge_spec.js
View file @
99bff445
...
...
@@ -15,8 +15,8 @@ const createComponent = ({
},
});
const
findGlBadge
=
wrapper
=>
wrapper
.
find
(
GlBadge
);
const
findGlTooltip
=
wrapper
=>
wrapper
.
find
(
GlTooltip
);
const
findGlBadge
=
(
wrapper
)
=>
wrapper
.
find
(
GlBadge
);
const
findGlTooltip
=
(
wrapper
)
=>
wrapper
.
find
(
GlTooltip
);
const
successBadgeProps
=
{
variant
:
'
success
'
,
...
...
ee/spec/frontend/roadmap/components/epic_item_details_spec.js
View file @
99bff445
...
...
@@ -69,7 +69,7 @@ describe('EpicItemDetails', () => {
title
:
getGroupName
().
attributes
(
'
title
'
),
});
const
createMockEpic
=
epic
=>
({
const
createMockEpic
=
(
epic
)
=>
({
...
mockFormattedEpic
,
...
epic
,
});
...
...
ee/spec/frontend/roadmap/components/epic_item_spec.js
View file @
99bff445
...
...
@@ -17,7 +17,7 @@ import {
}
from
'
ee_jest/roadmap/mock_data
'
;
jest
.
mock
(
'
lodash/delay
'
,
()
=>
jest
.
fn
(
func
=>
{
jest
.
fn
(
(
func
)
=>
{
// eslint-disable-next-line no-param-reassign
func
.
delay
=
jest
.
fn
();
return
func
;
...
...
ee/spec/frontend/roadmap/components/epic_item_timeline_spec.js
View file @
99bff445
...
...
@@ -26,7 +26,7 @@ const createComponent = ({
});
};
const
getEpicBar
=
wrapper
=>
wrapper
.
find
(
'
.epic-bar
'
);
const
getEpicBar
=
(
wrapper
)
=>
wrapper
.
find
(
'
.epic-bar
'
);
describe
(
'
EpicItemTimelineComponent
'
,
()
=>
{
let
wrapper
;
...
...
ee/spec/frontend/roadmap/components/epics_list_empty_spec.js
View file @
99bff445
...
...
@@ -55,7 +55,7 @@ describe('EpicsListEmptyComponent', () => {
expect
(
vm
.
message
).
toBe
(
'
The roadmap shows the progress of your epics along a timeline
'
);
});
it
(
'
returns empty state message when `hasFiltersApplied` prop is true
'
,
done
=>
{
it
(
'
returns empty state message when `hasFiltersApplied` prop is true
'
,
(
done
)
=>
{
vm
.
hasFiltersApplied
=
true
;
Vue
.
nextTick
()
.
then
(()
=>
{
...
...
@@ -74,7 +74,7 @@ describe('EpicsListEmptyComponent', () => {
vm
.
timeframeEnd
=
mockTimeframeQuarters
[
mockTimeframeQuarters
.
length
-
1
];
});
it
(
'
returns default empty state sub-message when `hasFiltersApplied` props is false
'
,
done
=>
{
it
(
'
returns default empty state sub-message when `hasFiltersApplied` props is false
'
,
(
done
)
=>
{
Vue
.
nextTick
()
.
then
(()
=>
{
expect
(
vm
.
subMessage
).
toBe
(
...
...
@@ -85,7 +85,7 @@ describe('EpicsListEmptyComponent', () => {
.
catch
(
done
.
fail
);
});
it
(
'
returns empty state sub-message when `hasFiltersApplied` prop is true
'
,
done
=>
{
it
(
'
returns empty state sub-message when `hasFiltersApplied` prop is true
'
,
(
done
)
=>
{
vm
.
hasFiltersApplied
=
true
;
Vue
.
nextTick
()
.
then
(()
=>
{
...
...
@@ -103,7 +103,7 @@ describe('EpicsListEmptyComponent', () => {
vm
.
presetType
=
PRESET_TYPES
.
MONTHS
;
});
it
(
'
returns default empty state sub-message when `hasFiltersApplied` props is false
'
,
done
=>
{
it
(
'
returns default empty state sub-message when `hasFiltersApplied` props is false
'
,
(
done
)
=>
{
Vue
.
nextTick
()
.
then
(()
=>
{
expect
(
vm
.
subMessage
).
toBe
(
...
...
@@ -114,7 +114,7 @@ describe('EpicsListEmptyComponent', () => {
.
catch
(
done
.
fail
);
});
it
(
'
returns empty state sub-message when `hasFiltersApplied` prop is true
'
,
done
=>
{
it
(
'
returns empty state sub-message when `hasFiltersApplied` prop is true
'
,
(
done
)
=>
{
vm
.
hasFiltersApplied
=
true
;
Vue
.
nextTick
()
.
then
(()
=>
{
...
...
@@ -137,7 +137,7 @@ describe('EpicsListEmptyComponent', () => {
vm
.
timeframeEnd
=
timeframeEnd
;
});
it
(
'
returns default empty state sub-message when `hasFiltersApplied` props is false
'
,
done
=>
{
it
(
'
returns default empty state sub-message when `hasFiltersApplied` props is false
'
,
(
done
)
=>
{
Vue
.
nextTick
()
.
then
(()
=>
{
expect
(
vm
.
subMessage
).
toBe
(
...
...
@@ -148,7 +148,7 @@ describe('EpicsListEmptyComponent', () => {
.
catch
(
done
.
fail
);
});
it
(
'
returns empty state sub-message when `hasFiltersApplied` prop is true
'
,
done
=>
{
it
(
'
returns empty state sub-message when `hasFiltersApplied` prop is true
'
,
(
done
)
=>
{
vm
.
hasFiltersApplied
=
true
;
Vue
.
nextTick
()
.
then
(()
=>
{
...
...
@@ -162,7 +162,7 @@ describe('EpicsListEmptyComponent', () => {
});
describe
(
'
with child epics context
'
,
()
=>
{
it
(
'
returns empty state sub-message when `isChildEpics` is set to `true`
'
,
done
=>
{
it
(
'
returns empty state sub-message when `isChildEpics` is set to `true`
'
,
(
done
)
=>
{
vm
.
isChildEpics
=
true
;
Vue
.
nextTick
()
.
then
(()
=>
{
...
...
@@ -195,7 +195,7 @@ describe('EpicsListEmptyComponent', () => {
expect
(
vm
.
$el
.
querySelector
(
'
#epic-create-root
'
)).
not
.
toBeNull
();
});
it
(
'
does not render new epic button element when `hasFiltersApplied` prop is true
'
,
done
=>
{
it
(
'
does not render new epic button element when `hasFiltersApplied` prop is true
'
,
(
done
)
=>
{
vm
.
hasFiltersApplied
=
true
;
Vue
.
nextTick
()
.
then
(()
=>
{
...
...
ee/spec/frontend/roadmap/components/milestones_list_section_spec.js
View file @
99bff445
...
...
@@ -12,7 +12,7 @@ import { getTimeframeForMonthsView } from 'ee/roadmap/utils/roadmap_utils';
import
{
mockTimeframeInitialDate
,
mockGroupId
,
rawMilestones
}
from
'
ee_jest/roadmap/mock_data
'
;
import
{
createMockDirective
,
getBinding
}
from
'
helpers/vue_mock_directive
'
;
const
initializeStore
=
mockTimeframeMonths
=>
{
const
initializeStore
=
(
mockTimeframeMonths
)
=>
{
const
store
=
createStore
();
store
.
dispatch
(
'
setInitialData
'
,
{
currentGroupId
:
mockGroupId
,
...
...
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