mirror of
https://github.com/inventree/InvenTree.git
synced 2026-06-06 08:54:24 +00:00
[UI] Can build (#12043)
* Fix for BuildDetail * Update playwright tests * update playwright Ref: https://github.com/microsoft/playwright/issues/40998 * Fix hooks
This commit is contained in:
@@ -331,7 +331,7 @@ export default function BuildDetail() {
|
|||||||
name: 'can_build',
|
name: 'can_build',
|
||||||
unit: build.part_detail?.units,
|
unit: build.part_detail?.units,
|
||||||
label: t`Can Build`,
|
label: t`Can Build`,
|
||||||
hidden: partRequirementsQuery.isFetching
|
hidden: partRequirements?.can_build === undefined
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'progressbar',
|
type: 'progressbar',
|
||||||
@@ -454,12 +454,7 @@ export default function BuildDetail() {
|
|||||||
<DetailsTable fields={br} item={data} />
|
<DetailsTable fields={br} item={data} />
|
||||||
</ItemDetailsGrid>
|
</ItemDetailsGrid>
|
||||||
);
|
);
|
||||||
}, [
|
}, [build, instanceQuery, partRequirements, partRequirementsQuery]);
|
||||||
build,
|
|
||||||
instanceQuery,
|
|
||||||
partRequirements,
|
|
||||||
partRequirementsQuery.isFetching
|
|
||||||
]);
|
|
||||||
|
|
||||||
const buildPanels: PanelType[] = useMemo(() => {
|
const buildPanels: PanelType[] = useMemo(() => {
|
||||||
return [
|
return [
|
||||||
@@ -597,6 +592,7 @@ export default function BuildDetail() {
|
|||||||
build,
|
build,
|
||||||
id,
|
id,
|
||||||
user,
|
user,
|
||||||
|
partRequirements,
|
||||||
buildStatus,
|
buildStatus,
|
||||||
globalSettings,
|
globalSettings,
|
||||||
showChildBuilds,
|
showChildBuilds,
|
||||||
|
|||||||
@@ -45,8 +45,12 @@ test('Build Order - Basic Tests', async ({ browser }) => {
|
|||||||
// Load a particular build order
|
// Load a particular build order
|
||||||
await page.getByRole('cell', { name: 'BO0017' }).click();
|
await page.getByRole('cell', { name: 'BO0017' }).click();
|
||||||
|
|
||||||
|
await loadTab(page, 'Build Details');
|
||||||
|
|
||||||
// This build order should be "on hold"
|
// This build order should be "on hold"
|
||||||
await page.getByText('On Hold').first().waitFor();
|
await page.getByText('On Hold').first().waitFor();
|
||||||
|
await page.getByText('Can Build').first().waitFor();
|
||||||
|
await page.getByText('Completed Outputs').first().waitFor();
|
||||||
|
|
||||||
// Edit the build order (via keyboard shortcut)
|
// Edit the build order (via keyboard shortcut)
|
||||||
await page.keyboard.press('Control+E');
|
await page.keyboard.press('Control+E');
|
||||||
|
|||||||
Reference in New Issue
Block a user