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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
a9bcb5b8
Commit
a9bcb5b8
authored
Feb 23, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed eslint errors
parent
7512af29
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
app/assets/javascripts/boards/components/board_card.js
app/assets/javascripts/boards/components/board_card.js
+8
-8
spec/javascripts/boards/board_card_spec.js
spec/javascripts/boards/board_card_spec.js
+7
-3
No files found.
app/assets/javascripts/boards/components/board_card.js
View file @
a9bcb5b8
...
...
@@ -31,25 +31,25 @@ module.exports = {
index
:
Number
,
rootPath
:
String
,
},
data
()
{
data
()
{
return
{
showDetail
:
false
,
detailIssue
:
Store
.
detail
detailIssue
:
Store
.
detail
,
};
},
computed
:
{
issueDetailVisible
()
{
issueDetailVisible
()
{
return
this
.
detailIssue
.
issue
&&
this
.
detailIssue
.
issue
.
id
===
this
.
issue
.
id
;
}
}
,
},
methods
:
{
mouseDown
()
{
mouseDown
()
{
this
.
showDetail
=
true
;
},
mouseMove
()
{
this
.
showDetail
=
false
;
},
showIssue
(
e
)
{
showIssue
(
e
)
{
const
targetTagName
=
e
.
target
.
tagName
.
toLowerCase
();
if
(
targetTagName
===
'
a
'
||
targetTagName
===
'
button
'
)
return
;
...
...
@@ -64,6 +64,6 @@ module.exports = {
Store
.
detail
.
list
=
this
.
list
;
}
}
}
}
}
,
}
,
};
spec/javascripts/boards/board_card_spec.js
View file @
a9bcb5b8
/* global Vue */
/* global List */
/* global ListLabel */
/* global listObj */
/* global boardsMockInterceptor */
/* global BoardService */
require
(
'
~/boards/models/list
'
);
require
(
'
~/boards/models/label
'
);
...
...
@@ -40,7 +43,7 @@ describe('Issue card', () => {
index
:
0
,
rootPath
:
'
/
'
,
},
}).
$mount
();
;
}).
$mount
();
done
();
},
0
);
});
...
...
@@ -88,7 +91,8 @@ describe('Issue card', () => {
describe
(
'
mouse events
'
,
()
=>
{
const
triggerEvent
=
(
eventName
,
el
=
vm
.
$el
)
=>
{
const
event
=
document
.
createEvent
(
'
MouseEvents
'
);
event
.
initMouseEvent
(
eventName
,
true
,
true
,
window
,
1
,
0
,
0
,
0
,
0
,
false
,
false
,
false
,
false
,
0
,
null
);
event
.
initMouseEvent
(
eventName
,
true
,
true
,
window
,
1
,
0
,
0
,
0
,
0
,
false
,
false
,
false
,
false
,
0
,
null
);
el
.
dispatchEvent
(
event
);
};
...
...
@@ -125,7 +129,7 @@ describe('Issue card', () => {
expect
(
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
).
toEqual
({});
});
it
(
'
does not set detail issue if showDetail is false
'
,
()
=>
{
it
(
'
does not set detail issue if showDetail is false
after mouseup
'
,
()
=>
{
triggerEvent
(
'
mouseup
'
);
expect
(
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
).
toEqual
({});
...
...
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