From 5d58e796d4840c1e83148a512619429ed34fbade Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Thu, 27 Jun 2024 14:39:00 -0300 Subject: [PATCH] add tests improvements --- src/frontend/playwright.config.ts | 2 +- .../handleRenderComponent/index.tsx | 4 + .../components/parameterComponent/index.tsx | 4 + .../{auto_login.spec.ts => autoLogin.spec.ts} | 0 .../tests/end-to-end/chatInputOutput.spec.ts | 45 ++- .../end-to-end/codeAreaModalComponent.spec.ts | 4 +- .../end-to-end/dropdownComponent.spec.ts | 4 +- .../end-to-end/fileUploadComponent.spec.ts | 77 +++-- .../end-to-end/filterEdge-shard-0.spec.ts | 175 +++++++++++ .../end-to-end/filterEdge-shard-1.spec.ts | 148 +++++++++ .../tests/end-to-end/floatComponent.spec.ts | 5 +- .../tests/end-to-end/flowSettings.spec.ts | 5 +- .../tests/end-to-end/globalVariables.spec.ts | 5 +- .../handleTooltipSuggestions.spec.ts | 159 ---------- .../tests/end-to-end/inputComponent.spec.ts | 5 +- .../tests/end-to-end/intComponent.spec.ts | 5 +- .../end-to-end/keyPairListComponent.spec.ts | 9 +- .../end-to-end/langflowShortcuts.spec.ts | 14 +- .../tests/end-to-end/nestedComponent.spec.ts | 4 +- .../end-to-end/promptModalComponent.spec.ts | 4 +- ...on.spec.ts => pythonApiGeneration.spec.ts} | 0 .../tests/end-to-end/saveComponents.spec.ts | 4 +- .../tests/end-to-end/store-shard-0.spec.ts | 19 ++ .../tests/end-to-end/store-shard-1.spec.ts | 119 ++++++++ .../tests/end-to-end/store-shard-2.spec.ts | 122 ++++++++ .../tests/end-to-end/store-shard-3.spec.ts | 88 ++++++ src/frontend/tests/end-to-end/store.spec.ts | 287 ------------------ .../end-to-end/textAreaModalComponent.spec.ts | 4 +- .../tests/end-to-end/textInputOutput.spec.ts | 5 +- .../tests/end-to-end/toggleComponent.spec.ts | 4 +- ...tweaks_test.spec.ts => tweaksTest.spec.ts} | 5 +- 31 files changed, 818 insertions(+), 517 deletions(-) rename src/frontend/tests/end-to-end/{auto_login.spec.ts => autoLogin.spec.ts} (100%) create mode 100644 src/frontend/tests/end-to-end/filterEdge-shard-0.spec.ts create mode 100644 src/frontend/tests/end-to-end/filterEdge-shard-1.spec.ts delete mode 100644 src/frontend/tests/end-to-end/handleTooltipSuggestions.spec.ts rename src/frontend/tests/end-to-end/{python_api_generation.spec.ts => pythonApiGeneration.spec.ts} (100%) create mode 100644 src/frontend/tests/end-to-end/store-shard-0.spec.ts create mode 100644 src/frontend/tests/end-to-end/store-shard-1.spec.ts create mode 100644 src/frontend/tests/end-to-end/store-shard-2.spec.ts create mode 100644 src/frontend/tests/end-to-end/store-shard-3.spec.ts delete mode 100644 src/frontend/tests/end-to-end/store.spec.ts rename src/frontend/tests/end-to-end/{tweaks_test.spec.ts => tweaksTest.spec.ts} (98%) diff --git a/src/frontend/playwright.config.ts b/src/frontend/playwright.config.ts index fa1df86e3..54153792d 100644 --- a/src/frontend/playwright.config.ts +++ b/src/frontend/playwright.config.ts @@ -15,7 +15,7 @@ dotenv.config({ path: path.resolve(__dirname, "../../.env") }); export default defineConfig({ testDir: "./tests", /* Run tests in files in parallel */ - fullyParallel: false, + fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ forbidOnly: !!process.env.CI, /* Retry on CI only */ diff --git a/src/frontend/src/CustomNodes/GenericNode/components/handleRenderComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/handleRenderComponent/index.tsx index e415eb0c7..116112865 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/handleRenderComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/handleRenderComponent/index.tsx @@ -21,6 +21,7 @@ export default function HandleRenderComponent({ colors, setFilterEdge, showNode, + testIdComplement, }: { left: boolean; nodes: any; @@ -33,7 +34,10 @@ export default function HandleRenderComponent({ colors: string[]; setFilterEdge: any; showNode: any; + testIdComplement?: string; }) { + console.log(myData); + return (