mirror of
https://github.com/koel/koel
synced 2025-02-17 22:08:28 +00:00
31 lines
771 B
TypeScript
31 lines
771 B
TypeScript
context('Home Screen', () => {
|
|
beforeEach(() => {
|
|
cy.clock()
|
|
cy.$login()
|
|
cy.tick(0)
|
|
})
|
|
|
|
it('renders', () => {
|
|
cy.get('.screen-header').should('be.visible')
|
|
cy.$each([
|
|
['.top-song-list', 3],
|
|
['.recent-song-list', 7],
|
|
['.recently-added-album-list', 6],
|
|
['.recently-added-song-list', 10],
|
|
['.top-artist-list', 1],
|
|
['.top-album-list', 3]
|
|
], (selector: string, itemCount: number) => {
|
|
cy.get(selector)
|
|
.should('exist')
|
|
.find('li')
|
|
.should('have.length', itemCount)
|
|
})
|
|
})
|
|
|
|
it('has a link to view all recently-played songs', () => {
|
|
cy.findByTestId('home-view-all-recently-played-btn')
|
|
.click()
|
|
.url()
|
|
.should('contain', '/#!/recently-played')
|
|
})
|
|
})
|