2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 03:30:54 +00:00

Part copy test (#9764)

* Add functionality to copy part test templates when duplicating a part instance

* Bug fixes

* Tweak part duplication fields

* Add simple playwright test

* Updated unit test for part duplication

* Bump API version
This commit is contained in:
Oliver
2025-06-12 12:56:16 +10:00
committed by GitHub
parent c81d0eb628
commit e30c4e7cdd
7 changed files with 129 additions and 36 deletions

View File

@ -507,3 +507,19 @@ test('Parts - Bulk Edit', async ({ browser }) => {
await page.getByRole('button', { name: 'Update' }).click();
await page.getByText('Items Updated').waitFor();
});
test('Parts - Duplicate', async ({ browser }) => {
const page = await doCachedLogin(browser, {
url: 'part/74/details'
});
// Open "duplicate part" dialog
await page.getByLabel('action-menu-part-actions').click();
await page.getByLabel('action-menu-part-actions-duplicate').click();
// Check for expected fields
await page.getByText('Copy Image', { exact: true }).waitFor();
await page.getByText('Copy Notes', { exact: true }).waitFor();
await page.getByText('Copy Parameters', { exact: true }).waitFor();
await page.getByText('Copy Tests', { exact: true }).waitFor();
});