2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-02-25 16:17:58 +00:00

Generator updates (#10605)

* Form Field updates:

- Allow spec of leftSection prop
- Allow spec of rightSection prop

* Add ability to auto-fill text input with placeholder value

* Simplify stock form

* Better serial number placeholders

* Update other generator fields

* Add default placeholder to DateInput

* Enhance TextField

* Remove serial_numbers field for non-creation forms

* Update playwright tests

* Adjust playwright tests

* Further playwright adjustments

* Fix project code field for build serializer
This commit is contained in:
Oliver
2025-10-18 17:18:04 +11:00
committed by GitHub
parent a7c4f2adba
commit 72d127219f
16 changed files with 219 additions and 114 deletions

View File

@@ -169,13 +169,15 @@ test('Purchase Orders - General', async ({ browser }) => {
.click();
await page.getByRole('menuitem', { name: 'Edit' }).click();
await page.getByLabel('text-field-title').waitFor();
await page.getByLabel('text-field-line2').waitFor();
await page.getByLabel('text-field-title', { exact: true }).waitFor();
await page.getByLabel('text-field-line2', { exact: true }).waitFor();
// Read the current value of the cell, to ensure we always *change* it!
const value = await page.getByLabel('text-field-line2').inputValue();
const value = await page
.getByLabel('text-field-line2', { exact: true })
.inputValue();
await page
.getByLabel('text-field-line2')
.getByLabel('text-field-line2', { exact: true })
.fill(value == 'old' ? 'new' : 'old');
await page.getByRole('button', { name: 'Submit' }).isEnabled();
@@ -344,9 +346,13 @@ test('Purchase Orders - Receive Items', async ({ browser }) => {
await page.getByLabel('action-button-change-status').click();
await page.getByLabel('action-button-add-note').click();
await page.getByLabel('text-field-batch_code').fill('my-batch-code');
await page.getByLabel('text-field-packaging').fill('bucket');
await page.getByLabel('text-field-note').fill('The quick brown fox');
await page
.getByLabel('text-field-batch_code', { exact: true })
.fill('my-batch-code');
await page.getByLabel('text-field-packaging', { exact: true }).fill('bucket');
await page
.getByLabel('text-field-note', { exact: true })
.fill('The quick brown fox');
await page.getByLabel('choice-field-status').click();
await page.getByRole('option', { name: 'Destroyed' }).click();
@@ -371,7 +377,9 @@ test('Purchase Orders - Duplicate', async ({ browser }) => {
await page.getByLabel('action-menu-order-actions-duplicate').click();
// Ensure a new reference is suggested
await expect(page.getByLabel('text-field-reference')).not.toBeEmpty();
await expect(
page.getByLabel('text-field-reference', { exact: true })
).not.toBeEmpty();
// Submit the duplicate request and ensure it completes
await page.getByRole('button', { name: 'Submit' }).isEnabled();