artisan('db:seed'); }); it('shows the user management widgets to an admin', function () { browserLogin(); visit('/') ->assertNoJavaScriptErrors() ->assertSee('Dashboard') ->assertSee('Total Users') ->assertSee('New Users') ->assertSee('Registration History') ->assertSee('Latest Registrations'); }); it('hides the user management widgets from a role without the permission', function () { browserLogin(UserFactory::user()->create(['password' => 'password'])); visit('/') ->assertSee('Dashboard') ->assertDontSee('Total Users') ->assertDontSee('Registration History'); });