diff --git a/app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Property_Pane_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Property_Pane_2_spec.js index de6f5553078..1d317d75898 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Property_Pane_2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Property_Pane_2_spec.js @@ -195,12 +195,14 @@ function verifyPropertyPaneSectionState(propertySectionState) { for (const [sectionName, shouldSectionOpen] of Object.entries( propertySectionState, )) { - cy.get("body").then(($body) => { - const isSectionOpen = - $body.find(`${propertySectionClass(sectionName)} .t--chevron-icon`) - .length > 0; - expect(isSectionOpen).to.equal(shouldSectionOpen); - }); + cy.get(`${propertySectionClass(sectionName)}`) + .siblings(_.locators._propertyCollapse) + .find(_.locators._propertyCollapseBody) + .invoke("attr", "aria-hidden") + .then((isSectionOpen) => { + const expectedValue = shouldSectionOpen ? "false" : "true"; + expect(isSectionOpen).to.equal(expectedValue); + }); } } diff --git a/app/client/cypress/support/Objects/CommonLocators.ts b/app/client/cypress/support/Objects/CommonLocators.ts index 3db2224e7c1..9bcf7c1cfec 100644 --- a/app/client/cypress/support/Objects/CommonLocators.ts +++ b/app/client/cypress/support/Objects/CommonLocators.ts @@ -339,4 +339,6 @@ export class CommonLocators { _selectClearButton_testId = "selectbutton.btn.cancel"; _selectClearButton_dataTestId = `[data-testid="${this._selectClearButton_testId}"]`; _saveDatasource = `[data-testid='t--store-as-datasource']`; + _propertyCollapseBody = ".bp3-collapse-body"; + _propertyCollapse = ".bp3-collapse"; }