import { afterEach, describe, expect, it, vi } from "vitest";
import { cleanup, fireEvent, render, screen } from "@testing-library/react";
import { useState } from "react";
import { StateProvider } from "@/components/state-provider";
import { TaskLayout } from "./task-layout";
afterEach(cleanup);
// Every hop between the task page and the phone header is an optional prop, so
// a dropped one is not a type error. This asserts the hop TaskLayout owns: the
// repository label reaches the phone layout. `session-mobile-top-bar-repository`
// covers what the header does with it.
vi.mock("./mobile", () => ({
SessionMobileLayout: function MobileLayout({
repositoryLabel,
}: {
repositoryLabel?: string | null;
}) {
const [draft, setDraft] = useState("");
return (