File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,23 @@ describe('Editor', function() {
31
31
await this . page . waitFor ( 3000 ) ;
32
32
expect ( await this . page . $eval ( '#debugger-io' , isVisible ) ) . to . be . true ;
33
33
} ) ;
34
+
35
+ const token = 'eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.' ;
36
+ [ 'token' , 'value' , 'id_token' , 'access_token' ] . forEach ( ( key ) => {
37
+ [
38
+ `/?${ key } =${ token } ` ,
39
+ `/#${ key } =${ token } ` ,
40
+ `/?foo=bar&${ key } =${ token } ` ,
41
+ `/#foo=bar&${ key } =${ token } ` ,
42
+ ] . forEach ( ( structure , i ) => {
43
+ it ( `Should parse ${ key } from window.location.href [${ i } ]` , async function ( ) {
44
+ await this . page . goto ( `http://localhost:8000${ structure } ${ key } ${ i } ` ) ;
45
+ expect ( await this . page . evaluate ( ( ) => {
46
+ return window . test . tokenEditor . getValue ( ) ;
47
+ } ) ) . to . equal ( `${ token } ${ key } ${ i } ` ) ;
48
+ } ) ;
49
+ } )
50
+ } ) ;
34
51
35
52
it ( 'HS256 should be selected by default' , async function ( ) {
36
53
const selected = await this . page . $eval ( '#algorithm-select' , select => {
You can’t perform that action at this time.
0 commit comments