-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: getByTestIdOrAriaLabel does not work data-testid #825
Comments
Thanks for creating this issue @tracy-french! The intent of this method is to provide a safe way to use If you have defined The method name |
I think the |
Great, I'll put up a PR that changes the name. We can mark |
IMHO whilst the package is on a major zero I don't think there's a need to deprecate things, rather I'd vote to rip it out now. Major zero signifies that the package is in active development and breaking changes can and will happen. This allows us to remove any cruft as it evolves into the api we want to give to consumers without the risk of something deprecated arriving in the 1.0.0 release. |
Yes let's do it! I'm updating the PR. |
Which package(s) does this bug affect?
Package versions
What happened?
It's not possible to use
getByTestIdOrAriaLabel
with adata-testid
. The method requires you to call it likegetByTestIdOrAriaLabel('data-testid="my-id"')
to usedata-testid
, but the method incorrectly creates the selector as[data-testid="data-testid="my-id""]
.You can see the bug at
plugin-tools/packages/plugin-e2e/src/models/pages/GrafanaPage.ts
Line 30 in 8be2f92
What you expected to happen
The method should create the selector as
[data-testid="my-id"]
.How to reproduce it (as minimally and precisely as possible)
Use the method with a
data-testid
.Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: