feat(FN-1930): merge fusion/fn-1930
This commit is contained in:
@@ -277,18 +277,6 @@ export function MobileNavBar({
|
||||
<span className="mobile-nav-tab-label">Roadmaps</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
className={`mobile-nav-tab${view === "insights" ? " mobile-nav-tab--active" : ""}`}
|
||||
data-testid="mobile-nav-tab-insights"
|
||||
role="tab"
|
||||
aria-selected={view === "insights"}
|
||||
onClick={() => onChangeView("insights")}
|
||||
>
|
||||
<Sparkles />
|
||||
<span className="mobile-nav-tab-label">Insights</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
className="mobile-nav-tab"
|
||||
|
||||
@@ -56,7 +56,7 @@ describe("MobileNavBar", () => {
|
||||
mockViewport("mobile");
|
||||
});
|
||||
|
||||
it("renders nine tab buttons (tasks + agents + missions + chat + mailbox + skills + roadmaps + insights + more)", () => {
|
||||
it("renders eight tab buttons (tasks + agents + missions + chat + mailbox + skills + roadmaps + more)", () => {
|
||||
render(<MobileNavBar {...createDefaultProps()} />);
|
||||
|
||||
expect(screen.getByTestId("mobile-nav-tab-tasks")).toBeDefined();
|
||||
@@ -66,7 +66,6 @@ describe("MobileNavBar", () => {
|
||||
expect(screen.getByTestId("mobile-nav-tab-mailbox")).toBeDefined();
|
||||
expect(screen.getByTestId("mobile-nav-tab-skills")).toBeDefined();
|
||||
expect(screen.getByTestId("mobile-nav-tab-roadmaps")).toBeDefined();
|
||||
expect(screen.getByTestId("mobile-nav-tab-insights")).toBeDefined();
|
||||
expect(screen.getByTestId("mobile-nav-tab-more")).toBeDefined();
|
||||
});
|
||||
|
||||
@@ -170,26 +169,6 @@ describe("MobileNavBar", () => {
|
||||
expect(screen.getByTestId("mobile-nav-tab-skills").className).not.toContain("mobile-nav-tab--active");
|
||||
});
|
||||
|
||||
// ── Insights tab ──────────────────────────────────────────────────
|
||||
|
||||
it("insights tab calls onChangeView with 'insights'", () => {
|
||||
const props = createDefaultProps();
|
||||
render(<MobileNavBar {...props} view="board" />);
|
||||
|
||||
fireEvent.click(screen.getByTestId("mobile-nav-tab-insights"));
|
||||
expect(props.onChangeView).toHaveBeenCalledWith("insights");
|
||||
});
|
||||
|
||||
it("insights tab is active when view is 'insights'", () => {
|
||||
render(<MobileNavBar {...createDefaultProps()} view="insights" />);
|
||||
expect(screen.getByTestId("mobile-nav-tab-insights").className).toContain("mobile-nav-tab--active");
|
||||
});
|
||||
|
||||
it("insights tab is not active when view is 'board'", () => {
|
||||
render(<MobileNavBar {...createDefaultProps()} view="board" />);
|
||||
expect(screen.getByTestId("mobile-nav-tab-insights").className).not.toContain("mobile-nav-tab--active");
|
||||
});
|
||||
|
||||
it("opens and toggles the more sheet", () => {
|
||||
const props = createDefaultProps();
|
||||
const { container } = render(<MobileNavBar {...props} />);
|
||||
|
||||
Reference in New Issue
Block a user