Commit graph

39 commits

Author SHA1 Message Date
cristhianzl
9a92a291ca fix(parameterComponent): add data-testid attribute to textarea and input elements for easier testing
fix(GenericNode): add data-testid attribute to div element for easier testing
fix(textAreaComponent): add data-testid attribute to div element for easier testing
fix(EditNodeModal): add data-testid attribute to textarea element for easier testing
fix(genericModal): add data-testid attribute to span element for easier testing
fix(flowPage.spec): comment out unnecessary code
fix(keyPairListComponent.spec): add click event to div element for easier testing
fix(nestedComponent.spec): comment out unnecessary code
fix(promptModalComponent.spec): comment out unnecessary code
fix(inputComponent.spec): add click event to div element for easier testing
fix(toggleComponent.spec): add click event to div element for easier testing
2023-12-07 15:42:26 -03:00
cristhianzl
08522720dc fix(keypairListComponent): add data-testid attribute to input elements for better testability
fix(codeAreaModalComponent.spec): remove unnecessary click action
fix(floatComponent.spec): remove unnecessary click action
fix(intComponent.spec): remove unnecessary click action
fix(keyPairListComponent.spec): remove unnecessary click action
fix(promptModalComponent.spec): remove unnecessary comments and unused code
2023-12-06 20:06:47 -03:00
igorrCarvalho
fa627eea03 Fix: bug on disabled share when there is no api key 2023-11-27 21:28:33 -03:00
cristhianzl
ea5ddc0ed5 fix(components): fix dropdown component id attribute to include index for uniqueness
fix(components): fix dict component id attribute to include index for uniqueness
fix(components): fix code area component id attribute to include id for uniqueness
fix(modals): fix edit node modal dict component id attribute to include id for uniqueness
fix(modals): fix dict area modal save button data-testid attribute for testing
fix(pages): fix node toolbar component class name for more options button
fix(types): add id property to dropdown component type
fix(types): add id property to dict component type
feat(tests): add end-to-end test for dropdown component
feat(tests): add end-to-end test for dict component
feat(tests): add end-to-end test for node toolbar component
feat(tests): add end-to-end test for nested component
feat(tests): add input component test
feat(tests): add toggle component test
2023-11-27 16:29:43 -03:00
cristhianzl
77665da9c7 fix(keyPairListComponent.spec.ts): fix incorrect key and value in test case to ensure accurate testing 2023-11-27 09:38:14 -03:00
cristhianzl
d35ce3d48b fix(SanitizedHTMLWrapper): add data-testid attribute to the div element for testing purposes
fix(genericIconComponent): add data-testid attribute to the TargetIcon component for testing purposes

fix(promptComponent): add data-testid attribute to the span element for testing purposes

fix(textAreaComponent): add data-testid attribute to the IconComponent component for testing purposes

fix(genericModal): add data-testid attribute to the Textarea component and the input element for testing purposes

fix(types/components): add id property to IconComponentProps type

test(flowPage.spec): update click actions to use getByTestId method for testing purposes

test(intComponent.spec): update fill action to set a different value for testing purposes

test(promptModalComponent.spec): update click and fill actions to use getByTestId method for testing purposes
2023-11-24 16:03:33 -03:00
cristhianzl
4f1d0b4683 fix(keypairListComponent): update input ids to include "editNode" prefix when editNode prop is true
fix(genericModal): add data-testid to save button for easier testing
fix(sideBarDraggableComponent): add data-testid to div element for easier testing
fix(nodeToolbarComponent): add empty fragment as ConfirmationModal.Trigger to fix warning
fix(types): add editNodeModal property to KeyPairListComponentType
fix(codeAreaModalComponent.spec): update locator for Python Function Tool
fix(floatComponent.spec): update locator for Python Function Tool
fix(intComponent.spec): update locator for GET Request Tool
fix(keyPairListComponent.spec): update locator for CSV Loader Tool
fix(promptModalComponent.spec): update locator for Prompt Template Tool
2023-11-24 11:06:57 -03:00
cristhianzl
08b6739e1e fix(nodeToolbarComponent): add data-testid attribute to more options modal for easier testing
fix(floatComponent.spec): update element locator for sideLlamaCpp to llmsLlamaCpp to match changes in the codebase
fix(floatComponent.spec): update element locator for editAdvancedIcon to use getByTestId for more reliable testing
2023-11-22 22:08:04 -03:00
anovazzi1
9c6930bd0f Merge remote-tracking branch 'origin/dev' into saveComponent 2023-10-19 15:17:12 -03:00
cristhianzl
2fbb68d6a6 fix(keyPairListComponent.spec.ts): fix typo in test case description
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
2023-10-18 23:58:09 -03:00
anovazzi1
6c6127203f test(saveComponents.spec.ts): add test case to make front work without backend
test(saveComponents.spec.ts): add test case to save default component and delete it
2023-10-18 21:56:53 -03:00
anovazzi1
0f92dacb65 test(saveComponents.spec.ts): refactor saveComponent function to improve code readability and reusability
test(saveComponents.spec.ts): add test case to save the same component multiple times and verify the count of saved components
2023-10-18 21:38:57 -03:00
anovazzi1
cd5204b566 fix(extraSidebarComponent): remove unnecessary empty line
fix(extraSidebarComponent): remove unused variable
feat(extraSidebarComponent): add sectionName prop to SidebarDraggableComponent for better component identification
fix(sideBarDraggableComponent): add sectionName prop to SidebarDraggableComponent for better component identification
test(saveComponents.spec): rename test case to "save group component tests"
test(saveComponents.spec): add test case for saving default component with custom values
2023-10-18 21:15:51 -03:00
anovazzi1
dae7ee9b70 fix(extraSidebarComponent): import 'set' function from lodash to fix compilation error
fix(extraSidebarComponent): include display_name property in search filter condition to improve search functionality
fix(extraSidebarComponent): add 'data' dependency to useEffect to ensure proper re-rendering
feat(extraSidebarComponent): add support for process.env.PORT environment variable to be able to run app on a configurable port
test(onlyFront/saveComponents.spec): add test for saving a component in the frontend
test(onlyFront/saveComponents.spec): simulate dropping a file and assert that the flow is displayed
test(onlyFront/saveComponents.spec): simulate grouping elements and assert that the group is created
test(onlyFront/saveComponents.spec): simulate typing and saving a flow component
2023-10-18 20:08:51 -03:00
anovazzi1
75c613c97e updated input component test 2023-10-18 17:07:44 -03:00
anovazzi1
5fd7cbdcb2 feat(tests): add toggleComponent.spec.ts to test the functionality of the ToggleComponent
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.
2023-10-18 16:56:44 -03:00
anovazzi1
2fba3427fc sorting fields to keep the same order always and fixed group component tests' 2023-10-18 16:27:35 -03:00
anovazzi1
fcafd995ef moved group tests to only front 2023-10-18 16:18:46 -03:00
cristhianzl
1845149647 Merge branch 'feat-testComps' of https://github.com/logspace-ai/langflow into feat-testComps 2023-10-18 15:53:25 -03:00
cristhianzl
ad8183e598 fix(promptModalComponent.spec.ts): update element locators to match changes in HTML structure 2023-10-18 15:51:56 -03:00
anovazzi1
7e0b3684e4 Merge branch 'dev' into feat-testComps 2023-10-18 14:49:13 -03:00
anovazzi1
5a1ddfb9b3 fix(tabsContext.tsx): add console.log to debug text variable in TabsProvider
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
2023-10-17 21:47:13 -03:00
anovazzi1
d68f2cbbab feat(dragAndDrop.spec.ts): add tests for auto_login functionality
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.
2023-10-17 21:47:13 -03:00
anovazzi1
f6d369dd7b created assets page 2023-10-17 21:47:13 -03:00
cristhianzl
bb17616d4f moving folders 2023-10-17 10:41:48 -03:00
cristhianzl
27b3b77ab0 merge fix 2023-10-17 09:38:21 -03:00
cristhianzl
88657553cb fix(parameterComponent): add unique id to textarea and input components for accessibility and testing purposes
fix(codeAreaComponent): add id prop to Input component for accessibility and testing purposes
fix(promptComponent): add id prop to GenericModal and span elements for accessibility and testing purposes
fix(textAreaComponent): add id prop to Input component for accessibility and testing purposes
fix(EditNodeModal): add unique id to textarea and input components for accessibility and testing purposes
fix(codeAreaModal): add id prop to Input component for accessibility and testing purposes
fix(genericModal): add id prop to GenericModal and span elements for accessibility and testing purposes
fix(components/types): add id prop to component types for consistency and future use
feat(tests): add tests for CodeAreaModalComponent and PromptTemplateComponent
2023-10-11 08:26:38 -03:00
anovazzi1
6ae41c265c Merge remote-tracking branch 'origin/dev' into bugfix_minimizeNode 2023-10-10 13:39:01 -03:00
anovazzi1
99662ccc23
New group node (#891) 2023-10-10 13:12:29 -03:00
cristhianzl
ecf99cf179 test on Toogle, input, int 2023-10-09 19:53:01 -03:00
Cristhian Zanforlin Lousa
9e2b73eac9 🔧 fix(DropdownButtonComponent): add id attribute to Button component to improve accessibility and testing capabilities
🔧 fix(floatComponent): add id attribute to Input component to improve accessibility and testing capabilities
🔧 fix(keypairListComponent): add id attribute to Input components to improve accessibility and testing capabilities
🔧 fix(keypairListComponent): add id attribute to Plus and Minus buttons to improve accessibility and testing capabilities
🔧 fix(toggleShadComponent): add id attribute to Switch component to improve accessibility and testing capabilities
🔧 fix(EditNodeModal): add id attribute to ToggleShadComponent component to improve accessibility and testing capabilities
🔧 fix(PageComponent): add id attribute to div element to improve accessibility and testing capabilities
🔧 fix(extraSidebarComponent): add id attribute to div element to improve accessibility and testing capabilities
🔧 fix(nodeToolbarComponent): add id attribute to div element to improve accessibility and testing capabilities
🔧 fix(nodeToolbarComponent): add id attribute to button element to improve accessibility and testing capabilities
🔧 fix(types/components): add id attribute to ToggleComponentType to improve accessibility and testing capabilities

🚀 feat(keypair.spec.ts): add tests for KeypairListComponent to verify key-value pairs functionality
🚀 feat(float.spec.ts): add tests for FloatComponent to verify float input functionality

🚀 feat: add support for toggling various options in the UI

This commit adds support for toggling various options in the UI. The following options can now be toggled:
- showtemperature
- showtop_k
- showtop_p
- showuse_mlock
- showuse_mmap
- showverbose
- showvocab_only
- showcache
- showecho
- showf16_kv
- showgrammar_path
- showlast_n_tokens_size
- showlogits_all
- showlogprobs
- showlora_base
- showlora_path
- showmax_tokens
- showmetadata
- showmodel_kwargs
- showmodel_path
- shown_batch
- shown_ctx
- shown_gpu_layers
- shown_parts
- shown_threads
- showrepeat_penalty
- showrope_freq_base
- showrope_freq_scale
- showseed
- showstop
- showstreaming
- showsuffix
- showtags

These options can be toggled by clicking on the respective elements in the UI. The commit also includes tests to ensure that the toggling functionality works as expected.
2023-10-09 12:34:35 -03:00
anovazzi1
c30026743a feat(tests): add end-to-end tests for Flow Page and Group component
Add end-to-end tests for the Flow Page and Group component in the frontend. The Flow Page tests include a test for saving a custom component and verifying the success alert. The Group component tests include tests for grouping and ungrouping components, editing component properties, and verifying the changes.
2023-10-06 19:12:35 -03:00
anovazzi1
c9724d0fb4 added custom component template 2023-10-04 15:37:41 -03:00
anovazzi1
3c77728709 created test to save flow and fix bug on nested dict 2023-10-04 15:37:41 -03:00
anovazzi1
8f01f5c838 chore(example.spec.ts): remove example.spec.ts test file
The example.spec.ts test file was removed as it is no longer needed.
2023-09-21 11:02:37 -03:00
anovazzi1
55b71605ea login tests finished 2023-09-20 22:57:37 -03:00
anovazzi1
21605d09ba test(login.spec.ts): add test case to check if clicking on "Community Examples" button displays the community pages flows panel 2023-09-20 20:49:07 -03:00
anovazzi1
c6f6d69164 fix(login.spec.ts): update test description to be more specific and descriptive
feat(login.spec.ts): add test case for successful login with mocked API response
2023-09-20 20:48:14 -03:00
anovazzi1
b2f14793e3 migrate progress and install playwrite 2023-09-20 19:53:25 -03:00