From fd7405048447d93d19e4e0753aadcfd2391a349a Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Thu, 27 Jun 2024 14:39:00 -0300 Subject: [PATCH 1/3] add tests improvements --- src/frontend/playwright.config.ts | 4 +- .../handleRenderComponent/index.tsx | 6 +- .../components/parameterComponent/index.tsx | 4 + .../{auto_login.spec.ts => autoLogin.spec.ts} | 0 .../tests/end-to-end/chatInputOutput.spec.ts | 49 ++- .../end-to-end/codeAreaModalComponent.spec.ts | 8 +- ...tion.spec.ts => curlApiGeneration.spec.ts} | 0 .../end-to-end/dropdownComponent.spec.ts | 8 +- .../end-to-end/fileUploadComponent.spec.ts | 81 +++-- .../end-to-end/filterEdge-shard-0.spec.ts | 175 +++++++++++ .../end-to-end/filterEdge-shard-1.spec.ts | 148 +++++++++ .../tests/end-to-end/filterEdge.spec.ts | 257 ---------------- .../tests/end-to-end/floatComponent.spec.ts | 9 +- .../tests/end-to-end/flowPage.spec.ts | 4 +- .../tests/end-to-end/flowSettings.spec.ts | 5 +- .../tests/end-to-end/generalBugs.spec.ts | 4 +- .../tests/end-to-end/globalVariables.spec.ts | 9 +- .../tests/end-to-end/inputComponent.spec.ts | 9 +- .../end-to-end/inputListComponent.spec.ts | 4 +- .../tests/end-to-end/intComponent.spec.ts | 9 +- .../end-to-end/keyPairListComponent.spec.ts | 9 +- .../end-to-end/langflowShortcuts.spec.ts | 24 +- .../tests/end-to-end/nestedComponent.spec.ts | 8 +- .../end-to-end/promptModalComponent.spec.ts | 8 +- ...on.spec.ts => pythonApiGeneration.spec.ts} | 0 .../tests/end-to-end/saveComponents.spec.ts | 9 +- .../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 | 290 ------------------ .../end-to-end/textAreaModalComponent.spec.ts | 4 +- .../tests/end-to-end/textInputOutput.spec.ts | 123 ++++---- .../tests/end-to-end/toggleComponent.spec.ts | 4 +- ...tweaks_test.spec.ts => tweaksTest.spec.ts} | 9 +- 35 files changed, 939 insertions(+), 690 deletions(-) rename src/frontend/tests/end-to-end/{auto_login.spec.ts => autoLogin.spec.ts} (100%) rename src/frontend/tests/end-to-end/{curl_api_generation.spec.ts => curlApiGeneration.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/filterEdge.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} (96%) diff --git a/src/frontend/playwright.config.ts b/src/frontend/playwright.config.ts index 5af71db80..d6ecfd6ac 100644 --- a/src/frontend/playwright.config.ts +++ b/src/frontend/playwright.config.ts @@ -15,13 +15,13 @@ 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 */ retries: process.env.CI ? 2 : 0, /* Opt out of parallel tests on CI. */ - workers: 1, + workers: 2, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ timeout: 120 * 1000, // reporter: [ diff --git a/src/frontend/src/CustomNodes/GenericNode/components/handleRenderComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/handleRenderComponent/index.tsx index 4e53881d4..3d6c78d52 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 (