Skip to content

Commit

Permalink
test: no duplicates for similar selectors in DOM hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
ro0gr committed Jan 20, 2024
1 parent fca53c4 commit 607f9c4
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test-app/tests/unit/extend/find-many-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,29 @@ module(`Extend | findMany`, function (hooks) {
]);
});

test('ambiguous parent selector', async function (assert) {
const page = create({
scope: 'span',
child: {
scope: '.lorem',
}
});

await render(hbs`
<span>
<span>
<span id="lorem" class="lorem"></span>
</span>
</span>
`);

assert.deepEqual(
findMany(page, '.lorem').map((e) => e.id),
['lorem'],
'single element found'
);
})

module('comma separated selector', function () {
const SELECTOR = 'comma, separated';

Expand Down

0 comments on commit 607f9c4

Please sign in to comment.