diff --git a/app/game-frontend/e2e/commandArguments.spec.ts b/app/game-frontend/e2e/commandArguments.spec.ts index 9da88f8a..4058bb39 100644 --- a/app/game-frontend/e2e/commandArguments.spec.ts +++ b/app/game-frontend/e2e/commandArguments.spec.ts @@ -2518,10 +2518,13 @@ test('keeps the entered command visible and reports a server validation error', await page.getByRole('button', { name: '1턴 명령 입력', exact: true }).click(); await page.getByTestId('command-picker').getByRole('button', { name: /화계/ }).click(); await page.getByTestId('command-argument-form').locator('select').selectOption('2'); - await page.getByTestId('command-picker').getByRole('button', { name: '입력', exact: true }).click(); + const submit = page.getByTestId('command-picker').getByRole('button', { name: '입력', exact: true }); + await submit.click(); await expect(page.getByRole('alert')).toContainText('대상 도시를 선택할 수 없습니다.'); await expect(page.getByTestId('command-argument-form').locator('select')).toHaveValue('2'); + await expect(submit).toBeEnabled(); + await expect(page.getByTestId('command-picker').getByRole('button', { name: '저장 중', exact: true })).toHaveCount(0); }); test('keeps Ref command briefs and autonomous-action state after a turn mutation', async ({ page, context }) => { diff --git a/app/game-frontend/src/components/chief/ChiefCommandEditor.vue b/app/game-frontend/src/components/chief/ChiefCommandEditor.vue index dcb8b051..ec9e5aaa 100644 --- a/app/game-frontend/src/components/chief/ChiefCommandEditor.vue +++ b/app/game-frontend/src/components/chief/ChiefCommandEditor.vue @@ -9,6 +9,8 @@ import type { ReservedCommandRow, } from '../command/types'; +type ReservationCompletion = (success: boolean) => void; + const props = defineProps<{ officerLevelText: string; name: string | null; @@ -26,10 +28,14 @@ const props = defineProps<{ const commandRows = computed(() => props.rows.map((row) => ({ ...row, action: row.actionCode ?? row.action }))); const emit = defineEmits<{ - (event: 'reserve-bulk', entries: CommandPatternEntry[]): void; + (event: 'reserve-bulk', entries: CommandPatternEntry[], complete?: ReservationCompletion): void; (event: 'shift', amount: number): void; (event: 'repeat', amount: number): void; }>(); + +const reserveBulk = (entries: CommandPatternEntry[], complete?: ReservationCompletion) => { + emit('reserve-bulk', entries, complete); +};