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:
@@ -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}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user