From 6162e5658339356bea33b7489cc7b9483e733990 Mon Sep 17 00:00:00 2001 From: hided62 Date: Sun, 30 Aug 2026 17:22:19 +0000 Subject: [PATCH] =?UTF-8?q?fix(game-ui):=20=EB=A1=9C=EB=B9=84=20=EC=83=88?= =?UTF-8?q?=20=ED=83=AD=20=EC=9D=B4=EB=8F=99=EC=9D=84=20=EC=A7=80=EC=9B=90?= =?UTF-8?q?=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/game-frontend/e2e/mainNavigation.spec.ts | 20 ++++++++++++++----- .../src/components/main/GatewayLobbyLink.vue | 16 +++++++++++++++ .../components/main/MainMobileBottomBar.vue | 8 +++----- .../src/components/main/MainTurnControls.vue | 9 ++++----- app/game-frontend/src/views/MainView.vue | 7 ------- 5 files changed, 38 insertions(+), 22 deletions(-) create mode 100644 app/game-frontend/src/components/main/GatewayLobbyLink.vue diff --git a/app/game-frontend/e2e/mainNavigation.spec.ts b/app/game-frontend/e2e/mainNavigation.spec.ts index 6fdbc52d..2c947d83 100644 --- a/app/game-frontend/e2e/mainNavigation.spec.ts +++ b/app/game-frontend/e2e/mainNavigation.spec.ts @@ -4248,7 +4248,7 @@ test('all main Lumen button families share the rounded pressed geometry', async page.locator('.main-turn-controls').getByRole('button', { name: '갱 신' }), { radius: '5.25px 0px 0px 5.25px' }, ], - ['로비로', page.locator('.main-turn-controls').getByRole('button', { name: '로비로' })], + ['로비로', page.locator('.main-turn-controls').getByRole('link', { name: '로비로' })], ]; const measure = (control: Locator) => @@ -4531,7 +4531,7 @@ test('mobile main Lumen button families keep the same state geometry without ove page.locator('[data-main-target="commands"] .bottom-actions').getByRole('button', { name: '펼치기' }), page.locator('.layout-mobile .main-turn-controls').getByRole('button', { name: /자동 갱신/u }), page.locator('.layout-mobile .main-turn-controls').getByRole('button', { name: '갱 신' }), - page.locator('.layout-mobile .main-turn-controls').getByRole('button', { name: '로비로' }), + page.locator('.layout-mobile .main-turn-controls').getByRole('link', { name: '로비로' }), ]; for (const [index, control] of controls.entries()) { await expect(control).toBeVisible(); @@ -4571,7 +4571,7 @@ test('mobile main Lumen button families keep the same state geometry without ove await persistArtifact(page, `${basePath.slice(1)}-mobile-main-lumen-button-families`); }); -test('mobile single document refreshes once and preserves tokens on lobby return', async ({ page }) => { +test('mobile single document refreshes once and preserves tokens on lobby return', async ({ page, context }) => { const state: NavigationFixture = { officerLevel: 5, permission: 2, @@ -4677,10 +4677,20 @@ test('mobile single document refreshes once and preserves tokens on lobby return await page.evaluate(() => { localStorage.setItem('sammo-session-token', 'session_navigation'); }); - await page.route('**/gateway/', async (route) => { + await context.route('**/gateway/', async (route) => { await route.fulfill({ status: 200, contentType: 'text/html', body: 'gateway' }); }); - await Promise.all([page.waitForURL('**/gateway/'), page.getByRole('button', { name: '로비로' }).click()]); + const lobbyLink = page.locator('.main-turn-controls__lobby'); + await expect(lobbyLink).toHaveAttribute('href', /\/gateway\/$/); + const sourceUrl = page.url(); + const popupPromise = context.waitForEvent('page'); + await lobbyLink.click({ button: 'middle' }); + const popup = await popupPromise; + await popup.waitForURL('**/gateway/'); + expect(page.url()).toBe(sourceUrl); + await popup.close(); + + await Promise.all([page.waitForURL('**/gateway/'), lobbyLink.click()]); expect( await page.evaluate(() => ({ session: localStorage.getItem('sammo-session-token'), diff --git a/app/game-frontend/src/components/main/GatewayLobbyLink.vue b/app/game-frontend/src/components/main/GatewayLobbyLink.vue new file mode 100644 index 00000000..30c550a1 --- /dev/null +++ b/app/game-frontend/src/components/main/GatewayLobbyLink.vue @@ -0,0 +1,16 @@ + + + diff --git a/app/game-frontend/src/components/main/MainMobileBottomBar.vue b/app/game-frontend/src/components/main/MainMobileBottomBar.vue index 21559738..9683912d 100644 --- a/app/game-frontend/src/components/main/MainMobileBottomBar.vue +++ b/app/game-frontend/src/components/main/MainMobileBottomBar.vue @@ -1,6 +1,7 @@ @@ -34,13 +35,11 @@ const emit = defineEmits<{ {{ realtimeEnabled ? 'ON' : 'OFF' }} - + diff --git a/app/game-frontend/src/views/MainView.vue b/app/game-frontend/src/views/MainView.vue index d95e09eb..e8b5af9f 100644 --- a/app/game-frontend/src/views/MainView.vue +++ b/app/game-frontend/src/views/MainView.vue @@ -208,10 +208,6 @@ const requestManualRefresh = () => { void loadMainData(); }; -const moveLobby = () => { - window.location.replace(gameFrontendRuntimeConfig.gatewayWebUrl); -}; - const moveQuick = (item: QuickNavigationItem) => { document.querySelector(item.selector)?.scrollIntoView({ behavior: 'smooth', block: 'start' }); }; @@ -348,7 +344,6 @@ watch( :refreshing="refreshing" @refresh="requestManualRefresh" @toggle-realtime="dashboard.setRealtimeEnabled(!realtimeEnabled)" - @lobby="moveLobby" /> @@ -524,7 +519,6 @@ watch( :refreshing="refreshing" @refresh="requestManualRefresh" @toggle-realtime="dashboard.setRealtimeEnabled(!realtimeEnabled)" - @lobby="moveLobby" /> @@ -639,7 +633,6 @@ watch( :entries="globalNavigation" @refresh="requestManualRefresh" @toggle-realtime="dashboard.setRealtimeEnabled(!realtimeEnabled)" - @lobby="moveLobby" @quick="moveQuick" @action="handleNavigationAction" />