mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-02 03:30:54 +00:00
[UI] Dashboard Update (#9904)
* Prevent clicks when editing dashboard items * Tweak playwright test
This commit is contained in:
@ -55,6 +55,20 @@ export default function DashboardWidget({
|
|||||||
overflowY: 'hidden'
|
overflowY: 'hidden'
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
{/* Overlay to prevent mouse events when editing */}
|
||||||
|
{editing && (
|
||||||
|
<Box
|
||||||
|
style={{
|
||||||
|
position: 'absolute',
|
||||||
|
top: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
left: 0,
|
||||||
|
backgroundColor: 'rgba(255, 255, 255, 0.5)',
|
||||||
|
pointerEvents: 'auto'
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
{item.render()}
|
{item.render()}
|
||||||
</Box>
|
</Box>
|
||||||
{removing && (
|
{removing && (
|
||||||
|
@ -134,7 +134,12 @@ test('Part - Editing', async ({ browser }) => {
|
|||||||
await page.getByText('Enter a valid URL.').waitFor();
|
await page.getByText('Enter a valid URL.').waitFor();
|
||||||
|
|
||||||
// Fill with an empty URL
|
// Fill with an empty URL
|
||||||
|
const description = await page
|
||||||
|
.getByLabel('text-field-description')
|
||||||
|
.inputValue();
|
||||||
|
|
||||||
await page.getByRole('textbox', { name: 'text-field-link' }).fill('');
|
await page.getByRole('textbox', { name: 'text-field-link' }).fill('');
|
||||||
|
await page.getByLabel('text-field-description').fill(`${description}+`);
|
||||||
await page.waitForTimeout(200);
|
await page.waitForTimeout(200);
|
||||||
await page.getByRole('button', { name: 'Submit' }).click();
|
await page.getByRole('button', { name: 'Submit' }).click();
|
||||||
await page.getByText('Item Updated').waitFor();
|
await page.getByText('Item Updated').waitFor();
|
||||||
|
Reference in New Issue
Block a user