Preserve experimental settings with retired flags
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -295,6 +295,38 @@ describe("Inbox toolbar", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("hides workspace grouping when isolated workspaces are disabled", async () => {
|
||||||
|
routerMock.location.pathname = "/inbox/mine";
|
||||||
|
apiMocks.experimentalSettings.mockResolvedValue({ enableIsolatedWorkspaces: false });
|
||||||
|
|
||||||
|
const queryClient = new QueryClient({
|
||||||
|
defaultOptions: { queries: { retry: false, staleTime: 0, gcTime: 0 } },
|
||||||
|
});
|
||||||
|
const root = createRoot(container);
|
||||||
|
|
||||||
|
await act(async () => {
|
||||||
|
root.render(
|
||||||
|
<QueryClientProvider client={queryClient}>
|
||||||
|
<Inbox />
|
||||||
|
</QueryClientProvider>,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
const groupButton = container.querySelector<HTMLButtonElement>('button[title="Group"]');
|
||||||
|
expect(groupButton).not.toBeNull();
|
||||||
|
|
||||||
|
await act(async () => {
|
||||||
|
groupButton?.dispatchEvent(new MouseEvent("click", { bubbles: true }));
|
||||||
|
});
|
||||||
|
|
||||||
|
const groupOptions = Array.from(document.body.querySelectorAll("button")).map((button) => button.textContent);
|
||||||
|
expect(groupOptions).not.toContain("Workspace");
|
||||||
|
|
||||||
|
act(() => {
|
||||||
|
root.unmount();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it("syncs hover with j/k selection on inbox rows", async () => {
|
it("syncs hover with j/k selection on inbox rows", async () => {
|
||||||
routerMock.location.pathname = "/inbox/mine";
|
routerMock.location.pathname = "/inbox/mine";
|
||||||
const issueA = createIssue({ id: "issue-a", identifier: "PAP-1001", title: "First inbox row" });
|
const issueA = createIssue({ id: "issue-a", identifier: "PAP-1001", title: "First inbox row" });
|
||||||
|
|||||||
Reference in New Issue
Block a user