fix(test): broken home tests

This commit is contained in:
Phan An 2021-01-03 12:28:57 +01:00
parent 4558b32e19
commit 94c44c41f2

View file

@ -2,7 +2,7 @@ context('Home Screen', () => {
beforeEach(() => {
cy.clock()
cy.$login()
cy.tick(0)
cy.tick(100)
})
it('renders', () => {
@ -32,14 +32,14 @@ context('Home Screen', () => {
it('a song item can be played', () => {
cy.$mockPlayback()
cy.get('.top-song-list [data-test=song-card]:first-child').within(() => {
cy.get('.top-song-list li:first-child [data-test=song-card]').within(() => {
cy.get('a.control').invoke('show').click()
}).should('have.class', 'playing')
cy.$assertPlaying()
})
it('a song item has a context menu', () => {
cy.get('.top-song-list [data-test=song-card]:first-child').rightclick()
cy.get('.top-song-list li:first-child').rightclick()
cy.findByTestId('song-context-menu').should('be.visible')
})
})