describe('Price Display Regression', () => { it('recipe cards show non-zero prices', () => { cy.visit('/') cy.get('.recipe-card', { timeout: 10000 }).should('have.length.gte', 1) cy.wait(2000) // wait for oils store to load and re-render // Check via .recipe-card-price elements which hold the formatted cost cy.get('.recipe-card-price').first().invoke('text').then(text => { const match = text.match(/¥\s*(\d+\.?\d*)/) expect(match, 'Card price should contain ¥').to.not.be.null expect(parseFloat(match[1]), 'Price should be > 0').to.be.gt(0) }) }) it('oil reference page shows non-zero prices', () => { cy.visit('/oils') cy.get('.oil-chip', { timeout: 10000 }).should('have.length.gte', 1) cy.wait(500) // Check that oil chips contain price info cy.get('.oil-chip').first().invoke('text').then(text => { // Oil chips show price somewhere in their text const match = text.match(/¥\s*(\d+\.?\d*)/) if (match) { expect(parseFloat(match[1])).to.be.gt(0) } // Even without ¥, just verify the chip renders expect(text.length).to.be.gt(0) }) }) it('recipe cards show price in correct format', () => { cy.visit('/') cy.get('.recipe-card', { timeout: 10000 }).should('have.length.gte', 1) // Verify multiple cards have prices cy.get('.recipe-card-price').should('have.length.gte', 1) cy.get('.recipe-card-price').each($el => { const text = $el.text() expect(text).to.match(/¥|💰/) }) }) })