From b06971b0fc674726eaad3fbe93625e94b8e0d44e Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Mon, 3 Feb 2025 09:46:26 -0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20(duckduckgo.spec.ts):=20update=20se?= =?UTF-8?q?lectors=20and=20actions=20in=20integration=20test=20for=20DuckD?= =?UTF-8?q?uckGo=20search=20component=20to=20match=20recent=20changes=20in?= =?UTF-8?q?=20the=20frontend=20codebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/package-lock.json | 1 - .../extended/integrations/duckduckgo.spec.ts | 16 ++++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/frontend/package-lock.json b/src/frontend/package-lock.json index 63482c0c7d2e..4b7498d67b28 100644 --- a/src/frontend/package-lock.json +++ b/src/frontend/package-lock.json @@ -836,7 +836,6 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", - "extraneous": true, "inBundle": true, "license": "MIT", "engines": { diff --git a/src/frontend/tests/extended/integrations/duckduckgo.spec.ts b/src/frontend/tests/extended/integrations/duckduckgo.spec.ts index 038fba8048e0..8089cf177bef 100644 --- a/src/frontend/tests/extended/integrations/duckduckgo.spec.ts +++ b/src/frontend/tests/extended/integrations/duckduckgo.spec.ts @@ -11,15 +11,19 @@ test( await page.getByTestId("sidebar-search-input").click(); await page.getByTestId("sidebar-search-input").fill("duck"); - await page.waitForSelector('//*[@id="toolsDuckDuckGo Search"]', { + await page.waitForSelector('[data-testid="toolsDuckDuckGo Search"]', { timeout: 3000, }); await page - .locator('//*[@id="toolsDuckDuckGo Search"]') - .dragTo(page.locator('//*[@id="react-flow-id"]')); - await page.mouse.up(); - await page.mouse.down(); + .getByTestId("toolsDuckDuckGo Search") + .hover() + .then(async () => { + await page + .getByTestId("add-component-button-duckduckgo-search") + .click(); + }); + await page.getByTestId("fit_view").click(); await page @@ -42,7 +46,7 @@ test( ) ?? false; await page - .getByTestId("output-inspection-data-duckduckgosearch") + .getByTestId("output-inspection-data-duckduckgosearchcomponent") .first() .click();