import { AppTestProviders } from "$/test/providers"; import { render, screen } from "@solidjs/testing-library"; import { describe, expect, it } from "vitest"; import { SessionEmptyState, SessionSpotlight } from "../Session"; describe("SessionEmptyState", () => { it("renders empty state copy", () => { render(() => ); expect(screen.getByText("No account connected yet.")).toBeInTheDocument(); expect(screen.getByText("Connect your Bluesky account to start exploring.")).toBeInTheDocument(); }); }); describe("SessionSpotlight", () => { it("renders 'Your account' label", () => { render(() => ( )); expect(screen.getByText("Your account")).toBeInTheDocument(); }); it("shows Ready status when no session and not bootstrapping", () => { render(() => ( )); expect(screen.getByText("Ready")).toBeInTheDocument(); }); it("shows expired account state when reauth is needed", () => { const account = { active: false, did: "did:plc:alice", handle: "alice.test", pdsUrl: "https://pds.example.com" }; render(() => ( )); expect(screen.getByText("Expired")).toBeInTheDocument(); expect(screen.getByText("alice.test")).toBeInTheDocument(); expect(screen.getByText("Stored account")).toBeInTheDocument(); }); it("shows Reconnecting status when bootstrapping", () => { render(() => ( )); expect(screen.getByText("Reconnecting")).toBeInTheDocument(); }); });