- Direction labels now both point right so the arrow reads clearly at badge size: incoming "client ← server" becomes "server → client" (from → to), in MessageDirectionBadge and MessageDirectionFilter (shared by the Protocol and Network views). - The Protocol list's pinned section header now reads "Pinned Messages" (was "Pinned Requests"), matching the "Messages" panel title. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BrihGWcrM9JGRyu41nzZYw
27 lines
842 B
TypeScript
27 lines
842 B
TypeScript
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
import { expect, within } from "storybook/test";
|
|
import { MessageDirectionBadge } from "./MessageDirectionBadge";
|
|
|
|
const meta: Meta<typeof MessageDirectionBadge> = {
|
|
title: "Elements/MessageDirectionBadge",
|
|
component: MessageDirectionBadge,
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof MessageDirectionBadge>;
|
|
|
|
export const Outgoing: Story = {
|
|
args: { direction: "outgoing" },
|
|
play: async ({ canvasElement }) => {
|
|
const canvas = within(canvasElement);
|
|
expect(canvas.getByText("client → server")).toBeInTheDocument();
|
|
},
|
|
};
|
|
|
|
export const Incoming: Story = {
|
|
args: { direction: "incoming" },
|
|
play: async ({ canvasElement }) => {
|
|
const canvas = within(canvasElement);
|
|
expect(canvas.getByText("server → client")).toBeInTheDocument();
|
|
},
|
|
};
|