mirror of
https://github.com/inventree/InvenTree.git
synced 2026-05-06 17:53:44 +00:00
[UI] BOM Editing (#10210)
* Support minimum column width * Adjust DescriptionColumn and StatusColumn * Column refactoring * Refactor PartColumn * Refactor LineItemsProgerssColumn * Tweaks * Ensure "can_build" value is not negative * Render row expansion icon * Add subassembly table for BOM * Add controls for BOM editing * Fix row click context * Improve rendering for BOM sub-rows * Hide BOM actions unless editing * Disable row expansion for now * Revert gitleaks changes * Remove gitleaks tags * Remove dead code * Remove commented code * Adjust playwright tests Co-authored-by: Copilot <copilot@github.com> * Update docs Co-authored-by: Copilot <copilot@github.com> * Further playwright fixes --------- Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -179,10 +179,15 @@ test('Parts - BOM', async ({ browser }) => {
|
||||
// Move the mouse away
|
||||
await page.getByRole('link', { name: 'Bill of Materials' }).hover();
|
||||
|
||||
const cell = await page.getByRole('cell', {
|
||||
name: 'Small plastic enclosure, black',
|
||||
exact: true
|
||||
});
|
||||
// Enable BOM editing
|
||||
await page.getByRole('button', { name: 'action-button-edit-bom' }).click();
|
||||
await page
|
||||
.getByRole('button', { name: 'action-button-finish-editing-' })
|
||||
.waitFor();
|
||||
|
||||
const cell = await page
|
||||
.getByRole('cell', { name: 'Thumbnail 1551ABK' })
|
||||
.first();
|
||||
|
||||
await clickOnRowMenu(cell);
|
||||
|
||||
@@ -202,6 +207,12 @@ test('Parts - BOM', async ({ browser }) => {
|
||||
|
||||
await page.getByRole('button', { name: 'Add Substitute' }).waitFor();
|
||||
await page.getByRole('button', { name: 'Close' }).click();
|
||||
|
||||
// Finish editing the BOM
|
||||
await page
|
||||
.getByRole('button', { name: 'action-button-finish-editing-' })
|
||||
.click();
|
||||
await page.getByRole('button', { name: 'action-button-edit-bom' }).waitFor();
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -211,8 +222,15 @@ test('Parts - BOM', async ({ browser }) => {
|
||||
test('Parts - BOM Validation', async ({ browser }) => {
|
||||
const page = await doCachedLogin(browser, { url: 'part/107/bom' });
|
||||
|
||||
// Enable BOM editing
|
||||
await page.getByRole('button', { name: 'action-button-edit-bom' }).click();
|
||||
await page
|
||||
.getByRole('button', { name: 'action-button-finish-editing-' })
|
||||
.waitFor();
|
||||
|
||||
// Edit line item, to ensure BOM is not valid
|
||||
const cell = await page.getByRole('cell', { name: 'Red paint Red Paint' });
|
||||
const cell = await page.getByRole('cell', { name: 'Thumbnail Red Paint' });
|
||||
|
||||
await clickOnRowMenu(cell);
|
||||
await page.getByRole('menuitem', { name: 'Edit', exact: true }).click();
|
||||
|
||||
@@ -288,6 +306,13 @@ test('Parts - Locking', async ({ browser }) => {
|
||||
const page = await doCachedLogin(browser, { url: 'part/104/bom' });
|
||||
|
||||
await loadTab(page, 'Bill of Materials');
|
||||
|
||||
// Enable BOM editing
|
||||
await page.getByRole('button', { name: 'action-button-edit-bom' }).click();
|
||||
await page
|
||||
.getByRole('button', { name: 'action-button-finish-editing-' })
|
||||
.waitFor();
|
||||
|
||||
await page
|
||||
.getByRole('button', { name: 'action-menu-add-bom-items' })
|
||||
.waitFor();
|
||||
|
||||
Reference in New Issue
Block a user