행성 Level 1~100 수치표 적용 · 행성 컬러 마스터
This commit is contained in:
@@ -274,4 +274,19 @@ describe('행성 탄생', () => {
|
||||
expect(await codeOf(() => call(fnPlanetCreate, { ...pick(id), colorKey: '#123456' })))
|
||||
.toBe('invalid-argument');
|
||||
});
|
||||
|
||||
it('컬러는 마스터(config/planetColors)가 정한다 — 발주사가 더한 색은 받고 숨긴 색은 받지 않는다(10/3 #6)', async () => {
|
||||
await db().doc('config/planetColors').set({ colors: [
|
||||
{ key: 'gold', hex: '#FFC500', visible: false },
|
||||
{ key: 'mint', hex: '#3EB489', visible: true },
|
||||
] });
|
||||
try {
|
||||
const id = await nebula(10, 1_000);
|
||||
expect(await codeOf(() => call(fnPlanetCreate, pick(id)))).toBe('invalid-argument');
|
||||
await call(fnPlanetCreate, { ...pick(id), colorKey: 'mint' });
|
||||
expect(await fandom(id)).toMatchObject({ stage: 1, colorKey: 'mint', level: 1, levelPop: 0 });
|
||||
} finally {
|
||||
await db().doc('config/planetColors').delete();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user