1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-06 12:02:45 +03:00

Updated tests to use ssddanbrown/asserthtml package

Closes #3519
This commit is contained in:
Dan Brown
2022-07-23 15:10:18 +01:00
parent cf73e5f2c6
commit 72c8b138e1
48 changed files with 869 additions and 1014 deletions

View File

@@ -61,7 +61,7 @@ class SocialAuthTest extends TestCase
// Test login routes
$resp = $this->get('/login');
$resp->assertElementExists('a#social-login-google[href$="/login/service/google"]');
$this->withHtml($resp)->assertElementExists('a#social-login-google[href$="/login/service/google"]');
$resp = $this->followingRedirects()->get('/login/service/google');
$resp->assertSee('login-form');
@@ -71,7 +71,7 @@ class SocialAuthTest extends TestCase
$resp->assertSee(trans('errors.social_account_not_used', ['socialAccount' => 'Google']));
$resp = $this->get('/login');
$resp->assertElementExists('a#social-login-github[href$="/login/service/github"]');
$this->withHtml($resp)->assertElementExists('a#social-login-github[href$="/login/service/github"]');
$resp = $this->followingRedirects()->get('/login/service/github');
$resp->assertSee('login-form');
@@ -101,7 +101,7 @@ class SocialAuthTest extends TestCase
]);
$resp = $this->actingAs($editor)->get($editor->getEditUrl());
$resp->assertElementContains('form[action$="/login/service/github/detach"]', 'Disconnect Account');
$this->withHtml($resp)->assertElementContains('form[action$="/login/service/github/detach"]', 'Disconnect Account');
$resp = $this->post('/login/service/github/detach');
$resp->assertRedirect($editor->getEditUrl());