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
6a1e3d69
Commit
6a1e3d69
authored
Aug 26, 2020
by
Illya Klymov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix wrong calls to `.$emit`
Fix tests which emit wrong events
parent
2fc53516
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
spec/frontend/alert_management/components/sidebar/alert_managment_sidebar_assignees_spec.js
...ponents/sidebar/alert_managment_sidebar_assignees_spec.js
+10
-7
spec/frontend/boards/components/board_list_header_spec.js
spec/frontend/boards/components/board_list_header_spec.js
+1
-1
spec/frontend/design_management/components/design_notes/design_discussion_spec.js
...agement/components/design_notes/design_discussion_spec.js
+1
-1
spec/frontend/design_management_legacy/components/design_notes/design_discussion_spec.js
..._legacy/components/design_notes/design_discussion_spec.js
+1
-1
No files found.
spec/frontend/alert_management/components/sidebar/alert_managment_sidebar_assignees_spec.js
View file @
6a1e3d69
...
...
@@ -125,7 +125,7 @@ describe('Alert Details Sidebar Assignees', () => {
});
});
it
(
'
show
s an error when request contains error messages
'
,
()
=>
{
it
(
'
emit
s an error when request contains error messages
'
,
()
=>
{
wrapper
.
setData
({
isDropdownSearching
:
false
});
const
errorMutationResult
=
{
data
:
{
...
...
@@ -137,12 +137,15 @@ describe('Alert Details Sidebar Assignees', () => {
};
jest
.
spyOn
(
wrapper
.
vm
.
$apollo
,
'
mutate
'
).
mockResolvedValue
(
errorMutationResult
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
const
SideBarAssigneeItem
=
wrapper
.
findAll
(
SidebarAssignee
).
at
(
0
);
SideBarAssigneeItem
.
vm
.
$emit
(
'
click
'
);
expect
(
wrapper
.
emitted
(
'
alert-refresh
'
)).
toBeUndefined
();
});
return
wrapper
.
vm
.
$nextTick
()
.
then
(()
=>
{
const
SideBarAssigneeItem
=
wrapper
.
findAll
(
SidebarAssignee
).
at
(
0
);
SideBarAssigneeItem
.
vm
.
$emit
(
'
update-alert-assignees
'
);
})
.
then
(()
=>
{
expect
(
wrapper
.
emitted
(
'
alert-error
'
)).
toBeDefined
();
});
});
it
(
'
stops updating and cancels loading when the request fails
'
,
()
=>
{
...
...
spec/frontend/boards/components/board_list_header_spec.js
View file @
6a1e3d69
...
...
@@ -106,7 +106,7 @@ describe('Board List Header Component', () => {
createComponent
();
expect
(
isCollapsed
()).
toBe
(
false
);
wrapper
.
find
(
'
[data-testid="board-list-header"]
'
).
vm
.
$emit
(
'
click
'
);
wrapper
.
find
(
'
[data-testid="board-list-header"]
'
).
trigger
(
'
click
'
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
isCollapsed
()).
toBe
(
false
);
...
...
spec/frontend/design_management/components/design_notes/design_discussion_spec.js
View file @
6a1e3d69
...
...
@@ -93,7 +93,7 @@ describe('Design discussions component', () => {
});
it
(
'
does not render a checkbox in reply form
'
,
()
=>
{
findReplyPlaceholder
().
vm
.
$emit
(
'
on
MouseDown
'
);
findReplyPlaceholder
().
vm
.
$emit
(
'
on
Click
'
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
findResolveCheckbox
().
exists
()).
toBe
(
false
);
...
...
spec/frontend/design_management_legacy/components/design_notes/design_discussion_spec.js
View file @
6a1e3d69
...
...
@@ -89,7 +89,7 @@ describe('Design discussions component', () => {
});
it
(
'
does not render a checkbox in reply form
'
,
()
=>
{
findReplyPlaceholder
().
vm
.
$emit
(
'
on
MouseDown
'
);
findReplyPlaceholder
().
vm
.
$emit
(
'
on
Click
'
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
findResolveCheckbox
().
exists
()).
toBe
(
false
);
...
...
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