microsoft / microsoft/playwright
[Feature] ignoreOrder option for toHaveText
Open
feature-expect
P3-collecting-feedback
- Dominant language
- TypeScript
- Stars
- 96.3k
- Forks
- 6.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 180
Description
Let us know what functionality you'd like to see in Playwright and what your use case is.
Do you think others might benefit from this as well?
I would like to be able to assert with a locator that returns a list and not care about the order
`await expect(locator).toHaveText([1, 3, 2], ignoreOrder: true)`
Contributor guide
Research direction
Start at the toHaveText locator assertion API and inspect how list expectations currently compare text values and order. Add the requested ignoreOrder behavior for list assertions, then verify that a locator returning the same values in a different order passes while mismatched values do not.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100