]> BookStack Code Mirror - bookstack/commitdiff
Updated test to ensure autofocus is set on TOTP input
authorDan Brown <redacted>
Mon, 22 Nov 2021 13:28:46 +0000 (13:28 +0000)
committerDan Brown <redacted>
Mon, 22 Nov 2021 13:28:46 +0000 (13:28 +0000)
tests/Auth/MfaVerificationTest.php

index 49ca6663d79c07870d0136440e2998365f755d25..9a6106243241d00e8cfd9c95b493ae1a62a49d9d 100644 (file)
@@ -23,7 +23,7 @@ class MfaVerificationTest extends TestCase
         $resp = $this->get('/mfa/verify');
         $resp->assertSee('Verify Access');
         $resp->assertSee('Enter the code, generated using your mobile app, below:');
-        $resp->assertElementExists('form[action$="/mfa/totp/verify"] input[name="code"]');
+        $resp->assertElementExists('form[action$="/mfa/totp/verify"] input[name="code"][autofocus]');
 
         $google2fa = new Google2FA();
         $resp = $this->post('/mfa/totp/verify', [