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
Post a Comment