Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions packages/views/layout/help-launcher.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import React from "react";
import { render, screen } from "@testing-library/react";
import { describe, expect, it, vi } from "vitest";
import { HelpLauncher } from "./help-launcher";

vi.mock("@multica/ui/components/ui/dropdown-menu", () => ({
DropdownMenu: ({ children }: { children: React.ReactNode }) => <>{children}</>,
DropdownMenuTrigger: ({ children, ...props }: React.ComponentProps<"button">) => (
<button type="button" {...props}>
{children}
</button>
),
DropdownMenuContent: ({ children }: { children: React.ReactNode }) => <>{children}</>,
DropdownMenuItem: ({
children,
render,
onClick,
}: {
children: React.ReactNode;
render?: React.ReactElement;
onClick?: () => void;
}) =>
render ? (
React.cloneElement(render, undefined, children)
) : (
<button type="button" onClick={onClick}>
{children}
</button>
),
}));

describe("HelpLauncher", () => {
it("links docs and changelog to the FurtherRef desktop site", () => {
render(<HelpLauncher />);

expect(screen.getByRole("link", { name: /docs/i })).toHaveAttribute(
"href",
"https://multica.furtherref.com/docs",
);
expect(screen.getByRole("link", { name: /change log/i })).toHaveAttribute(
"href",
"https://multica.furtherref.com/changelog",
);
});
});
4 changes: 2 additions & 2 deletions packages/views/layout/help-launcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
} from "@multica/ui/components/ui/dropdown-menu";
import { useModalStore } from "@multica/core/modals";

const DOCS_URL = "https://multica.ai/docs";
const CHANGELOG_URL = "https://multica.ai/changelog";
const DOCS_URL = "https://multica.furtherref.com/docs";
const CHANGELOG_URL = "https://multica.furtherref.com/changelog";

export function HelpLauncher() {
return (
Expand Down
Loading