Skip to content

Commit

Permalink
Add empty context menu (#8519)
Browse files Browse the repository at this point in the history
* Add empty context menu

- For tables without "row actions"
- Show an "empty" menu
- For UX consistency across all tables

* Fix for playwright tests

- Recent changes to the demo dataset...

* Fix typo
  • Loading branch information
SchrodingersGat authored Nov 19, 2024
1 parent c5f529f commit db70597
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/docs/develop/react-frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ npx playwright show-report path/to/report

### No Tests Found

If there is any problem in the testing launch sequence, the playwright UI will display the message "No Tests". In this case, an error has occured, likely launching the InvenTree server process (which runs in the background).
If there is any problem in the testing launch sequence, the playwright UI will display the message "No Tests". In this case, an error has occurred, likely launching the InvenTree server process (which runs in the background).

To debug this situation, and determine what error needs to be resolved, run the following command:

Expand Down
2 changes: 2 additions & 0 deletions src/frontend/src/tables/InvenTreeTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,8 @@ export function InvenTreeTable<T extends Record<string, any>>({
disabled: action.disabled
}));
return showContextMenu(items)(event);
} else {
return showContextMenu([])(event);
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/frontend/tests/pages/pui_part.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ test('Parts - Allocations', async ({ page }) => {

// Check that the overall allocations are displayed correctly
await page.getByText('11 / 825').waitFor();
await page.getByText('6 / 110').waitFor();
await page.getByText('5 / 109').waitFor();

// Navigate to the "Allocations" tab
await page.getByRole('tab', { name: 'Allocations' }).click();
Expand Down

0 comments on commit db70597

Please sign in to comment.