Elffuss BraidHub

kikocis/continue public

main · 758 BRawPermalink
1import { screen } from "@testing-library/dom";
2import { renderWithProviders } from "../../util/test/render";
3import HistoryPage from "./index";
4
5describe("history Page test", () => {
6 it("History text is existed after render", async () => {
7 await renderWithProviders(<HistoryPage />);
8 expect(screen.getByTestId("history-sessions-note")).toBeInTheDocument();
9 });
10
11 it("History shows the first item in the list", async () => {
12 await renderWithProviders(<HistoryPage />);
13 const sessionElement = await screen.findByText(
14 "Session 1",
15 {},
16 {
17 timeout: 3000, // There is a 2000ms timeout before the first call to refreshSessionMetadata is called
18 },
19 );
20 expect(sessionElement).toBeInTheDocument();
21 });
22});