@@ -158,6 +158,32 @@ describe('Footer component', () => {
158158 expect ( button . find ( { style : { WebkitAppearance : 'none' } } ) ) . to . have . length ( 1 ) ;
159159 expect ( button . find ( { style : { WebkitFontSmoothing : 'antialiased' } } ) ) . to . have . length ( 1 ) ;
160160 expect ( button . find ( { style : { MozOsxFontSmoothing : 'grayscale' } } ) ) . to . have . length ( 1 ) ;
161+ } ) ;
162+
163+ it ( 'Should have delete button hover styling applied in accordance with the design specs' , ( ) => {
164+ const todos = List ( [
165+ Map ( { id : uuid . v4 ( ) , description : 'todo 1' , completed : false } ) ,
166+ Map ( { id : uuid . v4 ( ) , description : 'todo 2' , completed : true } ) ,
167+ Map ( { id : uuid . v4 ( ) , description : 'todo 3' , completed : false } )
168+ ] ) ;
169+ const { component} = setup ( todos ) ;
170+ let button = component . find ( 'button' ) ;
171+
172+ expect ( button . find ( { style : { fontStyle : 'italic' } } ) ) . to . have . length ( 0 ) ;
173+ expect ( button . find ( { style : { fontWeight : 'bold' } } ) ) . to . have . length ( 0 ) ;
174+ expect ( button . find ( { style : { color : 'indianred' } } ) ) . to . have . length ( 0 ) ;
175+
176+ button . simulate ( 'mouseenter' ) ;
177+ button = component . find ( 'button' ) ;
178+ expect ( button . find ( { style : { fontStyle : 'italic' } } ) ) . to . have . length ( 1 ) ;
179+ expect ( button . find ( { style : { fontWeight : 'bold' } } ) ) . to . have . length ( 1 ) ;
180+ expect ( button . find ( { style : { color : 'indianred' } } ) ) . to . have . length ( 1 ) ;
181+
182+ button . simulate ( 'mouseleave' ) ;
183+ button = component . find ( 'button' ) ;
184+ expect ( button . find ( { style : { fontStyle : 'italic' } } ) ) . to . have . length ( 0 ) ;
185+ expect ( button . find ( { style : { fontWeight : 'bold' } } ) ) . to . have . length ( 0 ) ;
186+ expect ( button . find ( { style : { color : 'indianred' } } ) ) . to . have . length ( 0 ) ;
161187 } )
162188 } )
163189} ) ;
0 commit comments