mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 04:55:44 +00:00
[PUI] form error fix (#7689)
* Make initial data query wait until options query is complete * Fix form error issues - Form fields were being re-constructed * Update playwright tests - check for form error message * Prevent reconstruction of form fields * Hide form elements until OPTIONS request is complete * Fix for <ChoiceField /> - "value" must be stringified! * Handle undefined choice values * Add "batch code" to stock detail page * Fix for initial focus * Allow form field definition to change externally * Force override of fetched data * Update playwright tests * Add backup value * Cleanup initialdataquery * Unit test updates * Test updates * Tweak API Form * Adjust playwright test
This commit is contained in:
@ -195,4 +195,16 @@ test('PUI - Company', async ({ page }) => {
|
||||
await page.getByRole('cell', { name: 'Carla Tunnel' }).waitFor();
|
||||
await page.getByRole('tab', { name: 'Attachments' }).click();
|
||||
await page.getByRole('tab', { name: 'Notes' }).click();
|
||||
|
||||
// Let's edit the company details
|
||||
await page.getByLabel('action-menu-company-actions').click();
|
||||
await page.getByLabel('action-menu-company-actions-edit').click();
|
||||
|
||||
await page.getByLabel('text-field-name').fill('');
|
||||
await page.getByLabel('text-field-website').fill('invalid-website');
|
||||
await page.getByRole('button', { name: 'Submit' }).click();
|
||||
|
||||
await page.getByText('This field may not be blank.').waitFor();
|
||||
await page.getByText('Enter a valid URL.').waitFor();
|
||||
await page.getByRole('button', { name: 'Cancel' }).click();
|
||||
});
|
||||
|
Reference in New Issue
Block a user