UX: Disable standard allocation for trackable parts (#11811) (#11967)

* UX: Disable standard allocation for trackable parts and add tooltip (#11811)

* Test: Update Playwright tests for disabled trackable allocation

* Fix: Align trackable allocation logic and tests based on review

* Test: Fix incorrect assumption of trackable Red Widget in pui_build.spec.ts

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
This commit is contained in:
Aditya Kumar Mishra
2026-06-08 07:49:32 +10:00
committed by GitHub
co-authored by Matthias Mair
parent 20309146aa
commit c2c8e72f37
2 changed files with 37 additions and 16 deletions
+19 -3
View File
@@ -418,6 +418,18 @@ test('Build Order - Allocation', async ({ browser }) => {
await row.getByText(/150 \/ 150/).waitFor();
// Open the allocation menu for the red widget
const mainRedWidget = await page.getByRole('cell', { name: 'Red Widget' });
const mainRedRow = await getRowFromCell(mainRedWidget);
await mainRedRow.getByLabel(/row-action-menu-/i).click();
await page
.getByRole('menuitem', { name: 'Allocate Stock', exact: true })
.waitFor();
await page.keyboard.press('Escape');
// Expand this row
await cell.click();
await page.getByRole('cell', { name: '2022-4-27', exact: true }).waitFor();
@@ -494,9 +506,13 @@ test('Build Order - Allocation', async ({ browser }) => {
const redRow = await getRowFromCell(redWidget);
await redRow.getByLabel(/row-action-menu-/i).click();
await page
.getByRole('menuitem', { name: 'Allocate Stock', exact: true })
.waitFor();
const allocateStockBtn = page.getByRole('menuitem', {
name: 'Allocate Stock',
exact: true
});
await expect(allocateStockBtn).toBeEnabled();
await page
.getByRole('menuitem', { name: 'Deallocate Stock', exact: true })
.waitFor();