Open eng1neer opened 7 years ago
I'm trying to modify Portia's selector generation logic to suit my needs and I stumbled upon a case where a following simple selector test doesn't work as intended (test fails):
test('Simple selector test', function(assert) { const $elements = Ember.$('<body><div id="div1"></div></body>'); const selector = BaseSelectorGenerator.create({ elements: $elements.find('#div1').toArray() }); assert.equal(selector.get('selector'), '#div1'); });
It also does not work if I change the html to <div id="div1"></div>, but starts to work if I change it to <div><div id="div1"></div></div>.
<div id="div1"></div>
<div><div id="div1"></div></div>
Is there a reason for this behavior or is it a bug?
I'm trying to modify Portia's selector generation logic to suit my needs and I stumbled upon a case where a following simple selector test doesn't work as intended (test fails):
It also does not work if I change the html to
<div id="div1"></div>
, but starts to work if I change it to<div><div id="div1"></div></div>
.Is there a reason for this behavior or is it a bug?