Renamed mata schema to only meta
This commit is contained in:
parent
6b1765652f
commit
159a049f94
3 changed files with 7 additions and 7 deletions
|
|
@ -156,7 +156,7 @@ const ToolResults = ({
|
||||||
)}
|
)}
|
||||||
{structuredResult._meta && (
|
{structuredResult._meta && (
|
||||||
<div className="mb-4">
|
<div className="mb-4">
|
||||||
<h5 className="font-semibold mb-2 text-sm">Meta Schema:</h5>
|
<h5 className="font-semibold mb-2 text-sm">Meta:</h5>
|
||||||
<div className="bg-gray-50 dark:bg-gray-900 p-3 rounded-lg">
|
<div className="bg-gray-50 dark:bg-gray-900 p-3 rounded-lg">
|
||||||
<JsonView data={structuredResult._meta} />
|
<JsonView data={structuredResult._meta} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -529,7 +529,7 @@ const ToolsTab = ({
|
||||||
selectedTool._meta && (
|
selectedTool._meta && (
|
||||||
<div className="bg-gray-50 dark:bg-gray-900 p-3 rounded-lg">
|
<div className="bg-gray-50 dark:bg-gray-900 p-3 rounded-lg">
|
||||||
<div className="flex items-center justify-between mb-2">
|
<div className="flex items-center justify-between mb-2">
|
||||||
<h4 className="text-sm font-semibold">Meta Schema:</h4>
|
<h4 className="text-sm font-semibold">Meta:</h4>
|
||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
|
|
|
||||||
|
|
@ -738,7 +738,7 @@ describe("ToolsTab", () => {
|
||||||
selectedTool: toolWithMeta,
|
selectedTool: toolWithMeta,
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(screen.getByText("Meta Schema:")).toBeInTheDocument();
|
expect(screen.getByText("Meta:")).toBeInTheDocument();
|
||||||
expect(
|
expect(
|
||||||
screen.getByRole("button", { name: /expand/i }),
|
screen.getByRole("button", { name: /expand/i }),
|
||||||
).toBeInTheDocument();
|
).toBeInTheDocument();
|
||||||
|
|
@ -750,8 +750,8 @@ describe("ToolsTab", () => {
|
||||||
selectedTool: toolWithMeta,
|
selectedTool: toolWithMeta,
|
||||||
});
|
});
|
||||||
|
|
||||||
// There might be multiple Expand buttons (Output Schema, Meta Schema). We need the one within Meta Schema section
|
// There might be multiple Expand buttons (Output Schema, Meta). We need the one within Meta section
|
||||||
const metaHeading = screen.getByText("Meta Schema:");
|
const metaHeading = screen.getByText("Meta:");
|
||||||
const metaContainer = metaHeading.closest("div");
|
const metaContainer = metaHeading.closest("div");
|
||||||
expect(metaContainer).toBeTruthy();
|
expect(metaContainer).toBeTruthy();
|
||||||
const toggleButton = within(metaContainer as HTMLElement).getByRole(
|
const toggleButton = within(metaContainer as HTMLElement).getByRole(
|
||||||
|
|
@ -815,7 +815,7 @@ describe("ToolsTab", () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("ToolResults Meta Schema", () => {
|
describe("ToolResults Meta", () => {
|
||||||
it("should display meta information when present in toolResult", () => {
|
it("should display meta information when present in toolResult", () => {
|
||||||
const resultWithMeta = {
|
const resultWithMeta = {
|
||||||
content: [],
|
content: [],
|
||||||
|
|
@ -828,7 +828,7 @@ describe("ToolsTab", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Only ToolResults meta should be present since selectedTool has no _meta
|
// Only ToolResults meta should be present since selectedTool has no _meta
|
||||||
expect(screen.getAllByText("Meta Schema:")).toHaveLength(1);
|
expect(screen.getAllByText("Meta:")).toHaveLength(1);
|
||||||
expect(screen.getByText(/info/i)).toBeInTheDocument();
|
expect(screen.getByText(/info/i)).toBeInTheDocument();
|
||||||
expect(screen.getByText(/version/i)).toBeInTheDocument();
|
expect(screen.getByText(/version/i)).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue