Commit a9bcb5b8 authored by Phil Hughes's avatar Phil Hughes

Fixed eslint errors

parent 7512af29
...@@ -31,25 +31,25 @@ module.exports = { ...@@ -31,25 +31,25 @@ module.exports = {
index: Number, index: Number,
rootPath: String, rootPath: String,
}, },
data () { data() {
return { return {
showDetail: false, showDetail: false,
detailIssue: Store.detail detailIssue: Store.detail,
}; };
}, },
computed: { computed: {
issueDetailVisible () { issueDetailVisible() {
return this.detailIssue.issue && this.detailIssue.issue.id === this.issue.id; return this.detailIssue.issue && this.detailIssue.issue.id === this.issue.id;
} },
}, },
methods: { methods: {
mouseDown () { mouseDown() {
this.showDetail = true; this.showDetail = true;
}, },
mouseMove() { mouseMove() {
this.showDetail = false; this.showDetail = false;
}, },
showIssue (e) { showIssue(e) {
const targetTagName = e.target.tagName.toLowerCase(); const targetTagName = e.target.tagName.toLowerCase();
if (targetTagName === 'a' || targetTagName === 'button') return; if (targetTagName === 'a' || targetTagName === 'button') return;
...@@ -64,6 +64,6 @@ module.exports = { ...@@ -64,6 +64,6 @@ module.exports = {
Store.detail.list = this.list; Store.detail.list = this.list;
} }
} }
} },
} },
}; };
/* global Vue */ /* global Vue */
/* global List */ /* global List */
/* global ListLabel */
/* global listObj */ /* global listObj */
/* global boardsMockInterceptor */
/* global BoardService */
require('~/boards/models/list'); require('~/boards/models/list');
require('~/boards/models/label'); require('~/boards/models/label');
...@@ -40,7 +43,7 @@ describe('Issue card', () => { ...@@ -40,7 +43,7 @@ describe('Issue card', () => {
index: 0, index: 0,
rootPath: '/', rootPath: '/',
}, },
}).$mount();; }).$mount();
done(); done();
}, 0); }, 0);
}); });
...@@ -88,7 +91,8 @@ describe('Issue card', () => { ...@@ -88,7 +91,8 @@ describe('Issue card', () => {
describe('mouse events', () => { describe('mouse events', () => {
const triggerEvent = (eventName, el = vm.$el) => { const triggerEvent = (eventName, el = vm.$el) => {
const event = document.createEvent('MouseEvents'); 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); el.dispatchEvent(event);
}; };
...@@ -125,7 +129,7 @@ describe('Issue card', () => { ...@@ -125,7 +129,7 @@ describe('Issue card', () => {
expect(gl.issueBoards.BoardsStore.detail.issue).toEqual({}); 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'); triggerEvent('mouseup');
expect(gl.issueBoards.BoardsStore.detail.issue).toEqual({}); expect(gl.issueBoards.BoardsStore.detail.issue).toEqual({});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment