From 59f0a051d838faeee17df7a95b899f384291b04e Mon Sep 17 00:00:00 2001 From: hided62 Date: Fri, 28 Aug 2026 11:20:16 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=A9=94=EC=9D=B8=20=ED=84=B4=20?= =?UTF-8?q?=EB=B0=98=EB=B3=B5=20=EB=B2=94=EC=9C=84=EB=A5=BC=2012=ED=84=B4?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B3=B5=EC=9B=90=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../e2e/commandArguments.spec.ts | 41 +++++++++++++++++++ .../src/components/main/CommandListPanel.vue | 1 + 2 files changed, 42 insertions(+) diff --git a/app/game-frontend/e2e/commandArguments.spec.ts b/app/game-frontend/e2e/commandArguments.spec.ts index 7f9b025b..9da88f8a 100644 --- a/app/game-frontend/e2e/commandArguments.spec.ts +++ b/app/game-frontend/e2e/commandArguments.spec.ts @@ -946,6 +946,47 @@ const install = async ( return requests; }; +test('offers the Ref repeat range for general turns while keeping the chief range', async ({ page }) => { + await install(page); + await page.setViewportSize({ width: 1200, height: 900 }); + await page.goto('/'); + + const generalEditor = page.locator('[data-command-scope="general"]:visible'); + const generalRepeat = generalEditor.locator('.control-pad > details').filter({ hasText: '반복' }); + await generalRepeat.locator('summary').click(); + await expect(generalRepeat.locator('.menu-items > button')).toHaveText( + Array.from({ length: 12 }, (_, index) => `${index + 1}턴`) + ); + + await page.setViewportSize({ width: 500, height: 900 }); + const mobileGeneralEditor = page.locator('[data-command-scope="general"]:visible'); + const mobileGeneralRepeat = mobileGeneralEditor.locator('.control-pad > details').filter({ hasText: '반복' }); + await mobileGeneralRepeat.locator('summary').click(); + const mobileRepeatItems = mobileGeneralRepeat.locator('.menu-items'); + await expect(mobileRepeatItems).toBeVisible(); + await expect(mobileRepeatItems.locator(':scope > button')).toHaveText( + Array.from({ length: 12 }, (_, index) => `${index + 1}턴`) + ); + const mobileGeometry = await mobileRepeatItems.evaluate((element) => ({ + right: element.getBoundingClientRect().right, + height: element.getBoundingClientRect().height, + viewportWidth: document.documentElement.clientWidth, + overflow: element.scrollWidth - element.clientWidth, + })); + expect(mobileGeometry.right).toBeLessThanOrEqual(mobileGeometry.viewportWidth); + expect(mobileGeometry.height).toBeGreaterThan(0); + expect(mobileGeometry.overflow).toBeLessThanOrEqual(0); + await page.screenshot({ path: test.info().outputPath('general-repeat-12-mobile-500.png'), fullPage: true }); + + await page.goto('/che/chief-center'); + const chiefEditor = page.locator('[data-command-scope="nation"]:visible').first(); + const chiefRepeat = chiefEditor.locator('.control-pad > details').filter({ hasText: '반복' }); + await chiefRepeat.locator('summary').click(); + await expect(chiefRepeat.locator('.menu-items > button')).toHaveText( + Array.from({ length: 6 }, (_, index) => `${index + 1}턴`) + ); +}); + test('renders and accepts every Ref strategy command at mobile width', async ({ page }) => { await install(page); await page.setViewportSize({ width: 500, height: 900 }); diff --git a/app/game-frontend/src/components/main/CommandListPanel.vue b/app/game-frontend/src/components/main/CommandListPanel.vue index d7b30b15..1e9561c7 100644 --- a/app/game-frontend/src/components/main/CommandListPanel.vue +++ b/app/game-frontend/src/components/main/CommandListPanel.vue @@ -153,6 +153,7 @@ onUnmounted(() => { :map-layout="props.mapLayout" :autonomous-until="autonomousUntil" :mobile="props.mobile" + :max-push-turn="12" @reserve-bulk="emit('set-general-turns', $event)" @shift="emit('shift-general-turns', $event)" @repeat="emit('repeat-general-turns', $event)"