Skip to content

Commit 440f9e2

Browse files
committed
playing with realHover
1 parent fd3c55c commit 440f9e2

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

cypress/component/baseball-card.cy.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,18 @@ describe('BaseballCard Component', () => {
7777
cy.get('.back').should('have.css', 'transform', 'matrix3d(-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1)')
7878
.and('not.be.visible');
7979

80-
cy.get('.flip-container').realHover().should(($div) => {
81-
expect($div.find('.front')).to.not.be.visible;
80+
cy.get('.flip-container').realHover().find('.front').should(($front) => {
81+
expect($front).to.not.be.visible;
82+
expect($front).to.be.hidden;
83+
//expect($front).to.have.css('transform', 'matrix3d(-1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)');
8284
});
85+
// Still flipped.
86+
cy.get('.front').should('be.hidden');
8387

84-
// Check that the back side is now visible
85-
// 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)');
86-
87-
// Check that the front side is now rotated out of view
88-
// cy.get('.flipcontainer').realHover().should('not.be.visible');
89-
//.should('have.css', 'transform', 'matrix3d(-1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)');
88+
cy.get('.flip-container').realHover().find('.back').should(($back) => {
89+
expect($back).to.be.visible;
90+
//expect($back).to.have.css('transform', 'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)');
91+
});
9092

9193
});
9294
})

0 commit comments

Comments
 (0)