From a168382fd8438c8dd7153e952cc2883d1c405247 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 14:21:24 +0800 Subject: [PATCH] add permission to allow copying to clipboard (#1281) (#1282) Add permission for copying link to clipboard in cypress/integration/core-opensearch-dashboards/opensearch-dashboards/dashboard_share_copy_link_test.js Issues Resolved resolves #1081 Signed-off-by: Qingyang(Abby) Hu (cherry picked from commit 64959fadd706e438ec30ed2eae4344cffee7fbe9) Co-authored-by: Qingyang(Abby) Hu --- cypress.json | 5 ++++- .../opensearch-dashboards/dashboard_share_copy_link_test.js | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cypress.json b/cypress.json index 90e23422d..dc7408d8f 100644 --- a/cypress.json +++ b/cypress.json @@ -27,6 +27,9 @@ "WAIT_FOR_LOADER_BUFFER_MS": 0, "DASHBOARDS_ASSISTANT_ENABLED": false, "WORKSPACE_ENABLED": false, - "SAVED_OBJECTS_PERMISSION_ENABLED": false + "SAVED_OBJECTS_PERMISSION_ENABLED": false, + "browserPermissions": { + "clipboard": "allow" + } } } 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..e77da501e 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 @@ -3,10 +3,13 @@ * SPDX-License-Identifier: Apache-2.0 */ import { STACK_MANAGEMENT_PATH } from '../../../utils/dashboards/constants'; +import { CURRENT_TENANT } from '../../../utils/commands'; if (Cypress.env('SECURITY_ENABLED')) { describe('Copy Link functionality working', () => { it('Tests the link copys and can be routed to in Safari', () => { + CURRENT_TENANT.newTenant = 'global'; + cy.visit(STACK_MANAGEMENT_PATH); cy.waitForLoader(); cy.getElementByTestId('toggleNavButton').click();