Get help with testing, discuss unit testing strategies etc.
It appears that the
waitForComponentQuery method allows for multiple query matches and does not throw a warn/error message when multiple matches are found. Is that correct?
We're using
waitForComponentyQuery in one of our core utility methods and were experiencing failures with a handful of components when we determined that a particular query had multiple matches.
I also noticed that
waitForComponentyQuery uses
instead of (the Ext native)
Thats correct, it expects any results from the query.
What about "isElementVisible"? Does it work incorrectly in some case?
Hmm, that's not what I would've expected. We've got the failOnMultipleComponentMatches flag set to true and expected a failure for multiple matches.
IsElementVisible seems to work well as far as I know; I just expected an Ext native approach for that method.
Well, thats the contract of the method.. May be somewhat contradicting with "failOnMultipleComponentMatches" but that is for selecting a specific target, and "waitForComponentQuery" is waiting for "anything like this query" to appear. You can create your own "waitForSingleComponentQuery" or similar in the test class.
As about the visibility method - the reason is that it should work w/o Ext on the page as well, so we created our own method for that.