quivr
quivr copied to clipboard
[FRONT - TEST] Add tests to frontend/explore/*
To create a test, follow these steps:
-
Navigate to the relevant page and create or update a file with the name
__tests__/<XXXXX>.test.ts
. -
To run the test, execute the command
yarn test-unit
.
For an example of how this is done, you can refer to the following link: https://github.com/StanGirard/quivr/pull/426
Have fun!
I cant view my docx document in /explore/ (im using Firefox) Error in console
Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Bbrain_id%2C%20vector_id%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
Here is quick fix that might help with this:
--- a/frontend/app/explore/DocumentItem/DocumentData.tsx
+++ b/frontend/app/explore/DocumentItem/DocumentData.tsx
@@ -50,7 +50,7 @@ const DocumentData = ({ documentName }: DocumentDataProps): JSX.Element => {
{doc.replaceAll("_", " ")}
</p>
<span className="break-words my-auto">
- {documents[0][doc] || "Not Available"}
+ {JSON.stringify(documents[0][doc]) || "Not Available"}
</span>
</div>
);
Reason for error is that document has "Brains Vectors" key which is array of objects and not a plain text field.
@GorlikItsMe @ilkkanisula this was fixed in https://github.com/StanGirard/quivr/pull/781