test pilzno brand alignment

This commit is contained in:
Yisroel Baum 2026-06-22 11:15:38 +03:00
parent a56649dc0b
commit ca6490d982
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
4 changed files with 39 additions and 67 deletions

View file

@ -8,12 +8,12 @@ describe('about page', () => {
cy.contains('Torah Media').should('be.visible') cy.contains('Torah Media').should('be.visible')
cy.contains('About').should('be.visible') cy.contains('About').should('be.visible')
cy.contains('Contact').should('be.visible') cy.contains('Contact').should('be.visible')
cy.contains('Donate').should('be.visible') cy.contains('Invest in Pilzno').should('be.visible')
}) })
cy.get('[data-cy="about-hero"]').within(() => { cy.get('[data-cy="about-hero"]').within(() => {
cy.contains('h1', 'About Rabbi Gerzi').should('be.visible') cy.contains('h1', 'About Rabbi Gerzi').should('be.visible')
cy.contains('Healthy, Integrated and Balanced Torah living') cy.contains('Integrated Torah life')
.should('be.visible') .should('be.visible')
cy.get('[data-cy="about-hero-image"]') cy.get('[data-cy="about-hero-image"]')
.should('be.visible') .should('be.visible')
@ -121,7 +121,7 @@ describe('about page', () => {
cy.get('[data-cy="footer"]').within(() => { cy.get('[data-cy="footer"]').within(() => {
cy.contains('Torah Media').should('be.visible') cy.contains('Torah Media').should('be.visible')
cy.contains('About').should('be.visible') cy.contains('About').should('be.visible')
cy.contains('Donate').should('be.visible') cy.contains('Invest in Pilzno').should('be.visible')
cy.contains('Contact').should('be.visible') cy.contains('Contact').should('be.visible')
cy.contains(/Rabbi Gerzi 2025/).should('be.visible') cy.contains(/Rabbi Gerzi 2025/).should('be.visible')
}) })

View file

@ -8,7 +8,7 @@ describe('contact page', () => {
cy.contains('Torah Media').should('be.visible') cy.contains('Torah Media').should('be.visible')
cy.contains('About').should('be.visible') cy.contains('About').should('be.visible')
cy.contains('Contact').should('be.visible') cy.contains('Contact').should('be.visible')
cy.contains('Donate').should('be.visible') cy.contains('Invest in Pilzno').should('be.visible')
}) })
cy.get('[data-cy="contact-hero"]').within(() => { cy.get('[data-cy="contact-hero"]').within(() => {
@ -111,7 +111,7 @@ describe('contact page', () => {
cy.get('[data-cy="footer"]').within(() => { cy.get('[data-cy="footer"]').within(() => {
cy.contains('Torah Media').should('be.visible') cy.contains('Torah Media').should('be.visible')
cy.contains('About').should('be.visible') cy.contains('About').should('be.visible')
cy.contains('Donate').should('be.visible') cy.contains('Invest in Pilzno').should('be.visible')
cy.contains('Contact').should('be.visible') cy.contains('Contact').should('be.visible')
cy.contains(/Rabbi Gerzi 2025/).should('be.visible') cy.contains(/Rabbi Gerzi 2025/).should('be.visible')
}) })

View file

@ -8,14 +8,14 @@ describe('homepage hero', () => {
cy.contains('Torah Media').should('be.visible') cy.contains('Torah Media').should('be.visible')
cy.contains('About').should('be.visible') cy.contains('About').should('be.visible')
cy.contains('Contact').should('be.visible') cy.contains('Contact').should('be.visible')
cy.contains('Donate').should('be.visible') cy.contains('Invest in Pilzno').should('be.visible')
}) })
}) })
it('links the navbar Donate item to Causematch', () => { it('links the navbar investment item to Causematch', () => {
const donateHref = 'https://causematch.com/pilzno_donate' const donateHref = 'https://causematch.com/pilzno_donate'
cy.contains('header.site-header a', 'Donate') cy.contains('header.site-header a', 'Invest in Pilzno')
.should('be.visible') .should('be.visible')
.and('have.attr', 'href', donateHref) .and('have.attr', 'href', donateHref)
.and('have.attr', 'target', '_blank') .and('have.attr', 'target', '_blank')
@ -30,74 +30,45 @@ describe('homepage hero', () => {
cy.contains('Torah Media').should('be.visible') cy.contains('Torah Media').should('be.visible')
cy.contains('About').should('be.visible') cy.contains('About').should('be.visible')
cy.contains('Contact').should('be.visible') cy.contains('Contact').should('be.visible')
cy.contains('Donate').should('be.visible') cy.contains('Invest in Pilzno').should('be.visible')
}) })
cy.contains('h1', 'Torah Media').should('be.visible') cy.contains('h1', 'Torah Media').should('be.visible')
}) })
it('renders the hero headline with italic emphasis', () => { it('renders the Rabbi Gerzi hero in Pilzno language', () => {
cy.get('[data-cy="hero"]').within(() => { cy.get('[data-cy="hero"]').within(() => {
cy.contains('upgrade our lives').should('be.visible') cy.contains('PILZNO').should('be.visible')
cy.contains('em', 'healthy').should('be.visible') cy.contains('RAMAT BET SHEMESH').should('be.visible')
cy.contains('em', 'integrated').should('be.visible') cy.contains('h1', 'Rabbi Yehoshua Gerzi').should('be.visible')
cy.contains('em', 'balanced').should('be.visible') cy.contains('Create Geula').should('be.visible')
cy.contains('Torah existence').should('be.visible') cy.contains('Elevate Life').should('be.visible')
cy.contains('Rabbi Yehoshua Gerzi').should('be.visible') cy.contains('Geula mindset').should('be.visible')
cy.contains('Integrated Torah life').should('be.visible')
}) })
}) })
it('renders the rabbi portrait image', () => { it('renders the rabbi portrait image in the brand hero', () => {
cy.get('[data-cy="hero-portrait"]') cy.get('[data-cy="hero-rabbi-portrait"]')
.should('be.visible') .should('be.visible')
.and('have.attr', 'alt') .and('have.attr', 'alt')
.and('match', /Rabbi Yehoshua Gerzi/i) .and('match', /Rabbi Yehoshua Gerzi/i)
}) })
it('lets the rabbi portrait rise above the circular frame', () => { it('uses Pilzno brand colors and typography tokens', () => {
cy.get<HTMLImageElement>('[data-cy="hero-portrait"]').then( cy.get('[data-cy="hero"]').then((heroElements) => {
(portraitElements) => { const heroStyle = getComputedStyle(heroElements[0])
const portraitImage = portraitElements[0] const documentStyle = getComputedStyle(document.documentElement)
const frameElement = portraitImage.parentElement
if (frameElement === null) { expect(documentStyle.getPropertyValue('--color-brand-purple').trim())
throw new Error('Portrait frame is missing') .to.equal('#2a1f3d')
} expect(documentStyle.getPropertyValue('--color-gold').trim())
.to.equal('#c9a84c')
const frameStyle = getComputedStyle(frameElement) expect(documentStyle.getPropertyValue('--font-display').trim())
.to.contain('Cormorant Garamond')
expect(frameStyle.overflowX).to.equal('visible') expect(documentStyle.getPropertyValue('--font-ui').trim())
expect(frameStyle.overflowY).to.equal('visible') .to.contain('Jost')
expect(portraitImage.getBoundingClientRect().top).to.be.lessThan( expect(heroStyle.backgroundColor).to.equal('rgb(42, 31, 61)')
frameElement.getBoundingClientRect().top, })
)
},
)
})
it('extends the circular background to the portrait base edges', () => {
cy.get<HTMLImageElement>('[data-cy="hero-portrait"]').then(
(portraitElements) => {
const portraitImage = portraitElements[0]
const frameElement = portraitImage.parentElement
if (frameElement === null) {
throw new Error('Portrait frame is missing')
}
const portraitBounds = portraitImage.getBoundingClientRect()
const frameBounds = frameElement.getBoundingClientRect()
const backgroundStyle = getComputedStyle(frameElement, '::before')
const backgroundWidth = Number.parseFloat(backgroundStyle.width)
const backgroundLeft =
frameBounds.left + (frameBounds.width - backgroundWidth) / 2
const backgroundRight = backgroundLeft + backgroundWidth
expect(backgroundStyle.content).to.not.equal('none')
expect(backgroundWidth).to.be.closeTo(portraitBounds.width, 1)
expect(backgroundLeft).to.be.closeTo(portraitBounds.left, 1)
expect(backgroundRight).to.be.closeTo(portraitBounds.right, 1)
},
)
}) })
}) })
@ -112,8 +83,9 @@ describe('homepage discover path section', () => {
.should('be.visible') .should('be.visible')
cy.contains('Rabbi Yehoshua Gerzi has dedicated his life') cy.contains('Rabbi Yehoshua Gerzi has dedicated his life')
.should('be.visible') .should('be.visible')
cy.contains('Healthy, Integrated and Balanced Torah Living') cy.contains('Integrated Torah life')
.should('be.visible') .should('be.visible')
cy.contains('Geula mindset').should('be.visible')
cy.contains('Ramat Beit Shemesh').should('be.visible') cy.contains('Ramat Beit Shemesh').should('be.visible')
cy.contains('Pilzno Institute of Higher Learning').should('be.visible') cy.contains('Pilzno Institute of Higher Learning').should('be.visible')
}) })
@ -577,16 +549,16 @@ describe('homepage get involved and footer', () => {
cy.get('[data-cy="footer"]').within(() => { cy.get('[data-cy="footer"]').within(() => {
cy.contains('Torah Media').should('be.visible') cy.contains('Torah Media').should('be.visible')
cy.contains('About').should('be.visible') cy.contains('About').should('be.visible')
cy.contains('Donate').should('be.visible') cy.contains('Invest in Pilzno').should('be.visible')
cy.contains('Contact').should('be.visible') cy.contains('Contact').should('be.visible')
cy.contains(/Rabbi Gerzi 2025/).should('be.visible') cy.contains(/Rabbi Gerzi 2025/).should('be.visible')
}) })
}) })
it('links the footer Donate item to Causematch', () => { it('links the footer investment item to Causematch', () => {
const donateHref = 'https://causematch.com/pilzno_donate' const donateHref = 'https://causematch.com/pilzno_donate'
cy.contains('[data-cy="footer"] a', 'Donate') cy.contains('[data-cy="footer"] a', 'Invest in Pilzno')
.should('be.visible') .should('be.visible')
.and('have.attr', 'href', donateHref) .and('have.attr', 'href', donateHref)
.and('have.attr', 'target', '_blank') .and('have.attr', 'target', '_blank')

View file

@ -9,7 +9,7 @@ describe('media page sets', () => {
cy.contains('Torah Media').should('be.visible') cy.contains('Torah Media').should('be.visible')
cy.contains('About').should('be.visible') cy.contains('About').should('be.visible')
cy.contains('Contact').should('be.visible') cy.contains('Contact').should('be.visible')
cy.contains('Donate').should('be.visible') cy.contains('Invest in Pilzno').should('be.visible')
}) })
cy.contains('h1', 'Torah Media').should('be.visible') cy.contains('h1', 'Torah Media').should('be.visible')
cy.get('[data-cy="media-set-grid"]').should('be.visible') cy.get('[data-cy="media-set-grid"]').should('be.visible')