From 792578e56636294e528b9327616c0ac0f7b8e68b Mon Sep 17 00:00:00 2001 From: troytt <47798984@qq.com> Date: Mon, 28 Sep 2026 07:04:40 +0000 Subject: [PATCH] test(ui): update vendor-panel-ui NPC menu header expectation to localized CHI name (Fixes #503) --- tests/vendor-panel-ui.test.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/vendor-panel-ui.test.ts b/tests/vendor-panel-ui.test.ts index 3f8b906..f5a953d 100644 --- a/tests/vendor-panel-ui.test.ts +++ b/tests/vendor-panel-ui.test.ts @@ -594,8 +594,8 @@ describe('Diablo II 1.13c Vendor / BuySell Panel UI Parity', () => { wp.drawNpcMenu(ctx, font, { boxPiecesImg }) - // 1. Dark translucent background fill at (left + 1, top, width - 2, height - 2) -> (361, 199, 78, 79), NO hover fillRect! - expect(fillRectCalls).toEqual([[361, 199, 78, 79]]) + // 1. Dark translucent background fill at (left + 1, top, width - 2, height - 2) -> (366, 199, 68, 79), NO hover fillRect! + expect(fillRectCalls).toEqual([[366, 199, 68, 79]]) expect(strokeRectCalls).toHaveLength(0) expect(ctx.beginPath).not.toHaveBeenCalled() @@ -603,15 +603,15 @@ describe('Diablo II 1.13c Vendor / BuySell Panel UI Parity', () => { const bpCalls = drawImageCalls.filter(c => c.tag === 'boxPieces') expect(bpCalls.length).toBeGreaterThanOrEqual(12) expect(bpCalls.slice(-4).map(c => c.args)).toEqual([ - [0 * 14, 0, 14, 15, 360, 199 + 12 - 15, 14, 15], - [1 * 14, 0, 14, 15, 360 + 80 - 12, 199 + 12 - 15, 14, 15], - [8 * 14, 0, 14, 15, 360, 199 + 81 + 1 - 15, 14, 15], - [9 * 14, 0, 14, 15, 360 + 80 - 12, 199 + 81 + 1 - 15, 14, 15], + [0 * 14, 0, 14, 15, 365, 199 + 12 - 15, 14, 15], + [1 * 14, 0, 14, 15, 365 + 70 - 12, 199 + 12 - 15, 14, 15], + [8 * 14, 0, 14, 15, 365, 199 + 81 + 1 - 15, 14, 15], + [9 * 14, 0, 14, 15, 365 + 70 - 12, 199 + 81 + 1 - 15, 14, 15], ]) - // 3. Font16 text lines: Gold header ('Charsi'), Blue selected option 0 ('交談'), White unselected options ('交易/修理', '取消') + // 3. Font16 text lines: Gold header ('恰西'), Blue selected option 0 ('交談'), White unselected options ('交易/修理', '取消') expect(fontCalls).toEqual([ - { type: 'drawText', text: 'Charsi', x: 400, y: 220, size: 'font16', color: 'gold' }, + { type: 'drawText', text: '恰西', x: 400, y: 220, size: 'font16', color: 'gold' }, { type: 'drawText', text: '交談', x: 400, y: 235, size: 'font16', color: 'blue' }, { type: 'drawText', text: '交易/修理', x: 400, y: 250, size: 'font16', color: 'white' }, { type: 'drawText', text: '取消', x: 400, y: 265, size: 'font16', color: 'white' },