Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nimam-bentley committed Jan 24, 2025
1 parent dade065 commit c72c000
Showing 1 changed file with 15 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import {
ManageVersionsTabs,
} from "./ManageVersions";

jest.setTimeout(10000);

const renderComponent = (initialProps?: Partial<ManageVersionsProps>) => {
const props: ManageVersionsProps = {
accessToken: "test_token",
Expand Down Expand Up @@ -290,25 +292,19 @@ describe("ManageVersions", () => {
within(await screen.findByRole("rowgroup")).getAllByRole("row")[0]
).getAllByRole("cell");

await waitFor(
() =>
expect(
within(versionCells[0]).getByText("test name new")
).toBeInTheDocument(),
{ timeout: 20000 }
);
expect(versionCells.length).toBe(5);

expect(moreButton).toBeInTheDocument();
expect(mockGetVersions).toHaveBeenCalledTimes(2);
expect(mockUpdateVersion).toHaveBeenCalledWith(
MOCKED_IMODEL_ID,
MockedVersion(2).id,
{
name: "test name new",
description: "test description new",
}
);
await waitFor(() => {
expect(versionCells.length).toBe(5);
expect(moreButton).toBeInTheDocument();
expect(mockGetVersions).toHaveBeenCalledTimes(2);
expect(mockUpdateVersion).toHaveBeenCalledWith(
MOCKED_IMODEL_ID,
MockedVersion(2).id,
{
name: "test name new",
description: "test description new",
}
);
});
});
});

Expand Down

0 comments on commit c72c000

Please sign in to comment.