338c190ae8
Enhance the navigation with a modern floating glass design, new Browse and Community dropdown links, and improved theme/blur toggles that now handle multiple instances. Update dropdown components with rounded styling and support for wider widths, refine nav-link active states, and add navigation feature tests.
33 lines
717 B
PHP
33 lines
717 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use App\Enums\UserRole;
|
|
use App\Models\User;
|
|
use Tests\RefreshDatabase;
|
|
use Tests\TestCase;
|
|
|
|
class NavigationTest extends TestCase
|
|
{
|
|
use RefreshDatabase;
|
|
|
|
public function test_home_page_renders_new_nav(): void
|
|
{
|
|
$this->get('/search')
|
|
->assertOk()
|
|
->assertSee('Browse')
|
|
->assertSee('Playlists')
|
|
->assertSeeHtml('id="toogleTheme"');
|
|
}
|
|
|
|
public function test_admin_layout_renders_for_admin(): void
|
|
{
|
|
$admin = User::factory()->create();
|
|
$admin->addRole(UserRole::ADMINISTRATOR);
|
|
|
|
$this->actingAs($admin)
|
|
->get(route('admin.upload.index'))
|
|
->assertOk();
|
|
}
|
|
}
|