Skip to content

<Button> rendered as <Component> in jest snapshots after updating to the latest PatternFly, breaking our tests #3317

@elad661

Description

@elad661

After updating to @patternfly/react-core@3.120.5 (we previously used @patternfly/react-core@3.86.1), every <Button> in our snapshot is now <Component>, and some other components are affected too.

If this was just an issue with the snapshot itself, it wouldn't be a big deal, but it also affects more functional tests that we have, for example finding a button in the shallow rendered component, simulating a click, and checking the result. Now that the snapshot no longer has <Button>, we can't use .find('Button') anymore, as it doesn't find anything.

This means that we can't upgrade to the latest PatternFly, and this blocks us from implementing important features and improvements.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions