mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
Fixing UI tests
This commit is contained in:
parent
51339f5ef1
commit
01e22fd5ab
3 changed files with 5 additions and 5 deletions
|
|
@ -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();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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" } });
|
||||
|
|
|
|||
|
|
@ -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", () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue