From 440f9e23c64cdcda6ccaba92f16ae53efe2c90e9 Mon Sep 17 00:00:00 2001 From: Peter Wolanin <107691+pwolanin@users.noreply.github.com> Date: Tue, 14 Jan 2025 21:53:28 -0500 Subject: [PATCH] playing with realHover --- cypress/component/baseball-card.cy.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/cypress/component/baseball-card.cy.js b/cypress/component/baseball-card.cy.js index 2a7282ba..86e56ad9 100644 --- a/cypress/component/baseball-card.cy.js +++ b/cypress/component/baseball-card.cy.js @@ -77,16 +77,18 @@ describe('BaseballCard Component', () => { cy.get('.back').should('have.css', 'transform', 'matrix3d(-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1)') .and('not.be.visible'); - cy.get('.flip-container').realHover().should(($div) => { - expect($div.find('.front')).to.not.be.visible; + cy.get('.flip-container').realHover().find('.front').should(($front) => { + expect($front).to.not.be.visible; + expect($front).to.be.hidden; + //expect($front).to.have.css('transform', 'matrix3d(-1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)'); }); + // Still flipped. + cy.get('.front').should('be.hidden'); - // Check that the back side is now visible -// cy.get('.back').realHover().should('have.css', 'transform', 'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)'); - - // Check that the front side is now rotated out of view - // cy.get('.flipcontainer').realHover().should('not.be.visible'); -//.should('have.css', 'transform', 'matrix3d(-1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)'); + cy.get('.flip-container').realHover().find('.back').should(($back) => { + expect($back).to.be.visible; + //expect($back).to.have.css('transform', 'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)'); + }); }); })