@@ -21,8 +21,8 @@ import { IS_EE } from '../../e2e/config/constants';
2121 void request
2222 . get ( apps ( '/logs/instanceIds' ) )
2323 . set ( credentials )
24- . expect ( 'Content-Type' , 'application/json' )
2524 . expect ( 200 )
25+ . expect ( 'Content-Type' , 'application/json' )
2626 . expect ( ( res ) => {
2727 expect ( res . body ) . to . have . a . property ( 'success' , true ) ;
2828 expect ( res . body ) . to . have . a . property ( 'instanceIds' ) . that . is . an ( 'array' ) ;
@@ -39,8 +39,8 @@ import { IS_EE } from '../../e2e/config/constants';
3939 it ( 'should require authentication' , ( done ) => {
4040 void request
4141 . get ( apps ( '/logs/instanceIds' ) )
42- . expect ( 'Content-Type' , 'application/json' )
4342 . expect ( 401 )
43+ . expect ( 'Content-Type' , 'application/json' )
4444 . expect ( ( res ) => {
4545 expect ( res . body ) . to . have . a . property ( 'success' , false ) ;
4646 expect ( res . body ) . to . have . a . property ( 'error' ) ;
@@ -54,12 +54,13 @@ import { IS_EE } from '../../e2e/config/constants';
5454 void request
5555 . get ( apps ( '/logs/instanceIds' ) )
5656 . set ( credentials )
57- . expect ( 'Content-Type' , 'application/json' )
5857 . expect ( 403 )
58+ . expect ( 'Content-Type' , 'application/json' )
5959 . expect ( ( res ) => {
6060 expect ( res . body ) . to . have . a . property ( 'success' , false ) ;
6161 } )
62- . end ( ( ) => void updatePermission ( 'manage-apps' , [ 'admin' ] ) . then ( done ) ) ,
62+ // Doing the `updatePermission` call here pollutes the error reporting, but we shouldn't call `done` before doing it.
63+ . end ( ( err ) => void updatePermission ( 'manage-apps' , [ 'admin' ] ) . then ( ( ) => void done ( err ) ) ) ,
6364 ) ;
6465 } ) ;
6566
@@ -69,8 +70,8 @@ import { IS_EE } from '../../e2e/config/constants';
6970 void request
7071 . get ( apps ( '/logs/instanceIds' ) )
7172 . set ( credentials )
72- . expect ( 'Content-Type' , 'application/json' )
7373 . expect ( 200 )
74+ . expect ( 'Content-Type' , 'application/json' )
7475 . expect ( ( res ) => {
7576 expect ( res . body ) . to . have . a . property ( 'success' , true ) ;
7677 expect ( res . body ) . to . have . a . property ( 'instanceIds' ) . that . is . an ( 'array' ) ;
0 commit comments