fix: 유산 유니크 경매 후보를 종류별로 정렬

Ref의 명마, 무기, 서적, 도구 순서와 종류 내부 선언 순서를 보존한다. 선택 목록은 종류별 optgroup으로 구분하고 API·Chromium 회귀를 추가한다.
This commit is contained in:
2026-08-20 16:16:43 +00:00
parent ce7807bb4f
commit b33b2f454b
4 changed files with 87 additions and 6 deletions
@@ -81,17 +81,33 @@ const statusFixture = {
resetLevels: { resetSpecialWar: 0, resetTurnTime: 0 },
availableSpecialWar: [{ key: 'che_선봉', name: '선봉', info: '공격에 유리합니다.' }],
availableUnique: [
{
key: 'che_명마_07_백마',
name: '백마(+7)',
rawName: '백마',
info: '기동력을 올려주는 유니크 명마입니다.',
slot: 'horse',
},
{
key: 'che_무기_12_칠성검',
name: '칠성검(+12)',
rawName: '칠성검',
info: '무력을 올려주는 유니크 무기입니다.',
slot: 'weapon',
},
{
key: 'che_서적_07_논어',
name: '논어(+7)',
rawName: '논어',
info: '지력을 올려주는 유니크 서적입니다.',
slot: 'book',
},
{
key: 'che_보물_도기',
name: '도기',
rawName: '도기',
info: '전투를 돕는 유니크 도구입니다.',
slot: 'item',
},
],
availableTargetGenerals: [{ id: 8, name: '조조' }],
@@ -197,7 +213,21 @@ test.describe('inheritance management legacy parity', () => {
await page.setViewportSize({ width: 1280, height: 900 });
await page.goto(gameUrl);
await expect(page.locator('#container')).toBeVisible();
await expect(page.locator('#specific-unique')).toHaveValue('che_무기_12_칠성검');
await expect(page.locator('#specific-unique')).toHaveValue('che_명마_07_백마');
await expect(page.locator('#specific-unique optgroup')).toHaveCount(4);
expect(
await page.locator('#specific-unique optgroup').evaluateAll((groups) =>
groups.map((group) => ({
label: group.getAttribute('label'),
values: [...group.querySelectorAll('option')].map((option) => option.value),
}))
)
).toEqual([
{ label: '명마', values: ['che_명마_07_백마'] },
{ label: '무기', values: ['che_무기_12_칠성검'] },
{ label: '서적', values: ['che_서적_07_논어'] },
{ label: '도구', values: ['che_보물_도기'] },
]);
const desktop = await page.evaluate(() => {
const rect = (selector: string) => {