jasmine - Find component using CSS selector in TestUtils -


i'm writing simple tests react components using testutils , i'm finding both testutils.findrendereddomcomponentwithclass , testutils.findrendereddomcomponentwithtag methods pretty limiting. i'd find component using typical css selector (i.e. tag.class [attr]) doesn't seem option.

is there simple way find element specific attribute? if not there useful tools finding components apart testutils?

i find useful use browser's element.queryselector()/queryselectorall() method on dom elements.

you can call example this:

var domelement = findrendereddomcomponentwithclass('myclass'); var firsttextinput = domelement.queryselector('input[type="text"]'); 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -