// SourceList and SourceCard — the getting-started target (#398). No jsdom:
// react-dom/server renders in vitest's node environment, and the markup says
// which card carries the highlight.
import { describe, it, expect, vi } from "vitest";
import { renderToStaticMarkup } from "react-dom/server";
vi.mock("react-i18next", async () => (await import("../../test/i18nMock")).i18nMock());
import SourceList from "./SourceList";
import { SOURCE_CARD_TARGET } from "./SourceCard";
import type { ScannedSource } from "../../shared/types";
const HIGHLIGHT = 'data-onboarding-highlight="true"';
const source = (name: string): ScannedSource => ({
folder_name: name,
folder_path: `/releves/${name}`,
files: [{ filename: "releve.csv", file_path: `/releves/${name}/releve.csv`, size_bytes: 10, modified_at: "" }],
});
const SOURCES = [source("Desjardins"), source("Tangerine"), source("RBC")];
const markup = (onboardingTarget?: boolean, sources: ScannedSource[] = SOURCES) =>
renderToStaticMarkup(
,
);
/** The source cards, in order: each is a button. */
const cards = (html: string) => html.split("