test homepage hero renders
This commit is contained in:
parent
821ff72b00
commit
ca20b7ae43
1 changed files with 32 additions and 0 deletions
32
frontend/rabbi_gerzi/cypress/e2e/home.cy.ts
Normal file
32
frontend/rabbi_gerzi/cypress/e2e/home.cy.ts
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
describe('homepage hero', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/')
|
||||
})
|
||||
|
||||
it('renders the header navigation', () => {
|
||||
cy.get('header').within(() => {
|
||||
cy.contains('Torah Media').should('be.visible')
|
||||
cy.contains('About').should('be.visible')
|
||||
cy.contains('Contact').should('be.visible')
|
||||
cy.contains('Donate').should('be.visible')
|
||||
})
|
||||
})
|
||||
|
||||
it('renders the hero headline with italic emphasis', () => {
|
||||
cy.get('[data-cy="hero"]').within(() => {
|
||||
cy.contains('upgrade our lives').should('be.visible')
|
||||
cy.contains('em', 'healthy').should('be.visible')
|
||||
cy.contains('em', 'integrated').should('be.visible')
|
||||
cy.contains('em', 'balanced').should('be.visible')
|
||||
cy.contains('Torah existence').should('be.visible')
|
||||
cy.contains('Rabbi Yehoshua Gerzi').should('be.visible')
|
||||
})
|
||||
})
|
||||
|
||||
it('renders the rabbi portrait image', () => {
|
||||
cy.get('[data-cy="hero-portrait"]')
|
||||
.should('be.visible')
|
||||
.and('have.attr', 'alt')
|
||||
.and('match', /Rabbi Yehoshua Gerzi/i)
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue