import * as React from "react";
import FieldsDivider from "@ax/components/Fields/FieldsDivider";
import { ThemeProvider } from "styled-components";
import { parseTheme } from "@ax/helpers";
import globalTheme from "@ax/themes/theme.json";
import { render, screen, cleanup } from "@testing-library/react";

afterEach(cleanup);

const content = {
	title: "Titulo",
	text: "Contenido",
};

describe("FieldsDivider component rendering", () => {
	test("should render the component", () => {
		render(
			<ThemeProvider theme={parseTheme(globalTheme)}>
				<FieldsDivider data={content} />
			</ThemeProvider>,
		);
		expect(screen.getAllByText("Contenido")).toBeTruthy();
	});
});
