From aaff06316eedc53fcecc3384059446939097fee4 Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Wed, 26 Jun 2024 11:47:48 -0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20(playwright.config.ts):=20update=20?= =?UTF-8?q?retries=20and=20workers=20configuration=20for=20CI=20?= =?UTF-8?q?=F0=9F=92=A1=20(textAreaWrapper):=20add=20data-testid=20attribu?= =?UTF-8?q?te=20for=20better=20test=20targeting=20=E2=9C=85=20(actionsMain?= =?UTF-8?q?Page.spec.ts):=20add=20waitForSelector=20for=20better=20test=20?= =?UTF-8?q?stability=20=E2=9C=85=20(basicExamples.spec.ts):=20replace=20wa?= =?UTF-8?q?itForTimeout=20with=20waitForSelector=20=E2=9C=85=20(basicExamp?= =?UTF-8?q?les.spec.ts):=20use=20data-testid=20for=20chat=20input=20for=20?= =?UTF-8?q?consistency=20=E2=9C=85=20(memoryChatbot.spec.ts):=20replace=20?= =?UTF-8?q?waitForTimeout=20with=20waitForSelector=20=E2=9C=85=20(memoryCh?= =?UTF-8?q?atbot.spec.ts):=20use=20data-testid=20for=20chat=20input=20for?= =?UTF-8?q?=20consistency=20=E2=9C=85=20(documentQA.spec.ts):=20replace=20?= =?UTF-8?q?waitForTimeout=20with=20waitForSelector=20=E2=9C=85=20(document?= =?UTF-8?q?QA.spec.ts):=20use=20data-testid=20for=20chat=20input=20for=20c?= =?UTF-8?q?onsistency=20=E2=9C=85=20(vectorStoreRAG.spec.ts):=20replace=20?= =?UTF-8?q?waitForTimeout=20with=20waitForSelector=20=E2=9C=85=20(vectorSt?= =?UTF-8?q?oreRAG.spec.ts):=20use=20data-testid=20for=20chat=20input=20for?= =?UTF-8?q?=20consistency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ (tests): add waitForSelector to ensure elements are loaded before interaction ✅ (tests): add waitForSelector for 'fit view' button in end-to-end tests --- src/frontend/playwright.config.ts | 4 +- .../components/textAreaWrapper/index.tsx | 1 + .../tests/end-to-end/actionsMainPage.spec.ts | 12 +++ .../tests/end-to-end/basicExamples.spec.ts | 79 +++++++++++++++---- .../tests/end-to-end/chatInputOutput.spec.ts | 11 ++- .../end-to-end/chatInputOutputUser.spec.ts | 21 +++-- .../tests/end-to-end/filterEdge.spec.ts | 9 +++ src/frontend/tests/end-to-end/folders.spec.ts | 4 +- .../tests/end-to-end/generalBugs.spec.ts | 7 +- .../tests/end-to-end/globalVariables.spec.ts | 4 + .../tests/end-to-end/inputComponent.spec.ts | 4 + .../tests/end-to-end/intComponent.spec.ts | 9 +++ .../end-to-end/langflowShortcuts.spec.ts | 5 ++ .../end-to-end/textAreaModalComponent.spec.ts | 4 + .../tests/end-to-end/textInputOutput.spec.ts | 8 ++ .../tests/end-to-end/toggleComponent.spec.ts | 12 +++ .../tests/end-to-end/tweaks_test.spec.ts | 5 ++ 17 files changed, 173 insertions(+), 26 deletions(-) diff --git a/src/frontend/playwright.config.ts b/src/frontend/playwright.config.ts index 93f626569..fa1df86e3 100644 --- a/src/frontend/playwright.config.ts +++ b/src/frontend/playwright.config.ts @@ -19,9 +19,9 @@ export default defineConfig({ /* 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, + retries: process.env.CI ? 2 : 3, /* Opt out of parallel tests on CI. */ - workers: 3, + workers: 2, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ timeout: 120 * 1000, // reporter: [ diff --git a/src/frontend/src/modals/IOModal/components/chatView/chatInput/components/textAreaWrapper/index.tsx b/src/frontend/src/modals/IOModal/components/chatView/chatInput/components/textAreaWrapper/index.tsx index 29f88453a..0a9ba4a7e 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/chatInput/components/textAreaWrapper/index.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/chatInput/components/textAreaWrapper/index.tsx @@ -45,6 +45,7 @@ const TextAreaWrapper = ({ return (