File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -69,13 +69,17 @@ describe('Editor', function() {
6969 }
7070 } ) ;
7171
72- it ( 'Should display a tooltip with a human readable ' +
73- 'date on claim hover' , async function ( ) {
72+ it ( 'Should display a tooltip for a claim' , async function ( ) {
7473 await this . page . select ( '#algorithm-select' , 'HS384' ) ;
75-
74+
7675 await this . page . mouse . move ( 0 , 0 ) ;
76+
77+ function tippyVisible ( element ) {
78+ return element . _tippy . state . visible ;
79+ }
7780
78- expect ( await this . page . $eval ( '#js-payload-tooltip' , isVisible ) ) . to . be . false ;
81+ expect ( await this . page . $eval ( '#decoded-jwt .output' , tippyVisible ) ) .
82+ to . be . false ;
7983
8084 const iatPos = await this . page . evaluate ( ( ) => {
8185 return window . test . payloadEditor . charCoords ( {
@@ -86,7 +90,11 @@ describe('Editor', function() {
8690
8791 await this . page . mouse . move ( iatPos . left , iatPos . top ) ;
8892
89- expect ( await this . page . $eval ( '#js-payload-tooltip' , isVisible ) ) . to . be . true ;
93+ // Wait for animation
94+ await this . page . waitFor ( 2000 ) ;
95+
96+ expect ( await this . page . $eval ( '#decoded-jwt .output' , tippyVisible ) )
97+ . to . be . true ;
9098 } ) ;
9199
92100 it ( 'Displays a valid token by default' , async function ( ) {
You can’t perform that action at this time.
0 commit comments