]> BookStack Code Mirror - bookstack/blobdiff - tests/Auth/LoginAutoInitiateTest.php
Perms: Fixed some issues made when adding transactions
[bookstack] / tests / Auth / LoginAutoInitiateTest.php
index 86e1f93e2083ff0215b153eda7f37d26b7b7461a..fcb4431af9c14ff8ecb068acf22527178b020c03 100644 (file)
@@ -25,8 +25,8 @@ class LoginAutoInitiateTest extends TestCase
 
         $req = $this->get('/login');
         $req->assertSeeText('Attempting Login');
-        $req->assertElementExists('form[action$="/oidc/login"][method=POST][id="login-form"] button');
-        $req->assertElementExists('button[form="login-form"]');
+        $this->withHtml($req)->assertElementExists('form[action$="/oidc/login"][method=POST][id="login-form"] button');
+        $this->withHtml($req)->assertElementExists('button[form="login-form"]');
     }
 
     public function test_with_saml2()
@@ -37,8 +37,8 @@ class LoginAutoInitiateTest extends TestCase
 
         $req = $this->get('/login');
         $req->assertSeeText('Attempting Login');
-        $req->assertElementExists('form[action$="/saml2/login"][method=POST][id="login-form"] button');
-        $req->assertElementExists('button[form="login-form"]');
+        $this->withHtml($req)->assertElementExists('form[action$="/saml2/login"][method=POST][id="login-form"] button');
+        $this->withHtml($req)->assertElementExists('button[form="login-form"]');
     }
 
     public function test_it_does_not_run_if_social_provider_is_active()
@@ -70,7 +70,7 @@ class LoginAutoInitiateTest extends TestCase
         config()->set([
             'auth.method' => 'oidc',
         ]);
-        $this->actingAs($this->getEditor());
+        $this->actingAs($this->users->editor());
 
         $req = $this->post('/logout');
         $req->assertRedirect('/login?prevent_auto_init=true');