mirror of
https://github.com/koel/koel
synced 2024-11-10 14:44:13 +00:00
feat(test): add missing e2e queue test
This commit is contained in:
parent
db9bb9ef5f
commit
b93f2d2e94
3 changed files with 29 additions and 2 deletions
|
@ -82,7 +82,7 @@ context('Queuing', { scrollBehavior: false }, () => {
|
|||
;([
|
||||
{ menuItem: 'After Current Song', queuedPosition: 2 },
|
||||
{ menuItem: 'Bottom of Queue', queuedPosition: 4 },
|
||||
{ menuItem: 'Top of Queue', queuedPosition: 1 },
|
||||
{ menuItem: 'Top of Queue', queuedPosition: 1 }
|
||||
]).forEach(config => {
|
||||
it(`queues a song to ${config.menuItem}`, () => {
|
||||
queueSomeFromSongList()
|
||||
|
@ -113,4 +113,28 @@ context('Queuing', { scrollBehavior: false }, () => {
|
|||
})
|
||||
})
|
||||
})
|
||||
|
||||
it('queues a song when plays it', () => {
|
||||
queueSomeFromSongList()
|
||||
|
||||
cy.$clickSidebarItem('All Songs')
|
||||
|
||||
let songTitle
|
||||
cy.get('#songsWrapper').within(() => {
|
||||
cy.get('tr.song-item:nth-child(4) .title')
|
||||
.invoke('text')
|
||||
.then(text => {
|
||||
songTitle = text
|
||||
})
|
||||
|
||||
cy.get('tr.song-item:nth-child(4)').dblclick()
|
||||
})
|
||||
|
||||
cy.$clickSidebarItem('Current Queue')
|
||||
cy.get('#queueWrapper').within(() => {
|
||||
cy.get('tr.song-item').should('have.length', 4)
|
||||
cy.get(`tr.song-item:nth-child(2) .title`).should('have.text', songTitle)
|
||||
cy.get('tr.song-item:nth-child(2)').should('have.class', 'playing')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
3
cypress/integration/song-list.spec.ts
Normal file
3
cypress/integration/song-list.spec.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
context('Queuing', { scrollBehavior: false }, () => {
|
||||
|
||||
})
|
|
@ -1 +1 @@
|
|||
Subproject commit 2fd5be0f98e6b3edecdc847440eb81243625705b
|
||||
Subproject commit 9e72452c39d09a275ebbcb5aa25531e7f66525a1
|
Loading…
Reference in a new issue