From 1c3744501f65471c064827194e18a17fd15793ed Mon Sep 17 00:00:00 2001 From: Sagar Khalasi Date: Mon, 9 Dec 2024 14:09:49 +0530 Subject: [PATCH 1/5] Fix iframe test case for clicking iframe --- .../Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts index 9047459daf07..76f536bd7d0c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts @@ -81,7 +81,7 @@ describe( propPane.UpdatePropertyFieldValue("URL", " "); agHelper.ValidateToastMessage("url updated"); - agHelper.ClickButton("Submit"); + agHelper.ClickButton("Submit", { force: true }); getIframeBody(0) .find("input") .should("be.visible") @@ -90,6 +90,7 @@ describe( expect(inputValue).to.equal("submitclicked"); }); + EditorNavigation.SelectEntityByName("Iframe1", EntityType.Widget); propPane.UpdatePropertyFieldValue( "srcDoc", ` From ce63e8c3edfabbe1ef81b6b17af1f1f00889329d Mon Sep 17 00:00:00 2001 From: Sagar Khalasi Date: Mon, 9 Dec 2024 15:14:06 +0530 Subject: [PATCH 2/5] Update --- app/client/cypress/limited-tests.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index aa00835ffb0e..dfe4c063c460 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,5 +1,6 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts + # For running all specs - uncomment below: #cypress/e2e/**/**/* From ef472e3a4375ec154a1e97761d9097ef1f8e6532 Mon Sep 17 00:00:00 2001 From: Sagar Khalasi Date: Mon, 9 Dec 2024 16:45:06 +0530 Subject: [PATCH 3/5] Minor update --- .../Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts | 4 +++- app/client/cypress/support/Objects/CommonLocators.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts index 76f536bd7d0c..f8e75c360440 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts @@ -46,7 +46,9 @@ describe( // User interaction - Click getIframeBody(1).find(locators._pageHeaderToggle).click({ force: true }); - getIframeBody(1).find(locators._pageHeaderMenuList).should("be.visible"); + getIframeBody(1) + .find(locators._pageHeaderMenuList) + .should("be.visible", { timeout: Cypress.config().pageLoadTimeout }); }); it("2. Verify colors, borders and shadows", () => { diff --git a/app/client/cypress/support/Objects/CommonLocators.ts b/app/client/cypress/support/Objects/CommonLocators.ts index d7a534bc4439..85f7e173b819 100644 --- a/app/client/cypress/support/Objects/CommonLocators.ts +++ b/app/client/cypress/support/Objects/CommonLocators.ts @@ -326,7 +326,7 @@ export class CommonLocators { _treeSelectedContent = ".rc-tree-select-selection-item-content"; _switcherIcon = ".switcher-icon"; _root = "#root"; - _pageHeaderToggle = ".navbar__items>button"; + _pageHeaderToggle = ".navbar__items > button"; _pageHeaderMenuList = ".navbar-sidebar__backdrop"; _enterFullScreen = ".application-demo-new-dashboard-control-enter-fullscreen"; _dashboardContainer = ".application-demo-new-dashboard-container"; From 14886c2b4eb8afeff162fe1881ea83a3da99d43d Mon Sep 17 00:00:00 2001 From: Sagar Khalasi Date: Mon, 9 Dec 2024 17:38:21 +0530 Subject: [PATCH 4/5] Fix for very rare failure --- .../ClientSide/Widgets/Iframe/IframeTest_spec.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts index f8e75c360440..af06ad40ac23 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts @@ -46,9 +46,11 @@ describe( // User interaction - Click getIframeBody(1).find(locators._pageHeaderToggle).click({ force: true }); - getIframeBody(1) - .find(locators._pageHeaderMenuList) - .should("be.visible", { timeout: Cypress.config().pageLoadTimeout }); + agHelper.WaitForCondition(() => { + return getIframeBody(1) + .find(locators._pageHeaderMenuList) + .then(($el: JQuery) => $el.length > 0); + }); }); it("2. Verify colors, borders and shadows", () => { From 7bd2b6a3d6cb68b9e0eeeccdb0c52b60113a4515 Mon Sep 17 00:00:00 2001 From: Sagar Khalasi Date: Mon, 9 Dec 2024 18:36:52 +0530 Subject: [PATCH 5/5] Reverted limit text file --- app/client/cypress/limited-tests.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index dfe4c063c460..aa00835ffb0e 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,6 +1,5 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ClientSide/Widgets/Iframe/IframeTest_spec.ts - +cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js # For running all specs - uncomment below: #cypress/e2e/**/**/*