mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-21 20:26:29 +00:00
Use ref pattern on PO duplicate (#9100)
* use ref pattern on PO duplicate * use ref patterns on duplicate for other types of orders * revert unintentional change to pre-commit * add playwright tests --------- Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
src/frontend
src
pages
tests
@@ -1,3 +1,4 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from '../baseFixtures.ts';
|
||||
import {
|
||||
clearTableFilters,
|
||||
@@ -321,3 +322,22 @@ test('Purchase Orders - Receive Items', async ({ page }) => {
|
||||
await page.getByRole('cell', { name: 'my-batch-code' }).first().waitFor();
|
||||
await page.getByRole('cell', { name: 'bucket' }).first().waitFor();
|
||||
});
|
||||
|
||||
test('Purchase Orders - Duplicate', async ({ page }) => {
|
||||
await doQuickLogin(page);
|
||||
|
||||
await navigate(page, 'purchasing/purchase-order/13/detail');
|
||||
await page.getByLabel('action-menu-order-actions').click();
|
||||
await page.getByLabel('action-menu-order-actions-duplicate').click();
|
||||
|
||||
// Ensure a new reference is suggested
|
||||
await expect(page.getByLabel('text-field-reference')).not.toBeEmpty();
|
||||
|
||||
// Submit the duplicate request and ensure it completes
|
||||
await page.getByRole('button', { name: 'Submit' }).isEnabled();
|
||||
await page.getByRole('button', { name: 'Submit' }).click();
|
||||
await page.getByRole('tab', { name: 'Order Details' }).waitFor();
|
||||
await page.getByRole('tab', { name: 'Order Details' }).click();
|
||||
|
||||
await page.getByText('Pending').first().waitFor();
|
||||
});
|
||||
|
Reference in New Issue
Block a user