feat: 세력일람에 공개 장수 기본정보 hover 추가

장수일람 행을 공용 컴포넌트로 분리하고 세력일람 장수명 hover와 keyboard focus에서 공개 DTO 한 행만 표시한다. 국가 기밀 endpoint를 호출하지 않는 경계와 desktop/mobile Chromium geometry를 회귀 테스트로 고정한다.
This commit is contained in:
2026-08-19 14:34:03 +00:00
parent 11e5e8d7c5
commit c4f70d0240
6 changed files with 454 additions and 165 deletions
+18 -1
View File
@@ -250,7 +250,7 @@ describe('legacy global nation/general directories', () => {
await expect(adminWithoutGeneral.world.getNationDirectory()).rejects.toMatchObject({ code: 'NOT_FOUND' });
});
it('keeps the same read-only result for wandering, ordinary, chief, and possessed actors', async () => {
it('keeps hover-safe public rows identical for wandering, ordinary, chief, and possessed actors', async () => {
const viewers = [
actor({ nationId: 0, officerLevel: 0 }),
actor({ nationId: 1, officerLevel: 1 }),
@@ -270,6 +270,23 @@ describe('legacy global nation/general directories', () => {
})
);
expect(results.slice(1)).toEqual([results[0], results[0], results[0]]);
for (const result of results) {
const serializedGeneralRows = JSON.stringify(result.generals);
for (const privateField of [
'userId',
'meta',
'penalty',
'gold',
'rice',
'crew',
'train',
'atmos',
'turnTime',
'lastTurn',
]) {
expect(serializedGeneralRows).not.toContain(`"${privateField}"`);
}
}
});
it('preserves power/dedication order, synthesizes neutral, and applies target-general permission penalties', async () => {