2
0
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:
Oliver
2025-06-30 12:30:09 +10:00
committed by GitHub
parent 41b0490071
commit 52997d022a
2 changed files with 19 additions and 0 deletions

View File

@ -55,6 +55,20 @@ export default function DashboardWidget({
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()}
</Box>
{removing && (

View File

@ -134,7 +134,12 @@ test('Part - Editing', async ({ browser }) => {
await page.getByText('Enter a valid URL.').waitFor();
// 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.getByLabel('text-field-description').fill(`${description}+`);
await page.waitForTimeout(200);
await page.getByRole('button', { name: 'Submit' }).click();
await page.getByText('Item Updated').waitFor();