test(ui): update vendor-panel-ui NPC menu header expectation to localized CHI name (Fixes #503)
This commit is contained in:
parent
ef8a7ffff6
commit
792578e566
|
|
@ -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' },
|
||||
|
|
|
|||
Loading…
Reference in New Issue