@@ -138,23 +138,27 @@ test.suite(
138138 } )
139139
140140 describe ( 'Basic Auth Injection' , function ( ) {
141- it ( 'denies entry if username and password do not match' , async function ( ) {
142- const pageCdpConnection = await driver . createCDPConnection ( 'page' )
143-
144- await driver . register ( 'random' , 'random' , pageCdpConnection )
145- await driver . get ( fileServer . Pages . basicAuth )
146- let source = await driver . getPageSource ( )
147- assert . strictEqual ( source . includes ( 'Access granted!' ) , false )
148- } )
149-
150- it ( 'grants access if username and password are a match' , async function ( ) {
151- const pageCdpConnection = await driver . createCDPConnection ( 'page' )
141+ it ( 'denies entry if username and password do not match' ,
142+ async function ( ) {
143+ const pageCdpConnection = await driver . createCDPConnection ( 'page' )
144+
145+ await driver . register ( 'random' , 'random' , pageCdpConnection )
146+ await driver . get ( fileServer . Pages . basicAuth )
147+ let source = await driver . getPageSource ( )
148+ assert . strictEqual ( source . includes ( 'Access granted!' ) , false , source )
149+ } )
150+ } )
152151
153- await driver . register ( 'genie' , 'bottle' , pageCdpConnection )
154- await driver . get ( fileServer . Pages . basicAuth )
155- let source = await driver . getPageSource ( )
156- assert . strictEqual ( source . includes ( 'Access granted!' ) , true )
157- } )
152+ describe ( 'Basic Auth Injection' , function ( ) {
153+ it ( 'grants access if username and password are a match' ,
154+ async function ( ) {
155+ const pageCdpConnection = await driver . createCDPConnection ( 'page' )
156+
157+ await driver . register ( 'genie' , 'bottle' , pageCdpConnection )
158+ await driver . get ( fileServer . Pages . basicAuth )
159+ let source = await driver . getPageSource ( )
160+ assert . strictEqual ( source . includes ( 'Access granted!' ) , true )
161+ } )
158162 } )
159163
160164 describe ( 'setDownloadPath' , function ( ) {
0 commit comments