mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-17 19:20:39 +09:00
Refine issue workflow surfaces and live updates
This commit is contained in:
parent
b4a58ba8a6
commit
03dff1a29a
48 changed files with 2800 additions and 1163 deletions
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue