feat: Add basic cypress testing
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/1795>
This commit is contained in:
parent
cfc167fbf3
commit
9aeefca728
16 changed files with 1555 additions and 664 deletions
31
front/cypress/e2e/favorite.cy.ts
Normal file
31
front/cypress/e2e/favorite.cy.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
describe('Favorites', () => {
|
||||
it('can be done from album list view', () => {
|
||||
cy.login()
|
||||
|
||||
cy.visit('/')
|
||||
cy.wait(4000)
|
||||
|
||||
cy.get('.item.collapse-button-wrapper').click()
|
||||
cy.contains('Albums').click()
|
||||
|
||||
cy.get('.component-album-card').first().within(() => {
|
||||
cy.get('a').first().click()
|
||||
})
|
||||
|
||||
cy.get('.track-row.row').first().trigger('hover').within(() => {
|
||||
cy.get('.favorite-icon').then(($favButton) => {
|
||||
$favButton.click()
|
||||
// In case everything worked the favorite button should be pink
|
||||
cy.wrap($favButton).should('have.class', 'pink')
|
||||
|
||||
})
|
||||
|
||||
cy.get('.favorite-icon.pink').then(($unfavButton) => {
|
||||
$unfavButton.click()
|
||||
// In case everything worked the favorite button shouldn't be pink
|
||||
// anymore
|
||||
cy.wrap($unfavButton).should('not.have.class', 'pink')
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue