mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-02 21:03:34 +03:00
# Description of Changes Supersedes #7144. Redesign the Processor New Pipeline page to use a graph-based interface. Far from perfect at this stage but I'm pretty happy with the interactions on the graph itself. The bar at the top needs some work to make it prettier and more clear what everything is for, but I'd rather get this in and do changes in a follow-up PR because this is big enough on its own and leaves us better than where we were before. <img width="1270" height="598" alt="image" src="https://github.com/user-attachments/assets/fa16f7d0-058d-4929-83a2-3c8e42859970" /> <img width="1511" height="788" alt="image" src="https://github.com/user-attachments/assets/bbeb411f-dbf9-43c9-9b34-28b3a5917e5b" /> <img width="1261" height="754" alt="image" src="https://github.com/user-attachments/assets/380fca1f-eed6-44fe-819d-c10598472583" /> <img width="1256" height="653" alt="image" src="https://github.com/user-attachments/assets/59e9a673-b026-43a9-b7f1-ebaf89236df2" /> <img width="1216" height="726" alt="image" src="https://github.com/user-attachments/assets/b34ae323-6842-44d5-b054-eacf08647ad7" />
38 lines
1.3 KiB
TypeScript
38 lines
1.3 KiB
TypeScript
import { describe, expect, it, vi } from "vitest";
|
|
import { render as baseRender, screen } from "@testing-library/react";
|
|
import { PortalTestProviders } from "@portal/test/TestQueryProvider";
|
|
import { PipelineDefinitionModal } from "@portal/components/pipelines/PipelineDefinitionModal";
|
|
|
|
const render = (ui: Parameters<typeof baseRender>[0]) =>
|
|
baseRender(ui, { wrapper: PortalTestProviders });
|
|
|
|
vi.mock("react-i18next", () => ({
|
|
useTranslation: () => ({ t: (key: string) => key }),
|
|
}));
|
|
|
|
const JSON_BODY = '{\n "name": "Claims"\n}';
|
|
|
|
describe("PipelineDefinitionModal", () => {
|
|
it("renders nothing while closed", () => {
|
|
render(
|
|
<PipelineDefinitionModal
|
|
open={false}
|
|
onClose={vi.fn()}
|
|
json={JSON_BODY}
|
|
/>,
|
|
);
|
|
expect(screen.queryByRole("dialog")).not.toBeInTheDocument();
|
|
});
|
|
|
|
it("opens on the JSON tab", () => {
|
|
render(<PipelineDefinitionModal open onClose={vi.fn()} json={JSON_BODY} />);
|
|
expect(screen.getByRole("dialog")).toBeInTheDocument();
|
|
expect(screen.getByText(/"name": "Claims"/)).toBeInTheDocument();
|
|
});
|
|
|
|
it("shows the definition alone - no tab strip to choose between", () => {
|
|
render(<PipelineDefinitionModal open onClose={vi.fn()} json={JSON_BODY} />);
|
|
expect(screen.queryByRole("tablist")).not.toBeInTheDocument();
|
|
});
|
|
});
|