test rootless media card
This commit is contained in:
parent
2d24361832
commit
a6236f7fdf
1 changed files with 11 additions and 2 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue