feat: implement web URL constants and enhance navigation handling

- Introduced a centralized `WEB_URL` constant for managing application routes, improving maintainability and readability across components.
- Updated various components, including login, auth, and main app modules, to utilize the new `WEB_URL` constants for navigation, ensuring consistency in route management.
- Added a new `AppHomeRedirect` component to streamline user redirection based on privileges, enhancing user experience.
- Implemented client-side navigation functions to prevent full page reloads, improving performance and user interaction.
- Added tests for new functionalities, ensuring reliability in navigation and URL handling.

These changes significantly enhance the application's routing structure and navigation efficiency, providing a more cohesive user experience.
This commit is contained in:
shancheas
2026-09-02 11:17:51 +07:00
parent f5c1b7430a
commit b0090bc15f
18 changed files with 345 additions and 24 deletions
+2 -2
View File
@@ -21,8 +21,8 @@ test.describe('login', () => {
await page.getByLabel('Password').fill(E2E_LOGIN.password);
await page.getByRole('button', { name: 'Login' }).click();
await expect(page).toHaveURL(/\/app(\/|$)/);
await expect(page.getByRole('heading', { name: 'Full Page' })).toBeVisible();
await expect(page).toHaveURL(/\/app\/timeline\/index/);
await expect(page.getByPlaceholder('Search activities')).toBeVisible();
});
test('shows an error and stays on login when credentials are rejected', async ({ page }) => {