diff --git a/packages/host/tests/integration/components/prerendered-card-search-test.gts b/packages/host/tests/integration/components/prerendered-card-search-test.gts index 6cd2dbe27f..7a483507fb 100644 --- a/packages/host/tests/integration/components/prerendered-card-search-test.gts +++ b/packages/host/tests/integration/components/prerendered-card-search-test.gts @@ -414,4 +414,70 @@ module(`Integration | prerendered-card-search`, function (hooks) { .dom('.card-container:nth-child(1)') .containsText('Cardy Stackington Jr. III'); }); + + test(`can parse objects in nested array`, async function (assert) { + let query: Query = { + filter: { + on: { + module: `${testRealmURL}book`, + name: 'Book', + }, + every: [ + { + eq: { + 'author.firstName': 'Cardy', + }, + }, + { + any: [ + { + eq: { + 'author.lastName': 'Jones', + }, + }, + { + eq: { + 'author.lastName': 'Stackington Jr. III', + }, + }, + ], + }, + ], + }, + sort: [ + { + by: 'author.lastName', + on: { module: `${testRealmURL}book`, name: 'Book' }, + }, + ], + }; + let realms = [testRealmURL]; + await render(); + await waitFor('.card-container'); + assert.dom('.card-container').exists({ count: 2 }); + assert + .dom('.card-container:nth-child(2)') + .containsText('Cardy Stackington Jr. III'); + assert.dom('.card-container:nth-child(1)').containsText('Cardy Jones'); + }); });