From bc4d048f5deea0ca8bbfa5ec19ceb29b35c101d1 Mon Sep 17 00:00:00 2001 From: Shailesh Parmar Date: Wed, 13 Dec 2023 14:18:27 +0530 Subject: [PATCH] Minor (cypress): fixed failing cypress for custom metric (#14367) --- .../resources/ui/cypress/e2e/Features/CustomMetric.spec.js | 4 ++-- .../TableProfiler/Component/ColumnProfileTable.tsx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/CustomMetric.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/CustomMetric.spec.js index 3486bf46f97..bbd5b5209c9 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/CustomMetric.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/CustomMetric.spec.js @@ -93,7 +93,7 @@ const createCustomMetric = ({ .click(); } cy.get('[data-testid="profiler-add-table-test-btn"]').click(); - cy.get('[data-testid="metric"]').click(); + cy.get('[data-testid="custom-metric"]').click(); // validate redirection and cancel button cy.get('[data-testid="heading"]').should('be.visible'); @@ -113,7 +113,7 @@ const createCustomMetric = ({ // Click on create custom metric button cy.get('[data-testid="profiler-add-table-test-btn"]').click(); - cy.get('[data-testid="metric"]').click(); + cy.get('[data-testid="custom-metric"]').click(); cy.get('[data-testid="submit-button"]').click(); validateForm(isColumnMetric); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ColumnProfileTable.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ColumnProfileTable.tsx index 56cdee6032c..2ae58fa9892 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ColumnProfileTable.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ColumnProfileTable.tsx @@ -268,7 +268,7 @@ const ColumnProfileTable = () => { const addButtonContent = [ { label: , - key: '1', + key: 'test-case', onClick: () => { history.push({ pathname: getAddDataQualityTableTestPath( @@ -280,8 +280,8 @@ const ColumnProfileTable = () => { }, }, { - label: , - key: '2', + label: , + key: 'custom-metric', onClick: () => { history.push({ pathname: getAddCustomMetricPath(