2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 11:40:58 +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

@ -31,10 +31,14 @@ export const doQuickLogin = async (
password = password ?? user.password;
url = url ?? baseUrl;
// await page.goto(logoutUrl);
await page.goto(`${url}/login/?login=${username}&password=${password}`);
await page.waitForURL('**/platform/home');
await page
.getByRole('heading', { name: 'Welcome to your Dashboard,' })
.waitFor();
};
export const doLogout = async (page) => {
await page.goto(`${baseUrl}/logout/`);
await page.waitForURL('**/platform/login');
};