Circle CI e2e test fix (#16100)

This commit is contained in:
yuneng-jiang
2025-10-30 09:54:46 -07:00
committed by GitHub
parent 6fc33add9a
commit b9850accaa
3 changed files with 7 additions and 17 deletions
@@ -1,8 +1,7 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, waitFor } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import GuardrailSelector from "./GuardrailSelector";
import { render, waitFor } from "@testing-library/react";
import { beforeEach, describe, expect, it, vi } from "vitest";
import * as networking from "../networking";
import GuardrailSelector from "./GuardrailSelector";
vi.mock("../networking");
@@ -48,13 +47,7 @@ describe("GuardrailSelector", () => {
guardrails: mockGuardrails,
});
render(
<GuardrailSelector
accessToken={mockAccessToken}
onChange={mockOnChange}
value={[]}
/>
);
render(<GuardrailSelector accessToken={mockAccessToken} onChange={mockOnChange} value={[]} />);
// Verify API was called with correct token
await waitFor(() => {
@@ -62,4 +55,3 @@ describe("GuardrailSelector", () => {
});
});
});
@@ -1,8 +1,7 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, waitFor } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { beforeEach, describe, expect, it, vi } from "vitest";
import GuardrailTestPlayground from "./GuardrailTestPlayground";
import * as networking from "../networking";
vi.mock("../networking");
@@ -52,7 +51,7 @@ describe("GuardrailTestPlayground", () => {
isLoading={false}
accessToken={mockAccessToken}
onClose={vi.fn()}
/>
/>,
);
// Initially, the empty state should be shown
@@ -72,4 +71,3 @@ describe("GuardrailTestPlayground", () => {
expect(screen.getByText("1 of 1 selected")).toBeInTheDocument();
});
});
@@ -1,5 +1,5 @@
import { render, waitFor } from "@testing-library/react";
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import { describe, expect, it, vi } from "vitest";
import ModelInfoView from "./model_info_view";
vi.mock("../../utils/dataUtils", () => ({