Phase 7: Final cleanup - Remove deprecated booking/appointment code
Deleted deprecated files: - backend/routes/booking.py - frontend/app/admin/appointments/, booking/, appointments/, sum/, audit/ - frontend/app/utils/appointment.ts - frontend/e2e/booking.spec.ts, appointments.spec.ts Updated references: - exchange/page.tsx: Use /api/exchange/slots instead of /api/booking/slots - useRequireAuth.ts: Redirect to /admin/trades and /exchange - profile.tsx, invites.tsx: Update fallback redirect - E2E tests: Update all /audit references to /admin/trades - profile.test.tsx: Update admin redirect test
This commit is contained in:
parent
9e8d0af435
commit
bbd9fae763
16 changed files with 29 additions and 2103 deletions
|
|
@ -75,8 +75,8 @@ test.describe("Profile - Regular User Access", () => {
|
|||
await loginUser(page, REGULAR_USER.email, REGULAR_USER.password);
|
||||
});
|
||||
|
||||
test("can navigate to profile page from counter", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
test("can navigate to profile page from exchange", async ({ page }) => {
|
||||
await page.goto("/exchange");
|
||||
|
||||
// Should see My Profile link
|
||||
await expect(page.getByText("My Profile")).toBeVisible();
|
||||
|
|
@ -86,8 +86,8 @@ test.describe("Profile - Regular User Access", () => {
|
|||
await expect(page).toHaveURL("/profile");
|
||||
});
|
||||
|
||||
test("can navigate to profile page from sum", async ({ page }) => {
|
||||
await page.goto("/sum");
|
||||
test("can navigate to profile page from trades", async ({ page }) => {
|
||||
await page.goto("/trades");
|
||||
|
||||
// Should see My Profile link
|
||||
await expect(page.getByText("My Profile")).toBeVisible();
|
||||
|
|
@ -126,12 +126,12 @@ test.describe("Profile - Regular User Access", () => {
|
|||
await expect(loginEmailInput).toBeDisabled();
|
||||
});
|
||||
|
||||
test("navigation shows Counter, Sum, and My Profile", async ({ page }) => {
|
||||
test("navigation shows Exchange, My Trades, and My Profile", async ({ page }) => {
|
||||
await page.goto("/profile");
|
||||
|
||||
// Should see all nav items (Counter and Sum as links)
|
||||
await expect(page.locator('a[href="/"]')).toBeVisible();
|
||||
await expect(page.locator('a[href="/sum"]')).toBeVisible();
|
||||
// Should see all nav items (Exchange and My Trades as links)
|
||||
await expect(page.locator('a[href="/exchange"]')).toBeVisible();
|
||||
await expect(page.locator('a[href="/trades"]')).toBeVisible();
|
||||
// My Profile is the page title (h1) since we're on this page
|
||||
await expect(page.getByRole("heading", { name: "My Profile" })).toBeVisible();
|
||||
});
|
||||
|
|
@ -314,20 +314,20 @@ test.describe("Profile - Admin User Access", () => {
|
|||
});
|
||||
|
||||
test("admin does not see My Profile link", async ({ page }) => {
|
||||
await page.goto("/audit");
|
||||
await page.goto("/admin/trades");
|
||||
|
||||
// Should be on audit page
|
||||
await expect(page).toHaveURL("/audit");
|
||||
// Should be on admin trades page
|
||||
await expect(page).toHaveURL("/admin/trades");
|
||||
|
||||
// Should NOT see My Profile link
|
||||
await expect(page.locator('a[href="/profile"]')).toHaveCount(0);
|
||||
});
|
||||
|
||||
test("admin cannot access profile page - redirected to audit", async ({ page }) => {
|
||||
test("admin cannot access profile page - redirected to admin trades", async ({ page }) => {
|
||||
await page.goto("/profile");
|
||||
|
||||
// Should be redirected to audit
|
||||
await expect(page).toHaveURL("/audit");
|
||||
// Should be redirected to admin trades
|
||||
await expect(page).toHaveURL("/admin/trades");
|
||||
});
|
||||
|
||||
test("admin API call to profile returns 403", async ({ page, request }) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue