merge: RESET 자동턴 전체 옵션 보존 통합
This commit is contained in:
@@ -955,7 +955,7 @@ test('loads server metadata defaults into the reset form and submits them', asyn
|
||||
showImgLevel: 1,
|
||||
tournamentTrig: false,
|
||||
joinMode: 'onlyRandom',
|
||||
autorunUser: { limitMinutes: 720, options: ['develop', 'train'] },
|
||||
autorunUser: { limitMinutes: 720, options: ['develop', 'recruit_high', 'chief'] },
|
||||
},
|
||||
};
|
||||
await installFixture(page, state);
|
||||
@@ -966,6 +966,8 @@ test('loads server metadata defaults into the reset form and submits them', asyn
|
||||
await page.getByText('고급 시나리오 옵션').click();
|
||||
await expect(page.getByTestId('reset-defaults-source')).toContainText('서버의 메타');
|
||||
await expect(page.getByTestId('reset-npc-mode')).toHaveValue('1');
|
||||
await expect(page.getByTestId('reset-autorun-recruit-high')).toBeChecked();
|
||||
await expect(page.getByTestId('reset-autorun-chief')).toBeChecked();
|
||||
await page.getByTestId('request-reset').click();
|
||||
|
||||
await expect
|
||||
@@ -978,7 +980,7 @@ test('loads server metadata defaults into the reset form and submits them', asyn
|
||||
expect(request).toContain('"npcMode":1');
|
||||
expect(request).toContain('"joinMode":"onlyRandom"');
|
||||
expect(request).toContain('"limitMinutes":720');
|
||||
expect(request).toContain('"options":["develop","train"]');
|
||||
expect(request).toContain('"options":["develop","recruit_high","chief"]');
|
||||
});
|
||||
|
||||
test('edits server reset defaults through profile metadata settings', async ({ page }, testInfo) => {
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
normalizeProfileResetDefaults,
|
||||
SYSTEM_PROFILE_RESET_DEFAULTS,
|
||||
type ProfileResetDefaults,
|
||||
type ResetAutorunOption,
|
||||
} from '../utils/resetDefaults';
|
||||
import { directTrpc, trpc } from '../utils/trpc';
|
||||
|
||||
@@ -140,8 +141,10 @@ const form = reactive({
|
||||
autorunDevelop: true,
|
||||
autorunWarp: true,
|
||||
autorunRecruit: true,
|
||||
autorunRecruitHigh: true,
|
||||
autorunTrain: true,
|
||||
autorunBattle: true,
|
||||
autorunChief: true,
|
||||
openAt: '',
|
||||
preopenAt: '',
|
||||
scheduledAt: '',
|
||||
@@ -259,8 +262,10 @@ const applyResetDefaults = (defaults: ProfileResetDefaults) => {
|
||||
form.autorunDevelop = autorunOptions.has('develop');
|
||||
form.autorunWarp = autorunOptions.has('warp');
|
||||
form.autorunRecruit = autorunOptions.has('recruit');
|
||||
form.autorunRecruitHigh = autorunOptions.has('recruit_high');
|
||||
form.autorunTrain = autorunOptions.has('train');
|
||||
form.autorunBattle = autorunOptions.has('battle');
|
||||
form.autorunChief = autorunOptions.has('chief');
|
||||
};
|
||||
|
||||
const loadResetDefaults = async () => {
|
||||
@@ -569,13 +574,15 @@ const loadScenarios = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
const selectedAutorunOptions = (): Array<'develop' | 'warp' | 'recruit' | 'train' | 'battle'> => {
|
||||
const options: Array<'develop' | 'warp' | 'recruit' | 'train' | 'battle'> = [];
|
||||
const selectedAutorunOptions = (): ResetAutorunOption[] => {
|
||||
const options: ResetAutorunOption[] = [];
|
||||
if (form.autorunDevelop) options.push('develop');
|
||||
if (form.autorunWarp) options.push('warp');
|
||||
if (form.autorunRecruit) options.push('recruit');
|
||||
if (form.autorunRecruitHigh) options.push('recruit_high');
|
||||
if (form.autorunTrain) options.push('train');
|
||||
if (form.autorunBattle) options.push('battle');
|
||||
if (form.autorunChief) options.push('chief');
|
||||
return options;
|
||||
};
|
||||
|
||||
@@ -1101,8 +1108,24 @@ onBeforeUnmount(() => {
|
||||
<label><input v-model="form.autorunDevelop" type="checkbox" /> 내정</label>
|
||||
<label><input v-model="form.autorunWarp" type="checkbox" /> 이동</label>
|
||||
<label><input v-model="form.autorunRecruit" type="checkbox" /> 징병</label>
|
||||
<label
|
||||
><input
|
||||
v-model="form.autorunRecruitHigh"
|
||||
type="checkbox"
|
||||
data-testid="reset-autorun-recruit-high"
|
||||
/>
|
||||
고급 징병</label
|
||||
>
|
||||
<label><input v-model="form.autorunTrain" type="checkbox" /> 훈련</label>
|
||||
<label><input v-model="form.autorunBattle" type="checkbox" /> 전투</label>
|
||||
<label
|
||||
><input
|
||||
v-model="form.autorunChief"
|
||||
type="checkbox"
|
||||
data-testid="reset-autorun-chief"
|
||||
/>
|
||||
중신</label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
@@ -71,6 +71,8 @@ Gateway 관리자 콘솔은 `/gateway/admin`에서 시작합니다. 공개 로
|
||||
턴 간격, 동기화, 가상 장수, 연장, 가입 방식, 장수 생성 제한, NPC, 이미지,
|
||||
토너먼트와 유저 자동턴 기본값을 저장합니다. 시나리오 초기화 화면은 대상
|
||||
서버를 URL에서 결정한 뒤 이 메타를 별도 권한 검사로 읽어 폼에 적용합니다.
|
||||
유저 자동턴은 내정, 이동, 징병, 고급 징병, 훈련, 전투, 중신의 7개 동작을
|
||||
각각 보존해 RESET payload로 전달합니다.
|
||||
메타가 없거나 유효하지 않으면 기존 시스템 기본값을 사용합니다. 시나리오와
|
||||
예약·가오픈·정식 오픈 시각은 매 실행마다 선택하므로 서버 기본값에 포함하지
|
||||
않습니다.
|
||||
|
||||
Reference in New Issue
Block a user