Skip to content

chore(ExpandableSection): Include OUIAProps for ExpandableSection#12570

Open
mshriver wants to merge 1 commit into
patternfly:mainfrom
mshriver:expandable-section-ouia
Open

chore(ExpandableSection): Include OUIAProps for ExpandableSection#12570
mshriver wants to merge 1 commit into
patternfly:mainfrom
mshriver:expandable-section-ouia

Conversation

@mshriver

@mshriver mshriver commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Add OUIA attribute support to ExpandableSection for better test automation.

What:
Closes #12569

Snapshot tests commit
#12573
https://github.com/patternfly/patternfly-react/pull/12574/changes

Summary by CodeRabbit

  • New Features

    • Added Open UI Automation attributes to the Expandable Section component.
    • Supports custom component IDs and configurable safe-mode behavior.
    • Expandable Sections now expose a standardized component type for automation tools.
  • Documentation

    • Added Expandable Section to the Open UI Automation component guide.

Add OUIA attribute support to ExpandableSection for better test automation.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

ExpandableSection now accepts OUIA properties, defaults ouiaSafe to true, and applies generated OUIA attributes to its root element. Tests cover custom IDs, component type, and safe-mode behavior, while the OUIA guide lists ExpandableSection.

Changes

ExpandableSection OUIA support

Layer / File(s) Summary
OUIA contract and rendering
packages/react-core/src/components/ExpandableSection/ExpandableSection.tsx
ExpandableSectionProps now extends OUIAProps, supports ouiaId and ouiaSafe, defaults safe mode to true, and spreads generated OUIA attributes onto the root container.
OUIA validation and documentation
packages/react-core/src/components/ExpandableSection/__tests__/ExpandableSection.test.tsx, packages/react-core/src/helpers/OUIA/OUIA.md
Tests verify OUIA IDs, component type, and safe-mode values; the component is added to the OUIA guide.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR adds OUIA prop support and tests for ExpandableSection, matching issue #12569.
Out of Scope Changes check ✅ Passed The changes stay focused on ExpandableSection OUIA support, related tests, and the matching docs update.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding OUIAProps support to ExpandableSection.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ExpandableSection missing OUIA support

1 participant