별도 최고위험 권한으로 실행되는 원자적 취소 작업을 추가한다. 버려진 게임과 장수 기록의 보존·삭제 옵션, 오픈 원금 전액 환급 및 획득 포인트 보전율, 취소 상태와 관리자·과거기록 UI를 함께 반영한다.
27 lines
1002 B
TypeScript
27 lines
1002 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { GATEWAY_PROFILE_STATUSES, gatewayProfileCapabilities } from '../src/gateway/profileStatus.js';
|
|
|
|
describe('gateway profile status capabilities', () => {
|
|
it('keeps PAUSED accessible while stopping only turn execution', () => {
|
|
expect(gatewayProfileCapabilities('PAUSED')).toEqual({
|
|
runtimeExpected: true,
|
|
userAccessible: true,
|
|
turnsRunning: false,
|
|
operatorResumable: true,
|
|
});
|
|
});
|
|
|
|
it('keeps STOPPED inaccessible while allowing an operator restart', () => {
|
|
expect(gatewayProfileCapabilities('STOPPED')).toEqual({
|
|
runtimeExpected: false,
|
|
userAccessible: false,
|
|
turnsRunning: false,
|
|
operatorResumable: true,
|
|
});
|
|
});
|
|
|
|
it('defines capabilities for every persisted status', () => {
|
|
expect(GATEWAY_PROFILE_STATUSES.map((status) => gatewayProfileCapabilities(status))).toHaveLength(8);
|
|
});
|
|
});
|