2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 11:05:41 +00:00

[PUI] Error pages (#7554)

* Add <PermissionDenied /> page

* Check permissions for admin center

* Wrap <PartDetail> page in an error handler

- Display client or server errors

* Add error handlers to other detail pages

* Refactor error pages

* Add playwright tests

* Refactor component locations

* Get test to work
This commit is contained in:
Oliver
2024-07-04 00:34:52 +10:00
committed by GitHub
parent 0c293fa896
commit b15eb35273
31 changed files with 591 additions and 355 deletions

View File

@ -224,3 +224,13 @@ test('PUI - Pages - Part - Notes', async ({ page }) => {
// Check that the original notes are still present
await page.getByText('This is some data').waitFor();
});
test('PUI - Pages - Part - 404', async ({ page }) => {
await doQuickLogin(page);
await page.goto(`${baseUrl}/part/99999/`);
await page.getByText('Page Not Found', { exact: true }).waitFor();
// Clear out any console error messages
await page.evaluate(() => console.clear());
});