diff --git a/src/frontend/src/tables/part/PartTestResultTable.tsx b/src/frontend/src/tables/part/PartTestResultTable.tsx index f4c9cc5d29..a0f1d08f9c 100644 --- a/src/frontend/src/tables/part/PartTestResultTable.tsx +++ b/src/frontend/src/tables/part/PartTestResultTable.tsx @@ -26,7 +26,7 @@ import { formatDate } from '../../defaults/formatters'; import { useTestResultFields } from '../../forms/StockForms'; import { useCreateApiFormModal } from '../../hooks/UseForm'; import { useTable } from '../../hooks/UseTable'; -import { LocationColumn } from '../ColumnRenderers'; +import { LocationColumn, PartColumn } from '../ColumnRenderers'; import { BatchFilter, HasBatchCodeFilter, @@ -243,6 +243,14 @@ export default function PartTestResultTable({ const tableColumns: TableColumn[] = useMemo(() => { // Fixed columns const columns: TableColumn[] = [ + PartColumn({ + title: t`Part`, + part: 'part_detail', + full_name: true, + ordering: 'part', + sortable: true, + switchable: true + }), { accessor: 'stock', title: t`Stock Item`, @@ -354,6 +362,7 @@ export default function PartTestResultTable({ part_detail: true, location_detail: true, tests: true, + part: partId, build: buildId }, enableSelection: true, diff --git a/src/frontend/tests/pages/pui_part.spec.ts b/src/frontend/tests/pages/pui_part.spec.ts index 1691bd6630..df2b87401f 100644 --- a/src/frontend/tests/pages/pui_part.spec.ts +++ b/src/frontend/tests/pages/pui_part.spec.ts @@ -581,6 +581,15 @@ test('Parts - Parameter Filtering', async ({ browser }) => { await page.getByText(/\/ 42\d/).waitFor(); }); +test('Parts - Test Results', async ({ browser }) => { + const page = await doCachedLogin(browser, { url: '/part/74/test_results' }); + + await page.waitForTimeout(2500); + + await page.getByText(/1 - \d+ \/ 1\d\d/).waitFor(); + await page.getByText('Blue Paint Applied').waitFor(); +}); + test('Parts - Notes', async ({ browser }) => { const page = await doCachedLogin(browser, { url: 'part/69/notes' });