find and findAll helpers do not use HTML element context properly
See original GitHub issueIt seems that both the find
and findAll
helpers do not properly use context if you pass in an HTML element. For example:
find('.my-selector', myHTMLElement); // I want to look for .my-selector within myHTMLElement
Instead of looking within myHTMLElement, the helpers seem to look within the first element with myHTMLElement’s selector. When I switch back to using find
from ember-native-dom-helpers, the above code works properly.
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
How to query by text string which contains html tags using ...
This solution can work in simple scenarios, however if it produced the error "Found multiple elements with the text: (_, node) => node....
Read more >Automation in Selenium: Page Object Model and Page Factory
Proper test automation is the key to quality software. Explore maintainable test automation in Selenium, including Page Object model and Page Factory.
Read more >xml.etree.ElementTree — The ElementTree XML API ...
Element.findall() finds only elements with a tag which are direct children of the current element. Element.find() finds the first child with a particular ......
Read more >Parsing HTML: a guide to select the right library
We are not going to see libraries for more specific tasks, ... a visitor and then the parser will call the proper function...
Read more >Leadfoot docs: Source: compat.js - Intern
@deprecated Use the standard Leadfoot APIs. ... elementId) {; warn('Command#' + fromMethod + '(element)', 'Command#find then Command#' + fromMethod + ' ...
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
Yes! That is exactly what I said in https://github.com/emberjs/ember-test-helpers/issues/351#issuecomment-456881507 above, in both of the RFCs (emberjs/rfcs#268 and emberjs/rfcs#232) and in https://github.com/emberjs/ember-test-helpers/issues/278.
https://github.com/emberjs/ember-test-helpers/pull/358 implemented assertions that I was referring to in https://github.com/emberjs/ember-test-helpers/issues/351#issuecomment-456881507. Closing…