Skip to content

Commit

Permalink
test:Fix canvas context prop01 (#36391)
Browse files Browse the repository at this point in the history
EE PR: appsmithorg/appsmith-ee#5159

RCA:
The property section related validations were not working

Solution:

Enhanced verification of property pane section visibility using
accessibility attributes.
Introduced new UI interaction properties for managing collapsible
sections.

/ok-to-test tags="@tag.IDE"

<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10923368993>
> Commit: c996a38
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10923368993&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.IDE`
> Spec:
> <hr>Wed, 18 Sep 2024 14:10:07 UTC
<!-- end of auto-generated comment: Cypress test results  -->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Improved test logic for verifying the state of property pane sections,
enhancing accessibility compliance.
- Updated limited tests to include new test specifications for the
property pane.

- **Bug Fixes**
- Enhanced robustness of tests by refining visibility state checks using
ARIA attributes.

- **Chores**
- Expanded locator capabilities in the testing framework to support new
UI components related to collapsible sections.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “NandanAnantharamu” <“[email protected]”>
  • Loading branch information
NandanAnantharamu and “NandanAnantharamu” committed Sep 19, 2024
1 parent c2521fa commit 006dbfd
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,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"; // Convert boolean to aria-hidden value
expect(isSectionOpen).to.equal(expectedValue);
});
}
}

Expand Down

0 comments on commit 006dbfd

Please sign in to comment.