test set layout browsing

This commit is contained in:
Yisroel Baum 2026-08-08 23:30:11 +03:00
parent 936855efab
commit eb7ac7d261
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
8 changed files with 619 additions and 3 deletions

View file

@ -15,7 +15,7 @@ describe('sets dashboard', () => {
interceptAuthenticatedUser()
})
it('shows every available set by name', () => {
it('shows every available set as a detail link', () => {
cy.intercept('GET', '**/api/sets', (request) => {
expect(request.headers.accept).to.equal('application/json')
request.reply({
@ -46,8 +46,13 @@ describe('sets dashboard', () => {
.should('not.contain.text', '41')
.and('not.contain.text', '58')
.and('not.contain.text', '92')
.find('a, button')
.should('not.exist')
cy.contains('a', 'Bible').should('have.attr', 'href', '/sets/41')
cy.contains('a', 'Course').should('have.attr', 'href', '/sets/58')
cy.contains('a', 'Fitness Program').should(
'have.attr',
'href',
'/sets/92',
)
})
it('shows loading and empty catalog states', () => {