-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
data-attributes #11
Comments
Thank you for creating the issue! Could you tell a bit more about why this is useful for testing? |
sorry for the late reply This is just a nice to have, like I said in the description, with the support for attributes on #6 we can use pass data attributes, but would be easy to use this way, because instead of writing the name of the data attribute with mount(Button, {
attributes: {
'data-attribute-name': true,
},
}); you would be able to pass a camel case name (and therefore, without being a string), like this: mount(Button, {
dataAttributes: {
attributeName: true,
},
}); |
I don't see how the behaviour of the component is tested with dataAttributes. I'm hesitant to add this because i don't want to deviate from Playwright's API unless there is a good reason. |
Closed due to inactivity, feel free to create a new ticket whenever needed |
With the issue #5 (PR #6) we can use any attribute, including data-attribute:
But to facilitate, we could have also a
dataAttribute
parameter:To achieve this we could have a simple function like this:
The text was updated successfully, but these errors were encountered: