diff --git a/ui/main/src/app/business/view/externalAppIframe/externalAppIFrame.view.spec.ts b/ui/main/src/app/business/view/externalAppIframe/externalAppIFrame.view.spec.ts index 698aca9d2d..5490d82a5e 100644 --- a/ui/main/src/app/business/view/externalAppIframe/externalAppIFrame.view.spec.ts +++ b/ui/main/src/app/business/view/externalAppIframe/externalAppIFrame.view.spec.ts @@ -60,6 +60,9 @@ describe('ExternalAppIFrame view ', () => { const userService = new UserService(mockUserServer, logService, new AlertMessageService()); const menuService = new MenuService(configService, userService, logService); globalStyleService = new GlobalStyleService(new UserPreferencesService(), configService, menuService); + + // Mock method not supported in test context + history.replaceState = () => {}; }); // menu1/entry1 ==> https://test/ ==> https://test/?opfab_theme=DAY diff --git a/ui/main/src/app/business/view/externalAppIframe/externalAppIFrame.view.ts b/ui/main/src/app/business/view/externalAppIframe/externalAppIFrame.view.ts index 818b419419..99c94100be 100644 --- a/ui/main/src/app/business/view/externalAppIframe/externalAppIFrame.view.ts +++ b/ui/main/src/app/business/view/externalAppIframe/externalAppIFrame.view.ts @@ -11,10 +11,12 @@ import {ConfigService} from 'app/business/services/config.service'; import {GlobalStyleService} from 'app/business/services/global-style.service'; import {RouterStore} from 'app/business/store/router.store'; import {Observable, ReplaySubject, skip, Subject, takeUntil} from 'rxjs'; +import {environment} from '@env/environment'; export class ExternalAppIFrameView { urlSubject: Subject = new ReplaySubject(1); unsubscribe$: Subject = new Subject(); + private businessConfigUrl = `${environment.url}/#businessconfigparty`; constructor( private configService: ConfigService, @@ -64,9 +66,15 @@ export class ExternalAppIFrameView { url = this.addParamsToUrl(url, deeplinkParams); url = this.addOpfabThemeParamToUrl(url); this.urlSubject.next(url); + this.removeParamsFromCurrentURLInBrowserNavigationBar(menuId,menuEntryId); }); } + + private removeParamsFromCurrentURLInBrowserNavigationBar(menuId:string,menuEntryId:string) { + history.replaceState({},'',this.businessConfigUrl + "/" + menuId + "/" + menuEntryId + "/" ); + } + private addParamsToUrl(url, params) { let newUrl = url; if (params) {