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() {
69
69
}
70
70
} ) ;
71
71
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 ( ) {
74
73
await this . page . select ( '#algorithm-select' , 'HS384' ) ;
75
-
74
+
76
75
await this . page . mouse . move ( 0 , 0 ) ;
76
+
77
+ function tippyVisible ( element ) {
78
+ return element . _tippy . state . visible ;
79
+ }
77
80
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 ;
79
83
80
84
const iatPos = await this . page . evaluate ( ( ) => {
81
85
return window . test . payloadEditor . charCoords ( {
@@ -86,7 +90,11 @@ describe('Editor', function() {
86
90
87
91
await this . page . mouse . move ( iatPos . left , iatPos . top ) ;
88
92
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 ;
90
98
} ) ;
91
99
92
100
it ( 'Displays a valid token by default' , async function ( ) {
You can’t perform that action at this time.
0 commit comments