2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-27 01:00:53 +00:00

Build start date (#8915)

* Add 'start_date' to Build model

* Add to serializer

* Add filtering and ordering

* Update BuildOrderTable

- Add new column
- Add new filtering options

* Add sanity check for start_date

* Add 'start_date' field to BuildOrder form

* Update docs

* Bump API version

* Tweak unit testing

* Display 'start_date' on build page

* Refactor UI tests

* Fix for 'date' field in forms

* Add additional unit tests

* Fix helper func

* Remove debug msg
This commit is contained in:
Oliver
2025-01-21 00:37:23 +11:00
committed by GitHub
parent 87ccf52562
commit 7ad49949c8
14 changed files with 169 additions and 45 deletions

View File

@ -87,6 +87,33 @@ test('Build Order - Basic Tests', async ({ page }) => {
.waitFor();
});
test('Build Order - Edit', async ({ page }) => {
await doQuickLogin(page);
await page.goto(`${baseUrl}/manufacturing/build-order/22/`);
// Check for expected text items
await page.getByText('Building for sales order').first().waitFor();
await page.getByText('2024-08-08').waitFor(); // Created date
await page.getByText('2025-01-01').waitFor(); // Start date
await page.getByText('2025-01-22').waitFor(); // Target date
await page.keyboard.press('Control+E');
// Edit start date
await page.getByLabel('date-field-start_date').fill('2026-09-09');
// Submit the form
await page.getByRole('button', { name: 'Submit' }).click();
// Expect error
await page.getByText('Errors exist for one or more form fields').waitFor();
await page.getByText('Target date must be after start date').waitFor();
// Cancel the form
await page.getByRole('button', { name: 'Cancel' }).click();
});
test('Build Order - Build Outputs', async ({ page }) => {
await doQuickLogin(page);