Refine issue workflow surfaces and live updates

This commit is contained in:
dotta 2026-04-09 10:26:17 -05:00
parent b4a58ba8a6
commit 03dff1a29a
48 changed files with 2800 additions and 1163 deletions

View file

@ -351,4 +351,51 @@ describe("IssueDocumentsSection", () => {
});
queryClient.clear();
});
it("wraps the documents header actions so mobile layouts do not overflow", async () => {
const issue = createIssue();
const root = createRoot(container);
const queryClient = new QueryClient({
defaultOptions: {
queries: {
retry: false,
},
mutations: {
retry: false,
},
},
});
mockIssuesApi.listDocuments.mockResolvedValue([createIssueDocument()]);
await act(async () => {
root.render(
<QueryClientProvider client={queryClient}>
<IssueDocumentsSection
issue={issue}
canDeleteDocuments={false}
extraActions={(
<>
<button type="button">Upload</button>
<button type="button">Sub-issue</button>
</>
)}
/>
</QueryClientProvider>,
);
});
await flush();
await flush();
const heading = container.querySelector("h3");
expect(heading).toBeTruthy();
expect(heading?.parentElement?.className).toContain("flex-wrap");
expect(heading?.nextElementSibling?.className).toContain("flex-wrap");
await act(async () => {
root.unmount();
});
queryClient.clear();
});
});