@@ -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