File tree 1 file changed +19
-0
lines changed
javascript/node/selenium-webdriver/test/bidi
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,25 @@ suite(
186
186
assert . equal ( onResponseCompleted [ 0 ] . redirectCount , 0 )
187
187
} )
188
188
189
+ xit ( 'can listen to auth required event' , async function ( ) {
190
+ let authRequiredEvent = null
191
+ const inspector = await NetworkInspector ( driver )
192
+ await inspector . authRequired ( function ( event ) {
193
+ authRequiredEvent = event
194
+ } )
195
+
196
+ await driver . get ( Pages . basicAuth )
197
+
198
+ const url = authRequiredEvent . request . url
199
+ assert . equal ( authRequiredEvent . id , await driver . getWindowHandle ( ) )
200
+ assert . equal ( authRequiredEvent . request . method , 'GET' )
201
+ assert . equal ( url . includes ( 'basicAuth' ) , true )
202
+
203
+ assert . equal ( authRequiredEvent . response . status , 401 )
204
+ assert . equal ( authRequiredEvent . response . headers . length > 1 , true )
205
+ assert . equal ( authRequiredEvent . response . url . includes ( 'basicAuth' ) , true )
206
+ } )
207
+
189
208
it ( 'test response completed mime type' , async function ( ) {
190
209
let onResponseCompleted = [ ]
191
210
const inspector = await NetworkInspector ( driver )
You can’t perform that action at this time.
0 commit comments