2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-09-13 22:21:37 +00:00

[ui] Enable form auto-fill (#10061)

* Enable form auto-fill

- If a single value is available, pre-fill
- Must be enabled per-field

* Tweak playwright tests for increased reliability

* Fix deps
This commit is contained in:
Oliver
2025-07-23 18:32:04 +10:00
committed by GitHub
parent 89279ef091
commit 73231ce921
5 changed files with 72 additions and 9 deletions

View File

@@ -32,13 +32,12 @@ test('Label Printing', async ({ browser }) => {
// Select label template
await page.getByLabel('related-field-template').click();
await page.getByText('InvenTree Stock Item Label (').click();
await page.waitForTimeout(100);
await page
.getByRole('option', { name: 'InvenTree Stock Item Label' })
.click();
await page.getByLabel('related-field-plugin').click();
await page.getByText('InvenTreeLabel', { exact: true }).click();
await page.getByRole('option', { name: 'InvenTreeLabel provides' }).click();
// Submit the print form (second time should result in success)
await page.getByRole('button', { name: 'Print', exact: true }).isEnabled();
@@ -71,9 +70,7 @@ test('Report Printing', async ({ browser }) => {
// Select template
await page.getByLabel('related-field-template').click();
await page.getByText('InvenTree Purchase Order').click();
await page.waitForTimeout(100);
await page.getByRole('option', { name: 'InvenTree Purchase Order' }).click();
// Submit the print form (should result in success)
await page.getByRole('button', { name: 'Print', exact: true }).isEnabled();