From da167642b79abfc04b6507903d4a3fb6491b1a6b Mon Sep 17 00:00:00 2001 From: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com> Date: Mon, 16 Dec 2024 13:47:35 +0530 Subject: [PATCH] fix: button descendant console error (#4468) --- .../TemplateList/components/StartFromScratchTemplate.tsx | 5 ++--- apps/web/playwright/survey.spec.ts | 2 +- apps/web/playwright/utils/helper.ts | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/web/modules/surveys/components/TemplateList/components/StartFromScratchTemplate.tsx b/apps/web/modules/surveys/components/TemplateList/components/StartFromScratchTemplate.tsx index 3a744ecb6f..b7faa440ed 100644 --- a/apps/web/modules/surveys/components/TemplateList/components/StartFromScratchTemplate.tsx +++ b/apps/web/modules/surveys/components/TemplateList/components/StartFromScratchTemplate.tsx @@ -31,8 +31,7 @@ export const StartFromScratchTemplate = ({ const t = useTranslations(); const customSurvey = getCustomSurveyTemplate(locale); return ( - )} - + ); }; diff --git a/apps/web/playwright/survey.spec.ts b/apps/web/playwright/survey.spec.ts index c50eeb2c86..f38ee24f4e 100644 --- a/apps/web/playwright/survey.spec.ts +++ b/apps/web/playwright/survey.spec.ts @@ -236,7 +236,7 @@ test.describe("Multi Language Survey Create", async () => { await page.getByRole("button", { name: "Save changes" }).click(); await page.waitForTimeout(2000); await page.getByRole("link", { name: "Surveys" }).click(); - await page.getByRole("button", { name: "Start from scratch Create a" }).click(); + await page.getByText("Start from scratch").click(); await page.getByRole("button", { name: "Create survey", exact: true }).click(); await page.locator("#multi-lang-toggle").click(); await page.getByRole("combobox").click(); diff --git a/apps/web/playwright/utils/helper.ts b/apps/web/playwright/utils/helper.ts index de883b6750..9d6246b648 100644 --- a/apps/web/playwright/utils/helper.ts +++ b/apps/web/playwright/utils/helper.ts @@ -138,7 +138,7 @@ export const signupUsingInviteToken = async (page: Page, name: string, email: st export const createSurvey = async (page: Page, params: CreateSurveyParams) => { const addQuestion = "Add questionAdd a new question to your survey"; - await page.getByRole("button", { name: "Start from scratch Create a" }).click(); + await page.getByText("Start from scratch").click(); await page.getByRole("button", { name: "Create survey", exact: true }).click(); await page.waitForURL(/\/environments\/[^/]+\/surveys\/[^/]+\/edit$/); @@ -326,7 +326,7 @@ export const createSurvey = async (page: Page, params: CreateSurveyParams) => { export const createSurveyWithLogic = async (page: Page, params: CreateSurveyWithLogicParams) => { const addQuestion = "Add questionAdd a new question to your survey"; - await page.getByRole("button", { name: "Start from scratch Create a" }).click(); + await page.getByText("Start from scratch").click(); await page.getByRole("button", { name: "Create survey", exact: true }).click(); await page.waitForURL(/\/environments\/[^/]+\/surveys\/[^/]+\/edit$/);