artisan('db:seed'); }); it('reaches each area from the sidebar', function () { browserLogin(); visit('/') ->click('Users') ->assertSee('Registration Date') ->assertPathIs('/users'); visit('/roles')->assertSee('Add Role')->assertSee('Roles'); visit('/permissions')->assertSee('Add Permission'); visit('/settings')->assertSee('General Settings'); }); it('opens the profile from the navbar', function () { browserLogin(); visit('/profile') ->assertNoJavaScriptErrors() ->assertSee('My Profile') ->assertSee('User Details') ->assertSee('Login Details'); }); it('slims the header down on a phone', function () { browserLogin(); // The sidebar is off canvas below md, so the navbar drops the wordmark and // the breadcrumbs to leave room for the heading and the controls. Both // elements stay in the DOM and are hidden by CSS, so these assert on // visibility rather than presence. visit('/users')->on()->iPhone15() ->assertSee('Registration Date') ->assertVisible('img[src="/assets/img/logo-no-text.png"]') ->assertMissing('img[src="/assets/img/logo.png"]') ->assertMissing('[aria-label="Breadcrumb"]'); }); it('keeps the wordmark and breadcrumbs on a desktop', function () { browserLogin(); visit('/users')->on()->desktop() ->assertSee('Registration Date') ->assertVisible('img[src="/assets/img/logo.png"]') ->assertMissing('img[src="/assets/img/logo-no-text.png"]') ->assertVisible('[aria-label="Breadcrumb"]'); });