artisan('db:seed'); $this->setSettings([ 'reg_enabled' => true, // The widget calls out to Google, which a test must never depend on. 'registration.captcha.enabled' => false, 'tos' => true, 'forgot_password' => true, ]); }); /** * Hides the navbar avatar. Injected rather than applied through a helper that * wraps visit(): Pest marks a test as a browser test by finding visit() in the * test itself, so a test whose only visit() lives in a helper never connects * the browser client and fails with "WebSocket client is not connected". */ const HIDE_AVATAR = "document.head.insertAdjacentHTML('beforeend', '')"; it('matches the login page', function () { $page = visit('/login')->assertSee('Login'); $page->script(HIDE_AVATAR); $page->assertScreenshotMatches(); }); it('matches the registration page', function () { $page = visit('/register')->assertSee('Register'); $page->script(HIDE_AVATAR); $page->assertScreenshotMatches(); }); it('matches the forgot password page', function () { $page = visit('/password/reset')->assertSee('Forgot Your Password?'); $page->script(HIDE_AVATAR); $page->assertScreenshotMatches(); }); it('matches the roles index', function () { visualLogin(); $page = visit('/roles')->assertSee('Add Role'); $page->script(HIDE_AVATAR); $page->assertScreenshotMatches(); }); it('matches the permission matrix', function () { visualLogin(); $page = visit('/permissions')->assertSee('Save Permissions'); $page->script(HIDE_AVATAR); $page->assertScreenshotMatches(); }); it('matches the general settings page', function () { visualLogin(); $page = visit('/settings')->assertSee('General Settings'); $page->script(HIDE_AVATAR); $page->assertScreenshotMatches(); }); it('matches the authentication settings page', function () { visualLogin(); $page = visit('/settings/auth')->assertSee('Authentication Throttling'); $page->script(HIDE_AVATAR); $page->assertScreenshotMatches(); }); it('matches the notification settings page', function () { visualLogin(); $page = visit('/settings/notifications')->assertSee('Sign-Up Notification'); $page->script(HIDE_AVATAR); $page->assertScreenshotMatches(); });