Add playlist-item component test

This commit is contained in:
Phan An 2017-12-20 23:54:11 +01:00
parent 21b57ba1ef
commit 07556d35f3

View file

@ -37,4 +37,15 @@ describe('component/main-wrapper/sidebar/playlist-item', () => {
wrapper.find('input[type=text]').trigger('blur')
updateStub.calledWith(playlist).should.be.true
})
it("doesn't allow editing Favorites item", () => {
const wrapper = shallow(Component, {
propsData: {
playlist: { name: 'Favorites' },
type: 'favorites'
}
})
wrapper.find('li.favorites').trigger('dblclick')
wrapper.contains('input[type=text]').should.be.false
})
})