Revert "Add tests for song-item component"

This reverts commit 892891c9cd.

# Conflicts:
#	resources/assets/js/tests/components/shared/song-item.spec.js
This commit is contained in:
Phan An 2018-01-09 23:54:33 +02:00
parent 3ad4b8742f
commit 693d2dc6d9

View file

@ -30,8 +30,6 @@ import { playback } from '@/services'
import { queueStore } from '@/stores'
import $ from 'vuequery'
let parentSongList
export default {
name: 'song-item',
props: {
@ -41,6 +39,12 @@ export default {
}
},
data () {
return {
parentSongList: null
}
},
computed: {
/**
* A shortcut to access the current vm's song (instead of this.item.song).
@ -60,7 +64,7 @@ export default {
},
mounted () {
parentSongList = window.__UNIT_TESTING__ || $(this).closest('song-list').vm
this.parentSongList = window.__UNIT_TESTING__ || $(this).closest('song-list').vm
},
methods: {
@ -94,7 +98,7 @@ export default {
* @param {Event} event
*/
clicked (event) {
parentSongList.rowClicked(this, event)
this.parentSongList.rowClicked(this, event)
},
/**
@ -102,7 +106,7 @@ export default {
* @param {Event} event
*/
dragStart (event) {
parentSongList.dragStart(this, event)
this.parentSongList.dragStart(this, event)
},
/**
@ -110,7 +114,7 @@ export default {
* @param {Event} event
*/
dragLeave (event) {
parentSongList.removeDroppableState(event)
this.parentSongList.removeDroppableState(event)
},
/**
@ -118,7 +122,7 @@ export default {
* @param {Event} event The dragover event.
*/
dragEnter (event) {
parentSongList.allowDrop(event)
this.parentSongList.allowDrop(event)
},
/**
@ -126,7 +130,7 @@ export default {
* @param {Event} event
*/
drop (event) {
parentSongList.handleDrop(this, event)
this.parentSongList.handleDrop(this, event)
},
/**
@ -134,7 +138,7 @@ export default {
* @param {Event} event
*/
contextMenu (event) {
parentSongList.openContextMenu(this, event)
this.parentSongList.openContextMenu(this, event)
}
}
}