2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-04-03 18:11:10 +00:00

Build line fix (#11566)

* Fix for RenderBuildLine

* Simple playwright test
This commit is contained in:
Oliver
2026-03-20 08:51:21 +11:00
committed by GitHub
parent 9c993d1c22
commit 7f0610502d
2 changed files with 23 additions and 7 deletions

View File

@@ -36,13 +36,9 @@ export function RenderBuildLine({
}: Readonly<InstanceRenderInterface>): ReactNode { }: Readonly<InstanceRenderInterface>): ReactNode {
return ( return (
<RenderInlineModel <RenderInlineModel
primary={instance.part_detail.full_name} primary={instance.build_reference ?? instance.build}
secondary={instance.quantity} suffix={instance.pk}
suffix={StatusRenderer({ image={instance.part_detail?.thumbnail || instance.part_detail?.image}
status: instance.status_custom_key,
type: ModelType.build
})}
image={instance.part_detail.thumbnail || instance.part_detail.image}
/> />
); );
} }

View File

@@ -4,6 +4,26 @@ import { activateTableView, loadTab } from './helpers.js';
import { doCachedLogin } from './login.js'; import { doCachedLogin } from './login.js';
import { setPluginState } from './settings.js'; import { setPluginState } from './settings.js';
// Test for the label editing interface
test('Printing - Label Editing', async ({ browser }) => {
const page = await doCachedLogin(browser, {
user: adminuser,
url: 'settings/admin/labels'
});
// Open a particular label template for editing
await page.getByRole('cell', { name: 'Sample build line label' }).click();
// Await expected entries
await page.getByRole('tab', { name: 'PDF Preview' }).waitFor();
await page.getByText('This is an example template').waitFor();
await page
.locator('div')
.filter({ hasText: /^BO\d+$/ })
.first()
.waitFor();
});
/* /*
* Test for label printing. * Test for label printing.
* Select a number of stock items from the table, * Select a number of stock items from the table,