новый дизайн

This commit is contained in:
2026-07-25 18:36:45 +04:00
parent df7f98fe8b
commit c43a73e148
54 changed files with 4234 additions and 1110 deletions
+19 -10
View File
@@ -6,6 +6,7 @@ use App\Models\GameAccountUser;
use App\Services\AzerothCoreAccountService;
use App\Services\InviteCodeService;
use Illuminate\Support\Collection;
use Inertia\Testing\AssertableInertia as Assert;
use Mockery\MockInterface;
use Tests\TestCase;
@@ -64,7 +65,7 @@ class AdminAccountsFeatureTest extends TestCase
$this->mock(InviteCodeService::class, function (MockInterface $mock): void {
$mock->shouldReceive('latest')
->once()
->andReturn(new Collection());
->andReturn(new Collection);
$mock->shouldReceive('stats')
->once()
@@ -74,11 +75,14 @@ class AdminAccountsFeatureTest extends TestCase
$response = $this->actingAs($this->makeUser(3))->get(route('admin.accounts.index'));
$response->assertOk();
$response->assertSee('Stormmage');
$response->assertSee('Аккаунты и персонажи');
$response->assertSee('Управление инвайт-кодами');
$response->assertSee('Игроки · 1');
$response->assertSee('Боты · 1');
$response->assertInertia(fn (Assert $page) => $page
->component('Admin/Accounts', false)
->where('accounts.0.username', 'ADMIN')
->where('accounts.0.characters.0.name', 'Stormmage')
->where('accountTabs.players.count', 1)
->where('accountTabs.bots.count', 1)
->etc()
);
}
public function test_admin_can_open_bots_tab(): void
@@ -104,7 +108,7 @@ class AdminAccountsFeatureTest extends TestCase
'online' => false,
'joined_at' => '14.03.2026 01:00',
'last_login_at' => '14.03.2026 01:30',
'characters' => new Collection(),
'characters' => new Collection,
],
]));
});
@@ -112,7 +116,7 @@ class AdminAccountsFeatureTest extends TestCase
$this->mock(InviteCodeService::class, function (MockInterface $mock): void {
$mock->shouldReceive('latest')
->once()
->andReturn(new Collection());
->andReturn(new Collection);
$mock->shouldReceive('stats')
->once()
@@ -122,8 +126,13 @@ class AdminAccountsFeatureTest extends TestCase
$response = $this->actingAs($this->makeUser(3))->get(route('admin.accounts.index', ['tab' => 'bots']));
$response->assertOk();
$response->assertSee('RNDBOT0007');
$response->assertSee('Боты · 2');
$response->assertInertia(fn (Assert $page) => $page
->component('Admin/Accounts', false)
->where('activeTab', 'bots')
->where('accounts.0.username', 'RNDBOT0007')
->where('accountTabs.bots.count', 2)
->etc()
);
}
public function test_admin_can_update_access_level(): void