mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-27 01:00:53 +00:00
Edit BOM substitutes (#9521)
* Edit BOM substitutes * Add playwright tests
This commit is contained in:
@ -80,6 +80,39 @@ test('Parts - Supplier Parts', async ({ browser }) => {
|
||||
await page.getByText('DIG-84670-SJI - R_550R_0805_1%').waitFor();
|
||||
});
|
||||
|
||||
test('Parts - BOM', async ({ browser }) => {
|
||||
const page = await doCachedLogin(browser, { url: 'part/87/bom' });
|
||||
|
||||
await loadTab(page, 'Bill of Materials');
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
const cell = await page.getByRole('cell', {
|
||||
name: 'Small plastic enclosure, black',
|
||||
exact: true
|
||||
});
|
||||
await cell.click({ button: 'right' });
|
||||
|
||||
// Check for expected context menu actions
|
||||
await page.getByRole('button', { name: 'Edit', exact: true }).waitFor();
|
||||
await page.getByRole('button', { name: 'Delete', exact: true }).waitFor();
|
||||
await page
|
||||
.getByRole('button', { name: 'View details', exact: true })
|
||||
.waitFor();
|
||||
|
||||
await page
|
||||
.getByRole('button', { name: 'Edit Substitutes', exact: true })
|
||||
.click();
|
||||
await page.getByText('Edit BOM Substitutes').waitFor();
|
||||
await page.getByText('1551ACLR').first().waitFor();
|
||||
await page.getByText('1551AGY').first().waitFor();
|
||||
|
||||
await page.getByLabel('related-field-part').fill('enclosure');
|
||||
await page.getByText('1591BTBU').click();
|
||||
|
||||
await page.getByRole('button', { name: 'Add Substitute' }).waitFor();
|
||||
await page.getByRole('button', { name: 'Close' }).click();
|
||||
});
|
||||
|
||||
test('Parts - Locking', async ({ browser }) => {
|
||||
const page = await doCachedLogin(browser, { url: 'part/104/bom' });
|
||||
await loadTab(page, 'Bill of Materials');
|
||||
|
Reference in New Issue
Block a user