From 7f08233b964e83942c74227ffcdb5990e58c27ae Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Sat, 1 Oct 2022 10:49:14 +0530 Subject: [PATCH] test: use close active modal instead of esc Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- scripts/cypress/integration/common/4f_grid_view_share.js | 3 ++- scripts/cypress/integration/common/4f_pg_grid_view_share.js | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/cypress/integration/common/4f_grid_view_share.js b/scripts/cypress/integration/common/4f_grid_view_share.js index 0fadfd5ee7..9b45ec7480 100644 --- a/scripts/cypress/integration/common/4f_grid_view_share.js +++ b/scripts/cypress/integration/common/4f_grid_view_share.js @@ -31,7 +31,8 @@ export const genTest = (apiType, dbType) => { .find(".share-link-box") .contains("/nc/view/", { timeout: 10000 }) .then(($obj) => { - cy.get("body").type("{esc}"); + // cy.get("body").type("{esc}"); + cy.closeActiveModal(".nc-modal-share-view"); // viewURL.push($obj.text()) viewURL[viewName] = $obj.text().trim(); }); diff --git a/scripts/cypress/integration/common/4f_pg_grid_view_share.js b/scripts/cypress/integration/common/4f_pg_grid_view_share.js index d9e3fc3d7d..4a2b948a3c 100644 --- a/scripts/cypress/integration/common/4f_pg_grid_view_share.js +++ b/scripts/cypress/integration/common/4f_pg_grid_view_share.js @@ -95,12 +95,10 @@ export const genTest = (apiType, dbType) => { .find(".share-link-box") .contains("/nc/view/", { timeout: 10000 }) .then(($obj) => { - cy.get("body").type("{esc}"); - // viewURL.push($obj.text()) + // cy.get("body").type("{esc}"); + cy.closeActiveModal(".nc-modal-share-view"); viewURL[viewName] = $obj.text().trim(); }); - - cy.getActiveModal(".nc-modal-share-view").should("not.be.visible"); }; let clear;