From fe443ad92d87bcc64d4f949889e33c02e31e65ea Mon Sep 17 00:00:00 2001 From: Yasa-Nataliya Date: Tue, 9 May 2023 05:22:29 +0000 Subject: [PATCH] fix for e2e --- .../extensibility-configs/header-ext.json | 27 +++++++++++++++++++ .../src/lib/services/app.extension.service.ts | 13 +-------- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/e2e/resources/extensibility-configs/header-ext.json b/e2e/resources/extensibility-configs/header-ext.json index 9d044d8e3..24585c514 100644 --- a/e2e/resources/extensibility-configs/header-ext.json +++ b/e2e/resources/extensibility-configs/header-ext.json @@ -64,6 +64,33 @@ "type": "separator", "order": 199 }, + { + "id": "settings", + "title": "App settings", + "description": "Application settings", + "icon": "settings", + "disabled": true, + "order": 10, + "actions": { + "click": "app.actions.settings" + }, + "rules": { + "visible": "app.navigation.isNotTrashcan" + } + }, + { + "id": "button", + "title": "New Button", + "description": "new button description", + "icon": "alarm_on", + "order": 20, + "actions": { + "click": "app.actions.settings" + }, + "rules": { + "visible": "app.navigation.isNotTrashcan" + } + }, { "id": "app.logout", "order": 200, diff --git a/projects/aca-shared/src/lib/services/app.extension.service.ts b/projects/aca-shared/src/lib/services/app.extension.service.ts index abfff8837..88c20a48b 100644 --- a/projects/aca-shared/src/lib/services/app.extension.service.ts +++ b/projects/aca-shared/src/lib/services/app.extension.service.ts @@ -459,18 +459,7 @@ export class AppExtensionService implements RuleContext { } getMoreActions(): Observable> { - return this._moreActions.pipe( - map((moreActions) => - moreActions - .filter((action) => this.filterVisible(action)) - .map((action) => this.copyAction(action)) - .map((action) => this.buildMenu(action)) - .map((action) => this.setActionDisabledFromRule(action)) - .sort(sortByOrder) - .reduce(reduceEmptyMenus, []) - .reduce(reduceSeparators, []) - ) - ); + return this._moreActions.pipe(map((moreActions) => this.getAllowedActions(moreActions))); } getAllowedContextMenuActions(): Observable> {