test-data-* does not work when "tagName: ''" inside a component
See original GitHub issueUnfortunately the automatic attribute binding of data-test-*
does not work when tagName=''
in a component such as ember-power-select
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
test-data-* does not work when "tagName: ''" inside a component
I think what we should probably do is log a warning like "You're trying to bind a data-test-* attribute to a tagless component....
Read more >How to set the tagName of an Ember component based data ...
This doesn't work though. The W3C specifies that you can't change the tagName of an element, so I can see why binding a...
Read more >Test Utilities - React
Finds all DOM elements of components in the rendered tree that are DOM components with the tag name matching tagName . findRenderedDOMComponentWithTag().
Read more >Component testing scenarios - Angular
For a use case in which TestBed.inject() does not work, see the Override component providers section that explains when and why you must...
Read more >Best Practices - Cypress Documentation
Organizing Tests, Logging In, Controlling State; Selecting Elements ... Don't target elements based on CSS attributes such as: id , class , tag;...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That would actually change the component’s rendered HTML though which would likely result in display errors when we strip the
data-test-*
attributes in production and the component doesn’t get wrapped in the extradiv
orspan
.I think what we should probably do is log a warning like “You’re trying to bind a data-test-* attribute to a tagless component. The attribute will not be bound actually as there is no tag to bind it to.”.
@marcoow sounds good.