feat: 명예의 전당에 유산 획득량을 추가
명장 일람과 같은 inherit_earned 기록을 은퇴와 통일 정산에서 Hall에 보존하고 기수별 순위로 표시한다. API, 저장 경로와 실제 Chromium 회귀 검사를 함께 보강한다.
This commit is contained in:
@@ -205,11 +205,11 @@ const buildContext = (options?: {
|
||||
},
|
||||
hallOfFame: {
|
||||
findMany: async (args: { where: { type: string } }) =>
|
||||
args.where.type === 'experience'
|
||||
args.where.type === 'experience' || args.where.type === 'inherit_earned'
|
||||
? [
|
||||
{
|
||||
generalNo: 1,
|
||||
value: 1200,
|
||||
value: args.where.type === 'experience' ? 1200 : 4321,
|
||||
aux: {
|
||||
name: '유비',
|
||||
ownerName: 'private-hall-user-id',
|
||||
@@ -450,4 +450,17 @@ describe('ranking hall of fame', () => {
|
||||
.ranking.getHallOfFame({ season: 3 });
|
||||
expect(redacted.sections[0]?.entries[0]?.ownerName).toBeNull();
|
||||
});
|
||||
|
||||
it('returns the inheritance earned ranking for each completed season', async () => {
|
||||
const result = await appRouter
|
||||
.createCaller(buildContext({ authenticated: false }))
|
||||
.ranking.getHallOfFame({ season: 3 });
|
||||
|
||||
expect(result.sections).toHaveLength(25);
|
||||
expect(result.sections.at(-1)).toMatchObject({
|
||||
title: '유 산 획 득 량',
|
||||
valueType: 'int',
|
||||
entries: [expect.objectContaining({ generalId: 1, value: 4321, printValue: '4,321' })],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user