mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-14 02:55:41 +00:00
[PUI] Edit shortcut (#7870)
* Adds shortcut to edit item on <PageDetail> * Add hooks for shortcut key * Add unit tests for edit shortcut
This commit is contained in:
@ -226,6 +226,15 @@ test('PUI - Pages - Part - Notes', async ({ page }) => {
|
||||
await page.goto(`${baseUrl}/part/69/notes`);
|
||||
|
||||
// Enable editing
|
||||
await page.getByLabel('toggle-notes-editing').waitFor();
|
||||
|
||||
// Use keyboard shortcut to "edit" the part
|
||||
await page.keyboard.press('Control+E');
|
||||
await page.getByLabel('text-field-name').waitFor();
|
||||
await page.getByLabel('text-field-description').waitFor();
|
||||
await page.getByLabel('related-field-category').waitFor();
|
||||
await page.getByRole('button', { name: 'Cancel' }).click();
|
||||
|
||||
await page.getByLabel('toggle-notes-editing').click();
|
||||
|
||||
// Enter some text
|
||||
|
Reference in New Issue
Block a user