From 36f3ea2ebd2516a67df5d7532d4de8be7c3e484b Mon Sep 17 00:00:00 2001 From: markuczy Date: Tue, 25 Jun 2024 14:56:58 +0200 Subject: [PATCH] fix: harness fix --- .../src/lib/harnesses/primeng/p-dropdown.harness.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/angular-testing/src/lib/harnesses/primeng/p-dropdown.harness.ts b/libs/angular-testing/src/lib/harnesses/primeng/p-dropdown.harness.ts index 0dc82ae0..8b83a968 100644 --- a/libs/angular-testing/src/lib/harnesses/primeng/p-dropdown.harness.ts +++ b/libs/angular-testing/src/lib/harnesses/primeng/p-dropdown.harness.ts @@ -44,8 +44,9 @@ export class PDropdownHarness extends ContentContainerComponentHarness { async getDropdownItems() { await this.open() - const dropdownItems = this.locatorForAll(ListItemHarness)() - return await dropdownItems + const rootLocator = this.documentRootLocatorFactory() + const items = await rootLocator.harnessLoaderFor('.p-dropdown-items') + return await items.getAllHarnesses(ListItemHarness) } async getDropdownItem(itemText: string): Promise {