Add pregame lobby with live chat
Players used to get bounced back to the dashboard when a session wasn't full yet. Now they land on a lobby page showing who has joined, and can chat with each other while waiting - messages are broadcast live over the existing Mercure hub, and the session auto-starts (and the lobby notifies everyone) once it fills up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ use App\Game\Entity\SessionSetting;
|
||||
use App\Game\Enum\GameStatus;
|
||||
use App\Game\Enum\SessionStatus;
|
||||
use App\Game\Enum\SessionSettingType;
|
||||
use App\Game\Repository\LobbyMessageRepository;
|
||||
use App\Game\Service\GameDashboardService;
|
||||
use App\Tech\Entity\User;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
@@ -23,6 +24,7 @@ class GameDashboardServiceTest extends TestCase
|
||||
private $entityManager;
|
||||
private $gameRepository;
|
||||
private $sessionRepository;
|
||||
private $lobbyMessageRepository;
|
||||
private $hub;
|
||||
private $service;
|
||||
|
||||
@@ -31,14 +33,15 @@ class GameDashboardServiceTest extends TestCase
|
||||
$this->entityManager = $this->createMock(EntityManagerInterface::class);
|
||||
$this->gameRepository = $this->createMock(GameRepository::class);
|
||||
$this->sessionRepository = $this->createMock(SessionRepository::class);
|
||||
$this->lobbyMessageRepository = $this->createMock(LobbyMessageRepository::class);
|
||||
$this->hub = $this->createMock(HubInterface::class);
|
||||
|
||||
$this->service = new GameDashboardService(
|
||||
$this->gameRepository,
|
||||
$this->sessionRepository,
|
||||
$this->lobbyMessageRepository,
|
||||
$this->entityManager,
|
||||
$this->hub,
|
||||
'http://localhost/topic'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user