From b153edfe1daf0c12c2028dded3fa200bd55bad5b Mon Sep 17 00:00:00 2001 From: gaobinlong Date: Thu, 1 Feb 2024 17:23:47 +0800 Subject: [PATCH] Fix flaky test for copy link Signed-off-by: gaobinlong --- .../opensearch-dashboards/dashboard_share_copy_link_test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/dashboard_share_copy_link_test.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/dashboard_share_copy_link_test.js index b955145c5..2f0c57545 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/dashboard_share_copy_link_test.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/dashboard_share_copy_link_test.js @@ -12,7 +12,7 @@ if (Cypress.env('SECURITY_ENABLED')) { cy.getElementByTestId('toggleNavButton').click(); cy.get('span[title="Discover"]').click(); cy.getElementByTestId('shareTopNavButton').click(); - cy.getElementByTestId('copyShareUrlButton').click(); + cy.getElementByTestId('copyShareUrlButton').focus().realClick(); // Capture the copied content cy.window().then((win) => {