The code now handles import errors when importing utilities from the `langchain.utilities` module. If an import error occurs, the utility is skipped and not added to the `type_dict` dictionary. This prevents the application from crashing when encountering an invalid or missing utility.
fix(promptComponent): prevent update from prompt template after group node if prompt is wrongly marked as not dynamic
fix(EditNodeModal): update readonly condition to only check for myData.current.node?.flow
fix(keyPairListComponent.spec.ts): update test case to fill input field with a value containing spaces for better coverage
fix(keyPairListComponent.spec.ts): add assertion to check if input field value with spaces is correctly filled
fix(keyPairListComponent.spec.ts): update test case to fill input field with a value containing spaces for better coverage
fix(keyPairListComponent.spec.ts): update assertion to check if input field value with spaces is correctly filled
fix(reactflowUtils.t): modify convertValuesToNumbers function to
correctly handle values that are numbers represented as strings
feat(reactflowUtils.ts): add check to convertValuesToNumbers function to
only convert values that are valid numbers represented as strings
This pull request introduces unit tests for four different components:
ToggleComponent, IntComponent, FloatComponent, and InputComponent. The
tests ensure that these components function as expected and help
maintain code quality.
Changes Made:
Added a test suite for ToggleComponent to verify its functionality.
Added a test suite for IntComponent to verify its functionality.
Added a test suite for FloatComponent to verify its functionality.
Added a test suite for InputComponent to verify its functionality.
The toggleComponent.spec.ts file contains a test case that verifies the functionality of the ToggleComponent. The test case performs the following actions:
1. Routes network requests from a HAR file, disabling updates for URLs matching "**/api/v1/**".
2. Routes a specific network request to return a JSON response with a status of 201.
3. Navigates to "http://localhost:3000/".
4. Waits for 2000 milliseconds.
5. Clicks on an element with the id "new-project-btn".
6. Waits for 2000 milliseconds.
7. Clicks on an element with the placeholder text "Search" and fills it with "directoryLoader".
8. Waits for 2000 milliseconds.
9. Drags an element with the id "sideDirectoryLoader" to another element with the id "react-flow-id".
10. Performs a series of click actions on various elements to test their functionality.
11. Verifies the state of toggle buttons using the isChecked() method.
12. Clicks on an element with the id "saveChangesBtn".
13. Performs additional click actions and verifications.
14. Clicks on an element with the id "saveChangesBtn".
15. Performs additional click actions and verifications.
16. Clicks on an element with the id "saveChangesBtn".
17. Performs additional click actions and verifications.
18. Clicks on an element with the id "saveChangesBtn".
19. Performs additional click actions and verifications.
20. Clicks on an element with the id "saveChangesBtn".
21. Performs additional click actions and verifications.
22. Verifies the count of elements matching the locator "//*[@id="toggle-1"]" and performs additional actions based on the count.
This test case is added to ensure that the ToggleComponent functions as expected and that the toggle buttons behave correctly.
test(dragAndDrop.spec.ts): add support for drag and drop functionality to test dropping a collection
test(dragAndDrop.spec.ts): add support for drag and drop functionality to test dropping a flow
The `dragAndDrop.spec.ts` file was added to the `src/frontend/tests/onlyFront` directory. This file contains tests for the auto_login functionality. Two tests were added:
1. `auto_login sign in`: This test simulates signing in with auto_login. It routes requests from the "langflow.har" file to the appropriate API endpoints, navigates to the homepage, clicks on the "Community Examples" button, waits for the ".community-pages-flows-panel" selector to be present, and asserts that it has children.
2. `auto_login block_admin`: This test simulates accessing the admin section with auto_login. It routes requests from the "langflow.har" file to the appropriate API endpoints, navigates to the homepage, clicks on the "Community Examples" button, navigates to the login page, clicks on the "Community Examples" button again, navigates to the admin page, clicks on the "Community Examples" button again, navigates to the admin login page, and clicks on the "Community Examples" button.
These tests were added to ensure the proper functioning of the auto_login feature.
feat(tabsContext.tsx): change the order of arguments in addFlow function call to improve readability
feat(exportModal/index.tsx): add alertContext and setNoticeData to display a warning when saving a file with API keys
feat(exportModal/index.tsx): add a caution message to inform users about the consequences of saving with API keys