From 607f9c4ae667e4eebebdba95be621cc8d08c6dfe Mon Sep 17 00:00:00 2001 From: Ruslan Hrabovyi Date: Thu, 26 Oct 2023 00:02:51 +0200 Subject: [PATCH] test: no duplicates for similar selectors in DOM hierarchy --- test-app/tests/unit/extend/find-many-test.ts | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/test-app/tests/unit/extend/find-many-test.ts b/test-app/tests/unit/extend/find-many-test.ts index ffc683e5..78e6e1f1 100644 --- a/test-app/tests/unit/extend/find-many-test.ts +++ b/test-app/tests/unit/extend/find-many-test.ts @@ -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` + + + + + + `); + + assert.deepEqual( + findMany(page, '.lorem').map((e) => e.id), + ['lorem'], + 'single element found' + ); + }) + module('comma separated selector', function () { const SELECTOR = 'comma, separated';