diff --git a/tests/browser/pad-names.spec.js b/tests/browser/pad-names.spec.js index 1f95701..87f2a27 100644 --- a/tests/browser/pad-names.spec.js +++ b/tests/browser/pad-names.spec.js @@ -61,6 +61,8 @@ test('named board: hovering a pad shows its pin name, not its place in the list' expect(await hover(page, pin1.pos)).toContain('pin ' + pin1.name); expect(await padTableNumbers(page)).toEqual(fp.pads.map((p) => p.name)); + // The first column holds pin names, so its header says so. + expect(await page.locator('#detail-pane .pad-table th').allInnerTexts()).toEqual(['Pin', 'Net', 'Type']); }); test('unnamed board: hovering a pad still shows pad N', async ({ page }) => { @@ -76,6 +78,8 @@ test('unnamed board: hovering a pad still shows pad N', async ({ page }) => { expect(text).not.toContain('pin 4'); expect(await padTableNumbers(page)).toEqual(fp.pads.map((p, i) => String(i + 1))); + // Same header as on a named board, even though the column holds list places. + expect(await page.locator('#detail-pane .pad-table th').allInnerTexts()).toEqual(['Pin', 'Net', 'Type']); }); test('the tooltip shows a pad name as text, not markup', async ({ page }) => { diff --git a/web/app.js b/web/app.js index 1563bbe..2c152ce 100644 --- a/web/app.js +++ b/web/app.js @@ -980,7 +980,7 @@ function renderDetailPane(fpIdx, showPads) { var padTable = document.createElement("table"); padTable.className = "pad-table"; var thead = document.createElement("tr"); - ["#", "Net", "Type"].forEach(function(h) { + ["Pin", "Net", "Type"].forEach(function(h) { var th = document.createElement("th"); th.textContent = h; thead.appendChild(th);