feat: 예약 오픈 일정을 빌드 전에 공개
초기화 예약의 공개 선택을 operation payload에 저장하고 로비에서 준비 단계별로 표시합니다. RESERVED 인계와 STOPPED 무요청 경계를 테스트합니다.
This commit is contained in:
@@ -734,13 +734,30 @@ describe('admin operation API', () => {
|
||||
sourceMode: 'COMMIT',
|
||||
sourceRef: 'HEAD',
|
||||
scheduledAt: '2099-01-01T00:00:00.000Z',
|
||||
publishSchedule: true,
|
||||
install,
|
||||
});
|
||||
|
||||
expect(harness.createdInputs[0]).toMatchObject({
|
||||
type: 'RESET',
|
||||
scheduledAt: '2099-01-01T00:00:00.000Z',
|
||||
payload: { install },
|
||||
payload: {
|
||||
install,
|
||||
publicAnnouncement: {
|
||||
enabled: true,
|
||||
scenarioId: 1010,
|
||||
scenarioTitle: expect.any(String),
|
||||
scheduledAt: '2099-01-01T00:00:00.000Z',
|
||||
preopenAt: install.preopenAt,
|
||||
openAt: install.openAt,
|
||||
turnTermMinutes: 60,
|
||||
fictionMode: '가상',
|
||||
npcMode: 0,
|
||||
defaultStatTotal: expect.any(Number),
|
||||
otherTextInfo: expect.any(String),
|
||||
autorunUser: null,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
await expect(
|
||||
@@ -755,6 +772,20 @@ describe('admin operation API', () => {
|
||||
code: 'BAD_REQUEST',
|
||||
message: 'preopenAt cannot be earlier than scheduledAt.',
|
||||
});
|
||||
|
||||
await expect(
|
||||
harness.caller.admin.operations.requestReset({
|
||||
profileName: 'che:2',
|
||||
sourceMode: 'COMMIT',
|
||||
sourceRef: 'HEAD',
|
||||
scheduledAt: '2099-01-01T00:00:00.000Z',
|
||||
publishSchedule: true,
|
||||
install: { ...install, preopenAt: undefined },
|
||||
})
|
||||
).rejects.toMatchObject({
|
||||
code: 'BAD_REQUEST',
|
||||
message: '로비 일정 공개에는 초기화 시작, 가오픈 시작과 정식 오픈이 모두 필요합니다.',
|
||||
});
|
||||
});
|
||||
|
||||
it('returns validated profile reset defaults to a scenario-only operator', async () => {
|
||||
|
||||
Reference in New Issue
Block a user