ID inheritance for E2E testing
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.9k
- Forks
- 1.1k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 57
Description
Package
v4.x
Description
Hello
We are currently using PlayWright for E2E testing.
We are aware of data-testid attribute, but placing it everywhere and maintaing will be hell.
For easier dev exp. and test, it would be very cool for children component of parent inherit the id of parent and assign it in their own dynamic one.
For example we set USelect id = "countries", so USelect options would have id="reka-combobox-item-countries-0" etc.
Or in case of usage of multiple language localization in project, we would just access data-value if not id. That covers combobox , listbox, tabs items.
Additional context
No response
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 tracing the USelect implementation and its combobox, listbox, and tabs item components. Check how Playwright E2E tests currently locate these elements; done means a parent id such as "countries" produces predictable child ids or usable data-value selectors without placing data-testid attributes everywhere.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- playwright, typescript
- Domain
- frontend, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100