Data Test Attribute Not Always Appearing When Specified
See original GitHub issueWhen I try to add a data-test attribute to an element, it doesn’t appear on the element in the test build unless assigning it a value of “true”.
For example:
This does not work
<h2 class="summary-name" data-test-campaign-summary-name>{{campaign.name}}</h2>
This does work
<h2 class="summary-name" data-test-campaign-summary-name="true">{{campaign.name}}</h2>
Using the following versions:
Ember: 2.12.1 Ember Data: 2.12.2 jQuery: 3.2.1 Ember Simple Auth: 1.2.2 Model Fragments: 2.11.2
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Data-id attribute not showing up when added to display:none ...
And weirdly enough, when I change the display:none to display:show, the data-id attribute will be visible as part of the div. It also...
Read more >Using data attributes - Learn web development | MDN
data -* attributes allow us to store extra information on standard, semantic HTML elements without other hacks such as non-standard attributes, ...
Read more >Removing data-test Attributes from React Production DOM
Because of this, we want to remove the data-test attributes during the build process so our final DOM is clean and data-test attribute...
Read more >Block attributes do not display as expected in AutoCAD
Attributes of some Block objects are not displayed as expected in AutoCAD, while they are displayed correctly inside Block Editor.
Read more >Don't use data attributes to find HTML elements with JS - intuio
The first thing is “there are no more appropriate attributes or elements” and for specific data that corresponds to a specific (and not...
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
Since clearing the async cache appears to fix the issue I’m expecting https://github.com/simplabs/ember-test-selectors/pull/128 to have resolved it too. Please let use know if you still have any issues with the current release.
I was also having this issue, and clearing out my
$TMPDIR/if-you-need-to-delete-this-open-an-issue-async-disk-cache
got the attrs to start appearing again.Ember v2.13.0, latest version of this addon.