patternfly / patternfly/react-topology

Change data-test-id to something more conventional like data-testid

Open
#316 2 comments 0 reactions 0 assignees View on GitHub

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:

  1. Allow props so that the user can add their own test id
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.