đã tạo được test case của createUser

This commit is contained in:
2026-04-07 11:22:54 +07:00
parent 9d0a872e91
commit 8a7ffe6212
235 changed files with 30524 additions and 9502 deletions
+53
View File
@@ -0,0 +1,53 @@
<?php
namespace Tests\Browser;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;
class GamePageTest extends DuskTestCase
{
/**
* Trang game hiển thị đúng khi chưa đăng nhập.
*/
public function test_game_page_loads_when_guest(): void
{
$this->browse(function (Browser $browser) {
$browser->visit('/game')
->assertPathIs('/game');
});
}
/**
* Trang chủ (/) redirect về game.
*/
public function test_root_redirects_to_game(): void
{
$this->browse(function (Browser $browser) {
$browser->visit('/')
->assertPathIs('/game');
});
}
/**
* Trang game hiển thị vòng quay may mắn.
*/
public function test_game_page_shows_lucky_wheel(): void
{
$this->browse(function (Browser $browser) {
$browser->visit('/game')
->assertPresent('#wheel, canvas, .wheel, [id*="wheel"], [class*="wheel"]');
});
}
/**
* Popup luật chơi có thể tải được.
*/
public function test_game_rule_endpoint_returns_content(): void
{
$this->browse(function (Browser $browser) {
$browser->visit('/game/rule')
->assertSee('luật');
});
}
}