mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-07-01 20:50:23 +00:00
33 lines
874 B
PHP
33 lines
874 B
PHP
<?php
|
|
|
|
use App\Models\City;
|
|
use App\Models\Country;
|
|
|
|
beforeEach(function () {
|
|
$country = Country::factory()->create(['code' => 'de']);
|
|
City::factory()->create(['country_id' => $country->id]);
|
|
});
|
|
|
|
it('renders the sidebar with the user profile reachable on mobile viewport', function () {
|
|
actingAsUser(['name' => 'Sidebar Tester']);
|
|
|
|
$page = visit('/de/dashboard');
|
|
|
|
$page->resize(390, 844)
|
|
->click('[data-test="sidebar-open"]')
|
|
->assertSee('Dashboard')
|
|
->assertSee('Repository')
|
|
->assertSee('Sidebar Tester');
|
|
});
|
|
|
|
it('renders the sidebar with the user profile on desktop viewport', function () {
|
|
actingAsUser(['name' => 'Sidebar Tester']);
|
|
|
|
$page = visit('/de/dashboard');
|
|
|
|
$page->resize(1280, 800)
|
|
->assertSee('Dashboard')
|
|
->assertSee('Repository')
|
|
->assertSee('Sidebar Tester');
|
|
});
|