34 lines
806 B
PHP
34 lines
806 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Tests\TestCase;
|
|
|
|
class AdminTopNavShouldContainSupportCenterLinkTest extends TestCase
|
|
{
|
|
use RefreshDatabase;
|
|
|
|
protected function loginAsPlatformAdmin(): void
|
|
{
|
|
$this->seed();
|
|
|
|
$this->post('/admin/login', [
|
|
'email' => 'platform.admin@demo.local',
|
|
'password' => 'Platform@123456',
|
|
])->assertRedirect('/admin');
|
|
}
|
|
|
|
public function test_topnav_should_contain_support_tickets_link(): void
|
|
{
|
|
$this->loginAsPlatformAdmin();
|
|
|
|
$res = $this->get('/admin');
|
|
$res->assertOk();
|
|
|
|
$res->assertSee('客服中心', false);
|
|
$res->assertSee('/admin/support-tickets', false);
|
|
$res->assertSee('工单', false);
|
|
}
|
|
}
|