diff --git a/libs/angular-accelerator/src/lib/components/page-header/page-header.component.html b/libs/angular-accelerator/src/lib/components/page-header/page-header.component.html
index cc3fb36d..e6ad0158 100644
--- a/libs/angular-accelerator/src/lib/components/page-header/page-header.component.html
+++ b/libs/angular-accelerator/src/lib/components/page-header/page-header.component.html
@@ -24,8 +24,8 @@
diff --git a/libs/angular-accelerator/src/lib/components/page-header/page-header.component.spec.ts b/libs/angular-accelerator/src/lib/components/page-header/page-header.component.spec.ts
index ca122a8e..f1498edc 100644
--- a/libs/angular-accelerator/src/lib/components/page-header/page-header.component.spec.ts
+++ b/libs/angular-accelerator/src/lib/components/page-header/page-header.component.spec.ts
@@ -115,13 +115,14 @@ describe('PageHeaderComponent', () => {
it('should check permissions and render buttons accordingly', async () => {
expect(await pageHeaderHarness.getInlineActionButtons()).toHaveLength(0)
- expect(await pageHeaderHarness.getOverflowActionButtons()).toHaveLength(0)
+ expect(await pageHeaderHarness.getOverflowActionMenuButton()).toBeNull()
component.actions = mockActions
expect(await pageHeaderHarness.getInlineActionButtons()).toHaveLength(1)
expect(await pageHeaderHarness.getElementByTitle('My Test Action')).toBeTruthy()
- expect(await pageHeaderHarness.getOverflowActionButtons()).toHaveLength(1)
+ await (await pageHeaderHarness.getOverflowActionMenuButton())?.click()
+ expect(await pageHeaderHarness.getOverFlowMenuItems()).toHaveLength(2)
expect(await pageHeaderHarness.getElementByTitle('More actions')).toBeTruthy()
expect(userServiceSpy).toHaveBeenCalledTimes(3)
})
@@ -132,13 +133,13 @@ describe('PageHeaderComponent', () => {
userServiceSpy.mockReturnValue(false)
expect(await pageHeaderHarness.getInlineActionButtons()).toHaveLength(0)
- expect(await pageHeaderHarness.getOverflowActionButtons()).toHaveLength(0)
+ expect(await pageHeaderHarness.getOverflowActionMenuButton()).toBeNull()
component.actions = mockActions
expect(await pageHeaderHarness.getInlineActionButtons()).toHaveLength(0)
expect(await pageHeaderHarness.getElementByTitle('My Test Action')).toBeFalsy()
- expect(await pageHeaderHarness.getOverflowActionButtons()).toHaveLength(0)
+ expect(await pageHeaderHarness.getOverFlowMenuItems()).toHaveLength(0)
expect(await pageHeaderHarness.getElementByTitle('More actions')).toBeFalsy()
expect(userServiceSpy).toHaveBeenCalledTimes(3)
})
@@ -159,20 +160,15 @@ describe('PageHeaderComponent', () => {
component.objectDetails = objectDetailsWithoutIcons
expect((await pageHeaderHarness.getObjectInfos()).length).toEqual(2)
- const objectDetailLabels = await pageHeaderHarness.getObjectDetailLabels()
- const objectDetailValues = await pageHeaderHarness.getObjectDetailValues()
- const objectDetailIcons = await pageHeaderHarness.getObjectDetailIcons()
- expect(objectDetailLabels.length).toEqual(2)
- expect(objectDetailValues.length).toEqual(2)
- expect(objectDetailIcons.length).toEqual(0)
-
- objectDetailLabels.forEach(async (label, i) => {
- expect(await label.text()).toEqual(objectDetailsWithoutIcons[i].label)
- })
- objectDetailValues.forEach(async (value, i) => {
- expect(await value.text()).toEqual(objectDetailsWithoutIcons[i].value)
- })
+ const firstDetail = await pageHeaderHarness.getObjectInfoByLabel('Venue')
+ expect(await firstDetail?.getLabel()).toEqual('Venue')
+ expect(await firstDetail?.getValue()).toEqual('AIE Munich')
+ expect(await firstDetail?.getIcon()).toBeUndefined()
+ const secondDetail = await pageHeaderHarness.getObjectInfoByLabel('Status')
+ expect(await secondDetail?.getLabel()).toEqual('Status')
+ expect(await secondDetail?.getValue()).toEqual('Confirmed')
+ expect(await secondDetail?.getIcon()).toBeUndefined()
})
it('should render objectDetails with icons as object info in the page header', async () => {
@@ -199,35 +195,31 @@ describe('PageHeaderComponent', () => {
component.objectDetails = objectDetailsWithIcons
expect((await pageHeaderHarness.getObjectInfos()).length).toEqual(4)
- const objectDetailLabels = await pageHeaderHarness.getObjectDetailLabels()
- const objectDetailValues = await pageHeaderHarness.getObjectDetailValues()
- const objectDetailIcons = await pageHeaderHarness.getObjectDetailIcons()
- expect(objectDetailLabels.length).toEqual(4)
- expect(objectDetailValues.length).toEqual(3)
- expect(objectDetailIcons.length).toEqual(2)
-
- objectDetailLabels.forEach(async (label, i) => {
- expect(await label.text()).toEqual(objectDetailsWithIcons[i].label)
- })
-
- objectDetailValues.forEach(async (value, i) => {
- if (objectDetailsWithIcons[i].value) {
- expect(await value.text()).toEqual(objectDetailsWithIcons[i].value)
- }
- })
-
- expect(await objectDetailIcons[0].getAttribute('class')).toEqual(objectDetailsWithIcons[1].icon)
- expect(await objectDetailIcons[1].getAttribute('class')).toEqual(objectDetailsWithIcons[2].icon)
+ const firstDetail = await pageHeaderHarness.getObjectInfoByLabel('Venue')
+ expect(await firstDetail?.getLabel()).toEqual('Venue')
+ expect(await firstDetail?.getValue()).toEqual('AIE Munich')
+ expect(await firstDetail?.getIcon()).toBeUndefined()
+ const secondDetail = await pageHeaderHarness.getObjectInfoByLabel('Status')
+ expect(await secondDetail?.getLabel()).toEqual('Status')
+ expect(await secondDetail?.getValue()).toEqual('Confirmed')
+ expect(await secondDetail?.getIcon()).toEqual(PrimeIcons.CHECK)
+ const thirdDetail = await pageHeaderHarness.getObjectInfoByLabel('Done?')
+ expect(await thirdDetail?.getLabel()).toEqual('Done?')
+ expect(await thirdDetail?.getValue()).toEqual('')
+ expect(await thirdDetail?.getIcon()).toEqual(PrimeIcons.EXCLAMATION_CIRCLE)
+ const fourthDetail = await pageHeaderHarness.getObjectInfoByLabel('Empty')
+ expect(await fourthDetail?.getLabel()).toEqual('Empty')
+ expect(await fourthDetail?.getValue()).toBeUndefined()
+ expect(await fourthDetail?.getIcon()).toBeUndefined()
})
it('should show overflow actions when menu overflow button clicked', async () => {
component.actions = mockActions
- const menuOverflowButtons = await pageHeaderHarness.getOverflowActionButtons()
+ const menuOverflowButton = await pageHeaderHarness.getOverflowActionMenuButton()
- expect(menuOverflowButtons).toBeTruthy()
- expect(menuOverflowButtons.length).toBe(1)
- await menuOverflowButtons[0].click()
+ expect(menuOverflowButton).toBeTruthy()
+ await menuOverflowButton?.click()
const menuItems = await pageHeaderHarness.getOverFlowMenuItems()
expect(menuItems.length).toBe(2)
@@ -240,11 +232,10 @@ describe('PageHeaderComponent', () => {
component.actions = mockActions
- const menuOverflowButtons = await pageHeaderHarness.getOverflowActionButtons()
+ const menuOverflowButton = await pageHeaderHarness.getOverflowActionMenuButton()
- expect(menuOverflowButtons).toBeTruthy()
- expect(menuOverflowButtons.length).toBe(1)
- await menuOverflowButtons[0].click()
+ expect(menuOverflowButton).toBeTruthy()
+ await menuOverflowButton?.click()
const menuItems = await pageHeaderHarness.getOverFlowMenuItems()
expect(menuItems.length).toBe(2)
@@ -259,10 +250,9 @@ describe('PageHeaderComponent', () => {
component.actions = mockActions
- const menuOverflowButton = await pageHeaderHarness.getOverflowActionButtons()
+ const menuOverflowButton = await pageHeaderHarness.getOverflowActionMenuButton()
expect(menuOverflowButton).toBeTruthy()
- expect(menuOverflowButton.length).toBe(1)
- menuOverflowButton[0].click()
+ await menuOverflowButton?.click()
const overFlowMenuItems = await pageHeaderHarness.getOverFlowMenuItems()
const disabledActionElement = overFlowMenuItems[1]
diff --git a/libs/angular-accelerator/testing/group-by-count-diagram.harness.ts b/libs/angular-accelerator/testing/group-by-count-diagram.harness.ts
new file mode 100644
index 00000000..6062b253
--- /dev/null
+++ b/libs/angular-accelerator/testing/group-by-count-diagram.harness.ts
@@ -0,0 +1,8 @@
+import { ComponentHarness } from '@angular/cdk/testing'
+import { DiagramHarness } from './diagram.harness'
+
+export class GroupByCountDiagramHarness extends ComponentHarness {
+ static hostSelector = 'ocx-group-by-count-diagram'
+
+ getDiagram = this.locatorFor(DiagramHarness)
+}
\ No newline at end of file
diff --git a/libs/angular-accelerator/testing/index.ts b/libs/angular-accelerator/testing/index.ts
index 9fee1c87..65912d3e 100644
--- a/libs/angular-accelerator/testing/index.ts
+++ b/libs/angular-accelerator/testing/index.ts
@@ -7,10 +7,12 @@ export * from './data-view.harness'
export * from './default-grid-item.harness'
export * from './default-list-item.harness'
export * from './diagram.harness'
+export * from './group-by-count-diagram.harness'
export * from './interactive-data-view.harness'
export * from './more-actions-menu-button.harness'
export * from './page-header.harness'
export * from './search-config.harness'
+export * from './search-header.harness'
export * from '@angular/cdk/testing'
export * from '@angular/cdk/testing/testbed'
diff --git a/libs/angular-accelerator/testing/page-header.harness.ts b/libs/angular-accelerator/testing/page-header.harness.ts
index 8c26aa2c..9938bb51 100644
--- a/libs/angular-accelerator/testing/page-header.harness.ts
+++ b/libs/angular-accelerator/testing/page-header.harness.ts
@@ -1,42 +1,104 @@
-import { ComponentHarness } from '@angular/cdk/testing'
-import { PMenuHarness } from '@onecx/angular-testing'
+import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing'
+import {
+ ListItemHarness,
+ MenuItemHarness,
+ PBreadcrumbHarness,
+ PButtonHarness,
+ PMenuHarness,
+} from '@onecx/angular-testing'
export class PageHeaderHarness extends ComponentHarness {
static hostSelector = 'ocx-page-header'
getPageHeaderWrapperHarness = this.locatorForAll('[name="ocx-page-header-wrapper"]')
+ getBreadcrumb = this.locatorForOptional(PBreadcrumbHarness)
+ getMenu = this.locatorForOptional(PMenuHarness)
- async getInlineActionButtons() {
- return await this.locatorForAll('[name="ocx-page-header-inline-action-button"]')()
+ async getElementByTitle(title: string) {
+ return await this.locatorForOptional(`[title="${title}"]`)()
}
- async getOverflowActionButtons() {
- return await this.locatorForAll('[name="ocx-page-header-overflow-action-button"]')()
+ async getObjectInfos() {
+ return await this.locatorForAll(ObjectDetailItemHarness)()
}
- async getElementByTitle(title: string) {
- return await this.locatorForOptional(`[title="${title}"]`)()
+ async getObjectInfoByLabel(objectInfolabel: string) {
+ return await this.locatorForOptional(ObjectDetailItemHarness.with({ label: objectInfolabel }))()
}
- async getObjectInfos() {
- return await this.locatorForAll('.object-info')()
+ async getInlineActionButtons() {
+ const inlineActionButtons = await this.locatorForAll(
+ PButtonHarness.with({ name: 'ocx-page-header-inline-action-button' })
+ )()
+ const inlineActionIconButtons = await this.locatorForAll(
+ PButtonHarness.with({ name: 'ocx-page-header-inline-action-icon-button' })
+ )()
+ return inlineActionButtons.concat(inlineActionIconButtons)
}
- async getObjectDetailLabels() {
- return await this.locatorForAll('[name="object-detail-label"]')()
+ async getInlineActionButtonByLabel(buttonLabel: string) {
+ return await this.locatorForOptional(PButtonHarness.with({ label: buttonLabel }))()
}
- async getObjectDetailValues() {
- return await this.locatorForAll('[name="object-detail-value"]')()
+ async getInlineActionButtonByIcon(buttonIcon: string) {
+ return await this.locatorForOptional(PButtonHarness.with({ icon: buttonIcon }))()
}
- async getObjectDetailIcons() {
- return await this.locatorForAll('[name="object-detail-icon"]')()
+ async getOverflowActionMenuButton() {
+ return await this.locatorForOptional('[name="ocx-page-header-overflow-action-button"]')()
}
async getOverFlowMenuItems() {
- const menu = await this.locatorFor(PMenuHarness)()
- const menuItems = await menu.getAllMenuItems()
+ const menu = await this.getMenu()
+ const menuItems = await menu?.getAllMenuItems()
return menuItems ?? []
}
+
+ async getOverFlowMenuItem(itemText: string): Promise
{
+ const menu = await this.getMenu()
+ return await menu?.getMenuItem(itemText)
+ }
+
+ async getBreadcrumbItem(itemText: string): Promise {
+ const breadcrumb = await this.getBreadcrumb()
+ return await breadcrumb?.getBreadcrumbItem(itemText)
+ }
+
+ async getHeaderText(): Promise {
+ return await (await this.locatorForOptional('#page-header')())?.text()
+ }
+
+ async getSubheaderText(): Promise {
+ return await (await this.locatorForOptional('#page-subheader')())?.text()
+ }
+}
+
+interface ObjectDetailItemHarnessFilters extends BaseHarnessFilters {
+ label?: string
+}
+
+class ObjectDetailItemHarness extends ComponentHarness {
+ static hostSelector = '.object-info'
+
+ getLabelElement = this.locatorFor('[name="object-detail-label"]')
+ getValueElement = this.locatorForOptional('[name="object-detail-value"]')
+ getIconElement = this.locatorForOptional('[name="object-detail-icon"]')
+
+ static with(options: ObjectDetailItemHarnessFilters): HarnessPredicate {
+ return new HarnessPredicate(ObjectDetailItemHarness, options).addOption('label', options.label, (harness, label) =>
+ HarnessPredicate.stringMatches(harness.getLabel(), label)
+ )
+ }
+
+ async getLabel() {
+ return (await this.getLabelElement()).text()
+ }
+
+ async getValue() {
+ return (await this.getValueElement())?.text()
+ }
+
+ async getIcon() {
+ return (await this.getIconElement())?.getAttribute('class')
+ }
}
diff --git a/libs/portal-integration-angular/testing/search-header.harness.ts b/libs/angular-accelerator/testing/search-header.harness.ts
similarity index 59%
rename from libs/portal-integration-angular/testing/search-header.harness.ts
rename to libs/angular-accelerator/testing/search-header.harness.ts
index d15ffbb9..941634ad 100644
--- a/libs/portal-integration-angular/testing/search-header.harness.ts
+++ b/libs/angular-accelerator/testing/search-header.harness.ts
@@ -1,10 +1,14 @@
-import { ContentContainerComponentHarness } from '@angular/cdk/testing'
-import { MoreActionsMenuButtonHarness } from '@onecx/angular-accelerator/testing'
-import { ButtonHarness, PButtonHarness } from '@onecx/angular-testing'
+import { ComponentHarness } from '@angular/cdk/testing'
+import { PButtonHarness } from '@onecx/angular-testing'
+import { PageHeaderHarness } from './page-header.harness'
+import { SearchConfigHarness } from './search-config.harness'
+import { MoreActionsMenuButtonHarness } from './more-actions-menu-button.harness'
-export class SearchHeaderHarness extends ContentContainerComponentHarness {
+export class SearchHeaderHarness extends ComponentHarness {
static hostSelector = 'ocx-search-header'
+ getPageHeader = this.locatorFor(PageHeaderHarness)
+ getSearchConfig = this.locatorFor(SearchConfigHarness)
getSearchButton = this.locatorFor(
PButtonHarness.with({
id: 'searchButton',
@@ -18,19 +22,19 @@ export class SearchHeaderHarness extends ContentContainerComponentHarness {
)
getSimpleAdvancedButton = this.locatorForOptional(
- ButtonHarness.with({
+ PButtonHarness.with({
id: 'simpleAdvancedButton',
})
)
getMoreActionsMenuButton = this.locatorForOptional(MoreActionsMenuButtonHarness)
- async search() {
- await (await this.getSearchButton()).click()
+ async clickResetButton() {
+ await (await this.getResetButton()).click()
}
- async reset() {
- await (await this.getResetButton()).click()
+ async clickSearchButton() {
+ await (await this.getSearchButton()).click()
}
async toggleSimpleAdvanced() {
diff --git a/libs/angular-testing/src/index.ts b/libs/angular-testing/src/index.ts
index 72b8e8fc..bcda0e94 100644
--- a/libs/angular-testing/src/index.ts
+++ b/libs/angular-testing/src/index.ts
@@ -1,3 +1,4 @@
+export * from './lib/harnesses/primeng/p-breadcrumb.harness'
export * from './lib/harnesses/primeng/p-button-directive.harness'
export * from './lib/harnesses/primeng/p-button.harness'
export * from './lib/harnesses/primeng/p-chart.harness'
diff --git a/libs/angular-testing/src/lib/harnesses/list-item.harness.ts b/libs/angular-testing/src/lib/harnesses/list-item.harness.ts
index e94bbcbc..3b070ca0 100644
--- a/libs/angular-testing/src/lib/harnesses/list-item.harness.ts
+++ b/libs/angular-testing/src/lib/harnesses/list-item.harness.ts
@@ -1,8 +1,18 @@
-import { ComponentHarness } from '@angular/cdk/testing'
+import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing'
+
+export interface ListItemHarnessFilters extends BaseHarnessFilters {
+ text?: string
+}
export class ListItemHarness extends ComponentHarness {
static hostSelector = 'li'
+ static with(options: ListItemHarnessFilters): HarnessPredicate {
+ return new HarnessPredicate(ListItemHarness, options).addOption('text', options.text, (harness, text) =>
+ HarnessPredicate.stringMatches(harness.getText(), text)
+ )
+ }
+
async getText() {
return await (await this.host()).text()
}
diff --git a/libs/angular-testing/src/lib/harnesses/menu-item.harness.ts b/libs/angular-testing/src/lib/harnesses/menu-item.harness.ts
index f22e8a2d..94b191c9 100644
--- a/libs/angular-testing/src/lib/harnesses/menu-item.harness.ts
+++ b/libs/angular-testing/src/lib/harnesses/menu-item.harness.ts
@@ -1,8 +1,18 @@
-import { ComponentHarness } from '@angular/cdk/testing'
+import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing'
+
+export interface MenuItemHarnessFilters extends BaseHarnessFilters {
+ text?: string
+}
export class MenuItemHarness extends ComponentHarness {
static hostSelector = 'li > a'
+ static with(options: MenuItemHarnessFilters): HarnessPredicate {
+ return new HarnessPredicate(MenuItemHarness, options).addOption('text', options.text, (harness, text) =>
+ HarnessPredicate.stringMatches(harness.getText(), text)
+ )
+ }
+
async getText() {
return await (await this.host()).text()
}
diff --git a/libs/angular-testing/src/lib/harnesses/primeng/p-breadcrumb.harness.ts b/libs/angular-testing/src/lib/harnesses/primeng/p-breadcrumb.harness.ts
new file mode 100644
index 00000000..b2f12a2b
--- /dev/null
+++ b/libs/angular-testing/src/lib/harnesses/primeng/p-breadcrumb.harness.ts
@@ -0,0 +1,12 @@
+import { ComponentHarness } from '@angular/cdk/testing'
+import { ListItemHarness } from '../list-item.harness'
+
+export class PBreadcrumbHarness extends ComponentHarness {
+ static hostSelector = 'p-breadcrumb'
+
+ getBreadcrumbItems = this.locatorForAll(ListItemHarness)
+
+ async getBreadcrumbItem(itemText: string): Promise {
+ return await this.locatorForOptional(ListItemHarness.with({ text: itemText }))()
+ }
+}
diff --git a/libs/angular-testing/src/lib/harnesses/primeng/p-button.harness.ts b/libs/angular-testing/src/lib/harnesses/primeng/p-button.harness.ts
index 517cbe7f..d938ac9c 100644
--- a/libs/angular-testing/src/lib/harnesses/primeng/p-button.harness.ts
+++ b/libs/angular-testing/src/lib/harnesses/primeng/p-button.harness.ts
@@ -2,19 +2,37 @@ import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular
export interface PButtonHarnessFilters extends BaseHarnessFilters {
id?: string
+ name?: string
+ label?: string
+ icon?: string
}
+
export class PButtonHarness extends ComponentHarness {
static hostSelector = 'p-button'
static with(options: PButtonHarnessFilters): HarnessPredicate {
- return new HarnessPredicate(PButtonHarness, options).addOption('id', options.id, (harness, id) =>
- HarnessPredicate.stringMatches(harness.getId(), id)
- )
+ return new HarnessPredicate(PButtonHarness, options)
+ .addOption('id', options.id, (harness, id) => HarnessPredicate.stringMatches(harness.getId(), id))
+ .addOption('name', options.name, (harness, name) => HarnessPredicate.stringMatches(harness.getName(), name))
+ .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label))
+ .addOption('icon', options.icon, (harness, icon) => HarnessPredicate.stringMatches(harness.getIcon(), icon))
}
async getId(): Promise {
return await (await this.host()).getAttribute('id')
}
+ async getName(): Promise {
+ return await (await this.host()).getAttribute('name')
+ }
+
+ async getLabel(): Promise {
+ return await (await this.host()).text()
+ }
+
+ async getIcon(): Promise {
+ return await (await this.host()).getAttribute('ng-reflect-icon')
+ }
+
async click() {
await (await this.locatorFor('button')()).click()
}
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 37444542..0dc82ae0 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
@@ -48,6 +48,10 @@ export class PDropdownHarness extends ContentContainerComponentHarness {
return await dropdownItems
}
+ async getDropdownItem(itemText: string): Promise {
+ return await this.locatorForOptional(ListItemHarness.with({ text: itemText }))()
+ }
+
async selectedDropdownItem(position: number) {
const selectedColumnGroup = await Promise.all(
(await this.getDropdownItems()).filter((listItem) => listItem.isSelected())
@@ -62,4 +66,12 @@ export class PDropdownHarness extends ContentContainerComponentHarness {
async hasClearOption() {
return (await this.locatorFor('div')()).hasClass('p-dropdown-clearable')
}
+
+ async clear() {
+ if (await this.hasClearOption()) {
+ return await (await this.locatorFor('.p-dropdown-clear-icon')()).click()
+ } else {
+ console.warn('Unable to clear dropdown, because it has no clear option')
+ }
+ }
}
diff --git a/libs/angular-testing/src/lib/harnesses/primeng/p-menu.harness.ts b/libs/angular-testing/src/lib/harnesses/primeng/p-menu.harness.ts
index 4f7d2839..9d8e432d 100644
--- a/libs/angular-testing/src/lib/harnesses/primeng/p-menu.harness.ts
+++ b/libs/angular-testing/src/lib/harnesses/primeng/p-menu.harness.ts
@@ -20,4 +20,15 @@ export class PMenuHarness extends ContentContainerComponentHarness {
}
return []
}
+
+ async getMenuItem(itemText: string): Promise {
+ if (await this.isOpen()) {
+ return await (
+ await this.getHarnessLoaderForPMenuOverlay()
+ )?.getHarnessOrNull(MenuItemHarness.with({ text: itemText }))
+ } else {
+ console.warn('Cannot get menu items because menu is closed.')
+ }
+ return undefined
+ }
}
diff --git a/libs/portal-integration-angular/testing/index.ts b/libs/portal-integration-angular/testing/index.ts
index 244bf217..5fcca82e 100644
--- a/libs/portal-integration-angular/testing/index.ts
+++ b/libs/portal-integration-angular/testing/index.ts
@@ -4,7 +4,6 @@ export * from './content.harness'
export * from './create-or-edit-search-config-dialog.harness'
export * from './dialog-message-content.harness'
export * from './lifecycle.harness'
-export * from './search-header.harness'
export * from '@angular/cdk/testing'
export * from '@angular/cdk/testing/testbed'