Skip to content

chore(ExpandableSection): Include OUIAProps for ExpandableSection#12570

Open
mshriver wants to merge 2 commits into
patternfly:mainfrom
mshriver:expandable-section-ouia
Open

chore(ExpandableSection): Include OUIAProps for ExpandableSection#12570
mshriver wants to merge 2 commits 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

Summary by CodeRabbit

  • New Features

    • Added Open UI Automation (OUIA) attributes to the Expandable Section component, including standardized component type and support for custom component IDs.
    • Added configurable “safe mode” behavior, defaulting to enabled.
  • Documentation

    • Updated the Open UI Automation component guide to include Expandable Section.
  • Tests

    • Updated snapshots and added OUIA-focused test coverage for component ID, type, and safe-mode rendering.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • packages/react-core/src/components/MultipleFileUpload/__tests__/__snapshots__/MultipleFileUploadStatus.test.tsx.snap is excluded by !**/*.snap

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 31eb600f-9f79-4fa6-944c-43890fb5c58b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

ExpandableSection now accepts OUIA properties, defaults ouiaSafe to true, and applies generated OUIA attributes to its root element. Tests cover IDs, component type, and safe-mode behavior, and 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 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding OUIAProps support to ExpandableSection.
Linked Issues check ✅ Passed The PR adds OUIA support to ExpandableSection as requested in #12569, including props, component wiring, tests, and docs.
Out of Scope Changes check ✅ Passed The changes are aligned with the OUIA support goal; the tests and OUIA.md update are related implementation support, not unrelated scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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.

@rebeccaalpert rebeccaalpert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OUIA stuff looks good, but tests are failing.

@mshriver

Copy link
Copy Markdown
Contributor Author

The failing tests in CI are snapshot tests for the MultipleFileUploadStatus, I've opened #12574 as I saw these unrelated tests failing. Will try to sort why I'm seeing the snapshot tests fail in main.

@mshriver
mshriver force-pushed the expandable-section-ouia branch from 2b4c449 to e243b52 Compare July 22, 2026 19:15
@mshriver

Copy link
Copy Markdown
Contributor Author

/retest

@mshriver

Copy link
Copy Markdown
Contributor Author

I'm unable to replicate the failures in CI in my local environment, and they appear completely unrelated.

Add OUIA attribute support to ExpandableSection for better test automation.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mshriver
mshriver force-pushed the expandable-section-ouia branch from e243b52 to ff5bdfb Compare July 22, 2026 19:51
@rebeccaalpert

Copy link
Copy Markdown
Member

I'm pushing snapshot updates from my local - hopefully that'll get you past.

@rebeccaalpert

rebeccaalpert commented Jul 22, 2026

Copy link
Copy Markdown
Member

Seems good now - MultipleFileUpload uses ExpandableSection under the hood, so test was failing. Will approve if CI passes.

@rebeccaalpert
rebeccaalpert self-requested a review July 22, 2026 20:21
@rebeccaalpert

Copy link
Copy Markdown
Member

One of my colleague @mcoker's favorite incantations is npm run clean and/or git clean -dfx. Maybe try those and do a full yarn install, etc. to see if that works on your end for your other PRs? Otherwise I can push snapshots from my local to unblock them.

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

2 participants