test rootless media card

This commit is contained in:
Yisroel Baum 2026-05-25 22:08:13 +03:00
parent 2d24361832
commit a6236f7fdf
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

View file

@ -11,8 +11,9 @@ describe('media page sets', () => {
cy.contains('h1', 'Torah Media').should('be.visible')
cy.get('[data-cy="media-set-grid"]').should('be.visible')
cy.get('[data-cy="media-set-card"]', { timeout: 10000 })
.should('have.length', 1)
.first()
.should('have.length', 2)
cy.contains('[data-cy="media-set-card"]', 'Baderech HaAvodah')
.as('baderechCard')
.should('have.attr', 'href', '/element/1')
.within(() => {
@ -25,6 +26,14 @@ describe('media page sets', () => {
.should('be.visible')
})
cy.contains('[data-cy="media-set-card"]', 'Daily Learning')
.should('match', 'article')
.and('not.have.attr', 'href')
.within(() => {
cy.contains('h2', 'Daily Learning').should('be.visible')
cy.contains('Daily learning for steady growth').should('be.visible')
})
cy.get('@baderechCard').click()
cy.location('pathname').should('eq', '/element/1')
cy.get('[data-cy="element-page"]').should('be.visible')