From 3bc64b46d6bc235ada198e0f3a1d0b5b9c00f28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20Nagygy=C3=B6rgy?= Date: Mon, 2 Dec 2024 10:13:55 +0100 Subject: [PATCH] fix: e2e multiple buttons --- .../deployment/deployment-copyability-versioned.spec.ts | 4 ++-- .../deployment/deployment-copyability-versionless.spec.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/crux-ui/e2e/with-login/deployment/deployment-copyability-versioned.spec.ts b/web/crux-ui/e2e/with-login/deployment/deployment-copyability-versioned.spec.ts index 39b799f2d..9a46939a3 100644 --- a/web/crux-ui/e2e/with-login/deployment/deployment-copyability-versioned.spec.ts +++ b/web/crux-ui/e2e/with-login/deployment/deployment-copyability-versioned.spec.ts @@ -75,7 +75,7 @@ test.describe('Versioned Project', () => { const copyButton = await page.locator('button:has-text("Copy")') await copyButton.click() - await page.locator(`button:has-text("${nodeName}")`).click() + await page.locator(`button:has-text("${nodeName}")`).first().click() await fillDeploymentPrefix(page, `${prefix}-new-prefix`) const currentUrl = page.url() @@ -102,7 +102,7 @@ test.describe('Versioned Project', () => { const copyButton = await page.locator(`[alt="Copy"]:right-of(:has-text("${projectName}"))`).first() await copyButton.click() - await page.locator(`button:has-text("${nodeName}")`).click() + await page.locator(`button:has-text("${nodeName}")`).first().click() await fillDeploymentPrefix(page, prefix) await page.locator('button:has-text("Copy")').click() diff --git a/web/crux-ui/e2e/with-login/deployment/deployment-copyability-versionless.spec.ts b/web/crux-ui/e2e/with-login/deployment/deployment-copyability-versionless.spec.ts index 16f8b1fbb..fb0c11d3e 100644 --- a/web/crux-ui/e2e/with-login/deployment/deployment-copyability-versionless.spec.ts +++ b/web/crux-ui/e2e/with-login/deployment/deployment-copyability-versionless.spec.ts @@ -41,7 +41,7 @@ test.describe('Versionless Project', () => { const copyButton = await page.locator(`[alt="Copy"]:right-of(:has-text("${projectName}"))`).first() await copyButton.click() - await page.locator(`button:has-text("${nodeName}")`).click() + await page.locator(`button:has-text("${nodeName}")`).first().click() await fillDeploymentPrefix(page, prefix) await page.locator('button:has-text("Copy")').click() @@ -96,7 +96,7 @@ test.describe('Versionless Project', () => { const copyButton = page.locator('button:has-text("Copy")') await copyButton.click() - await page.locator(`button:has-text("${nodeName}")`).click() + await page.locator(`button:has-text("${nodeName}")`).first().click() await fillDeploymentPrefix(page, `${prefix}-new-prefix`) const currentUrl = page.url()