feat(web): wire workspaces settings page to real API (MS21-UI-003) (#574)
All checks were successful
ci/woodpecker/push/web Pipeline was successful

Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #574.
This commit is contained in:
2026-02-28 20:48:24 +00:00
committed by jason.woltje
parent 127bf61fe2
commit 20c9e68e1b
4 changed files with 207 additions and 117 deletions

View File

@@ -3,6 +3,7 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import { render, screen, waitFor } from "@testing-library/react";
import { AuthProvider, useAuth } from "./auth-context";
import type { AuthUser } from "@mosaic/shared";
import { WorkspaceMemberRole } from "@mosaic/shared";
// Mock the API client
vi.mock("../api/client", () => ({
@@ -761,7 +762,7 @@ describe("AuthContext", (): void => {
id: "ws-1",
name: "My Workspace",
ownerId: "user-1",
role: "OWNER",
role: WorkspaceMemberRole.OWNER,
createdAt: "2026-01-01",
},
]);
@@ -795,14 +796,14 @@ describe("AuthContext", (): void => {
id: "ws-abc-123",
name: "My Workspace",
ownerId: "user-1",
role: "OWNER",
role: WorkspaceMemberRole.OWNER,
createdAt: "2026-01-01",
},
{
id: "ws-def-456",
name: "Second Workspace",
ownerId: "other",
role: "MEMBER",
role: WorkspaceMemberRole.MEMBER,
createdAt: "2026-02-01",
},
]);
@@ -892,7 +893,7 @@ describe("AuthContext", (): void => {
id: "ws-1",
name: "My Workspace",
ownerId: "user-1",
role: "OWNER",
role: WorkspaceMemberRole.OWNER,
createdAt: "2026-01-01",
},
]);