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
554d6030
Commit
554d6030
authored
Jan 08, 2020
by
Illya Klymov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove incorrect localVue usage
localVue is required only with use method
parent
4372a6c9
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
21 additions
and
47 deletions
+21
-47
ee/spec/frontend/vue_mr_widget/components/approvals/approvals_footer_spec.js
...e_mr_widget/components/approvals/approvals_footer_spec.js
+4
-7
ee/spec/frontend/vue_mr_widget/components/approvals/approvals_list_spec.js
...vue_mr_widget/components/approvals/approvals_list_spec.js
+2
-5
ee/spec/frontend/vue_mr_widget/components/approvals/approvals_summary_optional_spec.js
...t/components/approvals/approvals_summary_optional_spec.js
+2
-5
ee/spec/frontend/vue_mr_widget/components/approvals/approvals_summary_spec.js
..._mr_widget/components/approvals/approvals_summary_spec.js
+2
-5
ee/spec/frontend/vue_mr_widget/components/approvals/approved_icon_spec.js
.../vue_mr_widget/components/approvals/approved_icon_spec.js
+2
-4
ee/spec/frontend/vue_mr_widget/components/blocking_merge_requests/blocking_merge_requests_report_spec.js
...ing_merge_requests/blocking_merge_requests_report_spec.js
+1
-4
ee/spec/frontend/vue_mr_widget/components/merge_train_helper_text_spec.js
.../vue_mr_widget/components/merge_train_helper_text_spec.js
+2
-4
ee/spec/frontend/vue_mr_widget/components/merge_train_position_indicator_spec.js
..._widget/components/merge_train_position_indicator_spec.js
+2
-4
ee/spec/frontend/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
...widget/components/states/mr_widget_ready_to_merge_spec.js
+1
-1
ee/spec/frontend/vue_mr_widget/components/visual_review_app_spec.js
...ontend/vue_mr_widget/components/visual_review_app_spec.js
+3
-8
No files found.
ee/spec/frontend/vue_mr_widget/components/approvals/approvals_footer_spec.js
View file @
554d6030
import
_
from
'
underscore
'
;
import
_
from
'
underscore
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlButton
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
ApprovalsList
from
'
ee/vue_merge_request_widget/components/approvals/approvals_list.vue
'
;
import
ApprovalsList
from
'
ee/vue_merge_request_widget/components/approvals/approvals_list.vue
'
;
import
ApprovalsFooter
from
'
ee/vue_merge_request_widget/components/approvals/approvals_footer.vue
'
;
import
ApprovalsFooter
from
'
ee/vue_merge_request_widget/components/approvals/approvals_footer.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
UserAvatarList
from
'
~/vue_shared/components/user_avatar/user_avatar_list.vue
'
;
import
UserAvatarList
from
'
~/vue_shared/components/user_avatar/user_avatar_list.vue
'
;
const
localVue
=
createLocalVue
();
const
testSuggestedApprovers
=
()
=>
_
.
range
(
1
,
11
).
map
(
id
=>
({
id
}));
const
testSuggestedApprovers
=
()
=>
_
.
range
(
1
,
11
).
map
(
id
=>
({
id
}));
const
testApprovalRules
=
()
=>
[{
name
:
'
Lorem
'
},
{
name
:
'
Ipsum
'
}];
const
testApprovalRules
=
()
=>
[{
name
:
'
Lorem
'
},
{
name
:
'
Ipsum
'
}];
...
@@ -15,13 +13,12 @@ describe('EE MRWidget approvals footer', () => {
...
@@ -15,13 +13,12 @@ describe('EE MRWidget approvals footer', () => {
let
wrapper
;
let
wrapper
;
const
createComponent
=
(
props
=
{})
=>
{
const
createComponent
=
(
props
=
{})
=>
{
wrapper
=
shallowMount
(
localVue
.
extend
(
ApprovalsFooter
)
,
{
wrapper
=
shallowMount
(
ApprovalsFooter
,
{
propsData
:
{
propsData
:
{
suggestedApprovers
:
testSuggestedApprovers
(),
suggestedApprovers
:
testSuggestedApprovers
(),
approvalRules
:
testApprovalRules
(),
approvalRules
:
testApprovalRules
(),
...
props
,
...
props
,
},
},
localVue
,
sync
:
false
,
sync
:
false
,
});
});
};
};
...
@@ -190,8 +187,8 @@ describe('EE MRWidget approvals footer', () => {
...
@@ -190,8 +187,8 @@ describe('EE MRWidget approvals footer', () => {
button
.
vm
.
$emit
(
'
click
'
);
button
.
vm
.
$emit
(
'
click
'
);
localVue
wrapper
.
vm
.
nextTick
()
.
$
nextTick
()
.
then
(()
=>
{
.
then
(()
=>
{
expect
(
wrapper
.
emittedByOrder
()).
toEqual
([{
name
:
'
input
'
,
args
:
[
true
]
}]);
expect
(
wrapper
.
emittedByOrder
()).
toEqual
([{
name
:
'
input
'
,
args
:
[
true
]
}]);
})
})
...
...
ee/spec/frontend/vue_mr_widget/components/approvals/approvals_list_spec.js
View file @
554d6030
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
_
from
'
underscore
'
;
import
_
from
'
underscore
'
;
import
ApprovedIcon
from
'
ee/vue_merge_request_widget/components/approvals/approved_icon.vue
'
;
import
ApprovedIcon
from
'
ee/vue_merge_request_widget/components/approvals/approved_icon.vue
'
;
import
ApprovalsList
from
'
ee/vue_merge_request_widget/components/approvals/approvals_list.vue
'
;
import
ApprovalsList
from
'
ee/vue_merge_request_widget/components/approvals/approvals_list.vue
'
;
import
UserAvatarList
from
'
~/vue_shared/components/user_avatar/user_avatar_list.vue
'
;
import
UserAvatarList
from
'
~/vue_shared/components/user_avatar/user_avatar_list.vue
'
;
const
localVue
=
createLocalVue
();
const
testApprovers
=
()
=>
_
.
range
(
1
,
11
).
map
(
id
=>
({
id
}));
const
testApprovers
=
()
=>
_
.
range
(
1
,
11
).
map
(
id
=>
({
id
}));
const
testRuleApproved
=
()
=>
({
const
testRuleApproved
=
()
=>
({
id
:
1
,
id
:
1
,
...
@@ -57,9 +55,8 @@ describe('EE MRWidget approvals list', () => {
...
@@ -57,9 +55,8 @@ describe('EE MRWidget approvals list', () => {
let
wrapper
;
let
wrapper
;
const
createComponent
=
(
props
=
{})
=>
{
const
createComponent
=
(
props
=
{})
=>
{
wrapper
=
shallowMount
(
localVue
.
extend
(
ApprovalsList
)
,
{
wrapper
=
shallowMount
(
ApprovalsList
,
{
propsData
:
props
,
propsData
:
props
,
localVue
,
sync
:
false
,
sync
:
false
,
});
});
};
};
...
...
ee/spec/frontend/vue_mr_widget/components/approvals/approvals_summary_optional_spec.js
View file @
554d6030
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
{
import
{
OPTIONAL
,
OPTIONAL
,
...
@@ -6,18 +6,15 @@ import {
...
@@ -6,18 +6,15 @@ import {
}
from
'
ee/vue_merge_request_widget/components/approvals/messages
'
;
}
from
'
ee/vue_merge_request_widget/components/approvals/messages
'
;
import
ApprovalsSummaryOptional
from
'
ee/vue_merge_request_widget/components/approvals/approvals_summary_optional.vue
'
;
import
ApprovalsSummaryOptional
from
'
ee/vue_merge_request_widget/components/approvals/approvals_summary_optional.vue
'
;
const
localVue
=
createLocalVue
();
const
TEST_HELP_PATH
=
'
help/path
'
;
const
TEST_HELP_PATH
=
'
help/path
'
;
describe
(
'
EE MRWidget approvals summary optional
'
,
()
=>
{
describe
(
'
EE MRWidget approvals summary optional
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
const
createComponent
=
(
props
=
{})
=>
{
const
createComponent
=
(
props
=
{})
=>
{
wrapper
=
shallowMount
(
localVue
.
extend
(
ApprovalsSummaryOptional
)
,
{
wrapper
=
shallowMount
(
ApprovalsSummaryOptional
,
{
propsData
:
props
,
propsData
:
props
,
sync
:
false
,
sync
:
false
,
localVue
,
attachToDocument
:
true
,
attachToDocument
:
true
,
});
});
};
};
...
...
ee/spec/frontend/vue_mr_widget/components/approvals/approvals_summary_spec.js
View file @
554d6030
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
_
from
'
underscore
'
;
import
_
from
'
underscore
'
;
import
{
APPROVED_MESSAGE
}
from
'
ee/vue_merge_request_widget/components/approvals/messages
'
;
import
{
APPROVED_MESSAGE
}
from
'
ee/vue_merge_request_widget/components/approvals/messages
'
;
import
ApprovalsSummary
from
'
ee/vue_merge_request_widget/components/approvals/approvals_summary.vue
'
;
import
ApprovalsSummary
from
'
ee/vue_merge_request_widget/components/approvals/approvals_summary.vue
'
;
import
{
toNounSeriesText
}
from
'
~/lib/utils/grammar
'
;
import
{
toNounSeriesText
}
from
'
~/lib/utils/grammar
'
;
import
UserAvatarList
from
'
~/vue_shared/components/user_avatar/user_avatar_list.vue
'
;
import
UserAvatarList
from
'
~/vue_shared/components/user_avatar/user_avatar_list.vue
'
;
const
localVue
=
createLocalVue
();
const
testApprovers
=
()
=>
_
.
range
(
1
,
5
).
map
(
id
=>
({
id
}));
const
testApprovers
=
()
=>
_
.
range
(
1
,
5
).
map
(
id
=>
({
id
}));
const
testRulesLeft
=
()
=>
[
'
Lorem
'
,
'
Ipsum
'
,
'
dolar sit
'
];
const
testRulesLeft
=
()
=>
[
'
Lorem
'
,
'
Ipsum
'
,
'
dolar sit
'
];
const
TEST_APPROVALS_LEFT
=
3
;
const
TEST_APPROVALS_LEFT
=
3
;
...
@@ -15,7 +13,7 @@ describe('EE MRWidget approvals summary', () => {
...
@@ -15,7 +13,7 @@ describe('EE MRWidget approvals summary', () => {
let
wrapper
;
let
wrapper
;
const
createComponent
=
(
props
=
{})
=>
{
const
createComponent
=
(
props
=
{})
=>
{
wrapper
=
shallowMount
(
localVue
.
extend
(
ApprovalsSummary
)
,
{
wrapper
=
shallowMount
(
ApprovalsSummary
,
{
propsData
:
{
propsData
:
{
approved
:
false
,
approved
:
false
,
approvers
:
testApprovers
(),
approvers
:
testApprovers
(),
...
@@ -23,7 +21,6 @@ describe('EE MRWidget approvals summary', () => {
...
@@ -23,7 +21,6 @@ describe('EE MRWidget approvals summary', () => {
rulesLeft
:
testRulesLeft
(),
rulesLeft
:
testRulesLeft
(),
...
props
,
...
props
,
},
},
localVue
,
sync
:
false
,
sync
:
false
,
});
});
};
};
...
...
ee/spec/frontend/vue_mr_widget/components/approvals/approved_icon_spec.js
View file @
554d6030
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
ApprovedIcon
from
'
ee/vue_merge_request_widget/components/approvals/approved_icon.vue
'
;
import
ApprovedIcon
from
'
ee/vue_merge_request_widget/components/approvals/approved_icon.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
const
localVue
=
createLocalVue
();
const
EXPECTED_SIZE
=
16
;
const
EXPECTED_SIZE
=
16
;
describe
(
'
EE MRWidget approved icon
'
,
()
=>
{
describe
(
'
EE MRWidget approved icon
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
const
createComponent
=
(
props
=
{})
=>
{
const
createComponent
=
(
props
=
{})
=>
{
wrapper
=
shallowMount
(
localVue
.
extend
(
ApprovedIcon
)
,
{
wrapper
=
shallowMount
(
ApprovedIcon
,
{
propsData
:
props
,
propsData
:
props
,
localVue
,
sync
:
false
,
sync
:
false
,
});
});
};
};
...
...
ee/spec/frontend/vue_mr_widget/components/blocking_merge_requests/blocking_merge_requests_report_spec.js
View file @
554d6030
import
{
createLocalVue
,
shallowMount
,
config
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
,
config
}
from
'
@vue/test-utils
'
;
import
BlockingMergeRequestsReport
from
'
ee/vue_merge_request_widget/components/blocking_merge_requests/blocking_merge_requests_report.vue
'
;
import
BlockingMergeRequestsReport
from
'
ee/vue_merge_request_widget/components/blocking_merge_requests/blocking_merge_requests_report.vue
'
;
import
ReportSection
from
'
~/reports/components/report_section.vue
'
;
import
ReportSection
from
'
~/reports/components/report_section.vue
'
;
import
{
status
as
reportStatus
}
from
'
~/reports/constants
'
;
import
{
status
as
reportStatus
}
from
'
~/reports/constants
'
;
const
localVue
=
createLocalVue
();
describe
(
'
BlockingMergeRequestsReport
'
,
()
=>
{
describe
(
'
BlockingMergeRequestsReport
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
let
props
;
let
props
;
...
@@ -42,7 +40,6 @@ describe('BlockingMergeRequestsReport', () => {
...
@@ -42,7 +40,6 @@ describe('BlockingMergeRequestsReport', () => {
const
createComponent
=
(
propsData
=
props
)
=>
{
const
createComponent
=
(
propsData
=
props
)
=>
{
wrapper
=
shallowMount
(
BlockingMergeRequestsReport
,
{
wrapper
=
shallowMount
(
BlockingMergeRequestsReport
,
{
propsData
,
propsData
,
localVue
,
});
});
};
};
...
...
ee/spec/frontend/vue_mr_widget/components/merge_train_helper_text_spec.js
View file @
554d6030
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
{
trimText
}
from
'
helpers/text_helper
'
;
import
{
trimText
}
from
'
helpers/text_helper
'
;
import
MergeTrainHelperText
from
'
ee/vue_merge_request_widget/components/merge_train_helper_text.vue
'
;
import
MergeTrainHelperText
from
'
ee/vue_merge_request_widget/components/merge_train_helper_text.vue
'
;
describe
(
'
MergeTrainHelperText
'
,
()
=>
{
describe
(
'
MergeTrainHelperText
'
,
()
=>
{
const
localVue
=
createLocalVue
();
let
wrapper
;
let
wrapper
;
const
factory
=
propsData
=>
{
const
factory
=
propsData
=>
{
wrapper
=
shallowMount
(
localVue
.
extend
(
MergeTrainHelperText
)
,
{
wrapper
=
shallowMount
(
MergeTrainHelperText
,
{
propsData
,
propsData
,
localVue
,
sync
:
false
,
sync
:
false
,
});
});
};
};
...
...
ee/spec/frontend/vue_mr_widget/components/merge_train_position_indicator_spec.js
View file @
554d6030
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
trimText
}
from
'
helpers/text_helper
'
;
import
{
trimText
}
from
'
helpers/text_helper
'
;
import
MergeTrainPositionIndicator
from
'
ee/vue_merge_request_widget/components/merge_train_position_indicator.vue
'
;
import
MergeTrainPositionIndicator
from
'
ee/vue_merge_request_widget/components/merge_train_position_indicator.vue
'
;
describe
(
'
MergeTrainPositionIndicator
'
,
()
=>
{
describe
(
'
MergeTrainPositionIndicator
'
,
()
=>
{
const
localVue
=
createLocalVue
();
let
wrapper
;
let
wrapper
;
let
vm
;
let
vm
;
const
factory
=
propsData
=>
{
const
factory
=
propsData
=>
{
wrapper
=
shallowMount
(
localVue
.
extend
(
MergeTrainPositionIndicator
)
,
{
wrapper
=
shallowMount
(
MergeTrainPositionIndicator
,
{
propsData
,
propsData
,
localVue
,
sync
:
false
,
sync
:
false
,
});
});
...
...
ee/spec/frontend/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
View file @
554d6030
...
@@ -43,7 +43,7 @@ describe('ReadyToMerge', () => {
...
@@ -43,7 +43,7 @@ describe('ReadyToMerge', () => {
};
};
const
factory
=
(
mrUpdates
=
{})
=>
{
const
factory
=
(
mrUpdates
=
{})
=>
{
wrapper
=
shallowMount
(
localVue
.
extend
(
ReadyToMerge
)
,
{
wrapper
=
shallowMount
(
ReadyToMerge
,
{
propsData
:
{
propsData
:
{
mr
:
{
...
mr
,
...
mrUpdates
},
mr
:
{
...
mr
,
...
mrUpdates
},
service
,
service
,
...
...
ee/spec/frontend/vue_mr_widget/components/visual_review_app_spec.js
View file @
554d6030
import
{
shallowMount
,
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
,
mount
}
from
'
@vue/test-utils
'
;
import
VisualReviewAppLink
from
'
ee/vue_merge_request_widget/components/visual_review_app_link.vue
'
;
import
VisualReviewAppLink
from
'
ee/vue_merge_request_widget/components/visual_review_app_link.vue
'
;
import
{
GlButton
,
GlModal
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlModal
}
from
'
@gitlab/ui
'
;
import
{
mockTracking
,
triggerEvent
}
from
'
helpers/tracking_helper
'
;
import
{
mockTracking
,
triggerEvent
}
from
'
helpers/tracking_helper
'
;
import
ModalCopyButton
from
'
~/vue_shared/components/modal_copy_button.vue
'
;
import
ModalCopyButton
from
'
~/vue_shared/components/modal_copy_button.vue
'
;
const
localVue
=
createLocalVue
();
describe
(
'
Visual Review App Link
'
,
()
=>
{
describe
(
'
Visual Review App Link
'
,
()
=>
{
const
Component
=
localVue
.
extend
(
VisualReviewAppLink
);
let
wrapper
;
let
wrapper
;
let
propsData
;
let
propsData
;
...
@@ -30,9 +27,8 @@ describe('Visual Review App Link', () => {
...
@@ -30,9 +27,8 @@ describe('Visual Review App Link', () => {
describe
(
'
renders link and text
'
,
()
=>
{
describe
(
'
renders link and text
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
wrapper
=
mount
(
Component
,
{
wrapper
=
mount
(
VisualReviewAppLink
,
{
propsData
,
propsData
,
localVue
,
});
});
});
});
...
@@ -49,9 +45,8 @@ describe('Visual Review App Link', () => {
...
@@ -49,9 +45,8 @@ describe('Visual Review App Link', () => {
describe
(
'
renders the modal
'
,
()
=>
{
describe
(
'
renders the modal
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
wrapper
=
shallowMount
(
Component
,
{
wrapper
=
shallowMount
(
VisualReviewAppLink
,
{
propsData
,
propsData
,
localVue
,
});
});
});
});
it
(
'
with expected project Id
'
,
()
=>
{
it
(
'
with expected project Id
'
,
()
=>
{
...
...
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