Skip to content

Avoid using getByTestId #28

@arbrandes

Description

@arbrandes

Since this is a new MFE, it should reflect modern standards as much as possible. One of these is the React Testing Library query priority, which states the following:

"getByTestId: The user cannot see (or hear) these, so this is only recommended for cases where you can't match by role or text or it doesn't make sense (e.g. the text is dynamic)."

In other words, we should scour unit tests in this MFE and make sure we're not using getByTestId (or findByTestId, etc) unless absolutely necessary.

Previous PRs where I asked for this change:

Metadata

Metadata

Labels

bugReport of or fix for something that isn't working as intendedcode healthProactive technical investment via refactorings, removals, etc.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions