test: restore game frontend session fixtures

This commit is contained in:
2026-07-31 17:28:34 +00:00
parent ec20da5799
commit 34a88e5c80
10 changed files with 142 additions and 80 deletions
+2 -3
View File
@@ -5,9 +5,7 @@ import { fileURLToPath } from 'node:url';
const repositoryRoot = resolve(dirname(fileURLToPath(import.meta.url)), '../../..');
const imageRoots = [
...(process.env.FRONTEND_PARITY_IMAGE_ROOT
? [resolve(process.env.FRONTEND_PARITY_IMAGE_ROOT, 'game')]
: []),
...(process.env.FRONTEND_PARITY_IMAGE_ROOT ? [resolve(process.env.FRONTEND_PARITY_IMAGE_ROOT, 'game')] : []),
resolve(repositoryRoot, '../image/game'),
resolve(repositoryRoot, '../../image/game'),
];
@@ -140,6 +138,7 @@ const installApiFixture = async (page: Page, state: FixtureState) => {
await page.route('**/che/api/trpc/**', async (route) => {
const operations = operationName(route).split(',');
const results = operations.map((operation) => {
if (operation === 'auth.status') return response({ ok: true });
if (operation === 'lobby.info') {
return response({ myGeneral: { id: state.me.id, name: '테스트 장수' } });
}