Fixing UI tests

This commit is contained in:
yuneng-jiang 2026-01-27 17:19:02 -08:00
parent 51339f5ef1
commit 01e22fd5ab
3 changed files with 5 additions and 5 deletions

View file

@ -62,7 +62,7 @@ describe("DocumentsTable", () => {
render(<DocumentsTable documents={mockDocuments} onRemove={onRemove} />);
expect(screen.getByText(/1000.00 KB/)).toBeInTheDocument();
expect(screen.getByText(/2.00 MB/)).toBeInTheDocument();
expect(screen.getByText(/1.95 MB/)).toBeInTheDocument();
expect(screen.getByText(/500.00 KB/)).toBeInTheDocument();
});

View file

@ -87,7 +87,7 @@ describe("S3VectorsConfig", () => {
render(<S3VectorsConfig {...defaultProps} />);
const bucketInput = screen.getByPlaceholderText("my-vector-bucket");
const bucketInput = screen.getByPlaceholderText("my-vector-bucket (min 3 chars)");
await act(async () => {
fireEvent.change(bucketInput, { target: { value: "test-bucket" } });
@ -150,7 +150,7 @@ describe("S3VectorsConfig", () => {
render(<S3VectorsConfig {...defaultProps} providerParams={existingParams} />);
const indexInput = screen.getByPlaceholderText("my-vector-index");
const indexInput = screen.getByPlaceholderText("my-vector-index (optional, min 3 chars)");
await act(async () => {
fireEvent.change(indexInput, { target: { value: "my-index" } });

View file

@ -183,7 +183,7 @@ describe("VectorStoreTable", () => {
it("should render fallback for missing name", () => {
renderComponent();
const fallbackElements = screen.getAllByText("-");
expect(fallbackElements.length).toBe(3); // One for missing name, one for missing description, one for missing files
expect(fallbackElements.length).toBe(5); // One for missing name, one for missing description, three for missing files (one per store)
});
it("should wrap name in tooltip", () => {
@ -203,7 +203,7 @@ describe("VectorStoreTable", () => {
it("should render fallback for missing description", () => {
renderComponent();
const fallbackElements = screen.getAllByText("-");
expect(fallbackElements.length).toBe(3); // One for missing name, one for missing description, one for missing files
expect(fallbackElements.length).toBe(5); // One for missing name, one for missing description, three for missing files (one per store)
});
it("should wrap description in tooltip", () => {