patternfly / patternfly/react-topology
Change data-test-id to something more conventional like data-testid
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
Describe the enhancement or change
A clear and concise description of the request. What is the expected outcome?
I noticed that through this search, there were a few instances of components using data-test-id instead of the conventional data-testid. We want to test these component implementations (for instance, here) through a mock Cypress test, and use our native findByTestId method, which targets the latter selector, not the former. I suspect that there are two ways this can be done:
- Allow props so that the user can add their own test id
- Change the current selector to
data-testid.
Is this request originating from a Red Hat product team? If so, which ones and is there any sort of deadline for this enhancement?
Yes, from the Dashboard Team, however, there is low priority
Any other information?
Jira Issue: PF-4123
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by searching the repository for every use of data-test-id and inspect the affected component implementations, then compare them with the Cypress topology example and its findByTestId usage. Done means the affected selectors support the agreed conventional data-testid behavior, including any required customization path, and the relevant tests can locate the components.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cypress, typescript
- Domain
- frontend, testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100