diff --git a/container/cypress/e2e/test-app/compound/wc-compound-container.cy.js b/container/cypress/e2e/test-app/compound/wc-compound-container.cy.js
index ed5894b384..494d7788cd 100644
--- a/container/cypress/e2e/test-app/compound/wc-compound-container.cy.js
+++ b/container/cypress/e2e/test-app/compound/wc-compound-container.cy.js
@@ -224,5 +224,28 @@ describe('Compound Container Tests', () => {
);
});
});
+
+ it('LuigiClient API uxManagerChainRequests', () => {
+ const alertMessages = [
+ 'LuigiClient.uxManager().openUserSettings()',
+ 'LuigiClient.uxManager().closeUserSettings()',
+ 'LuigiClient.uxManager().removeBackdrop()',
+ 'LuigiClient.uxManager().collapseLeftSideNav()',
+ 'LuigiClient.uxManager().hideAppLoadingIndicator()',
+ 'LuigiClient.uxManager().getDocumentTitle()=my-title'
+ ];
+
+ cy.on('window:alert', stub);
+
+ cy.get(containerSelector)
+ .shadow()
+ .get('#uxManagerManyRequests')
+ .click()
+ .then(() => {
+ alertMessages.forEach((msg, index) => {
+ expect(stub.getCall(index)).to.be.calledWith(msg);
+ });
+ });
+ });
});
});
diff --git a/container/cypress/e2e/test-app/wc/wc-container.cy.js b/container/cypress/e2e/test-app/wc/wc-container.cy.js
index 608cbaf424..a6e4916d65 100644
--- a/container/cypress/e2e/test-app/wc/wc-container.cy.js
+++ b/container/cypress/e2e/test-app/wc/wc-container.cy.js
@@ -185,5 +185,28 @@ describe('Web Container Test', () => {
expect(stub.getCall(0)).to.be.calledWith('My Custom Message from Microfrontend');
});
});
+
+ it('LuigiClient API uxManagerChainRequests', () => {
+ const alertMessages = [
+ 'LuigiClient.uxManager().openUserSettings()',
+ 'LuigiClient.uxManager().closeUserSettings()',
+ 'LuigiClient.uxManager().removeBackdrop()',
+ 'LuigiClient.uxManager().collapseLeftSideNav()',
+ 'LuigiClient.uxManager().hideAppLoadingIndicator()',
+ 'LuigiClient.uxManager().getDocumentTitle()=my-title'
+ ];
+
+ cy.on('window:alert', stub);
+
+ cy.get(containerSelector)
+ .shadow()
+ .get('#uxManagerManyRequests')
+ .click()
+ .then(() => {
+ alertMessages.forEach((msg, index) => {
+ expect(stub.getCall(index)).to.be.calledWith(msg);
+ });
+ });
+ });
});
});
diff --git a/container/test-app/compound/compoundClientAPI.html b/container/test-app/compound/compoundClientAPI.html
index 134e3b1f02..9071cc17e2 100644
--- a/container/test-app/compound/compoundClientAPI.html
+++ b/container/test-app/compound/compoundClientAPI.html
@@ -194,35 +194,38 @@
compoundContainer.addEventListener(MFEventID.SET_ANCHOR_LINK_REQUEST, event => {
console.log('anchor', event.detail);
});
-
- // uxManager(). closeUserSettings openUserSettings collapseLeftSideNav
- // setDocumentTitle removeBackdrop hideAppLoadingIndicator
+ compoundContainer.addEventListener(MFEventID.OPEN_USER_SETTINGS_REQUEST, event => {
+ console.log('Open User Settings Request received', event.detail);
+ alert('LuigiClient.uxManager().openUserSettings()');
+ });
compoundContainer.addEventListener(MFEventID.CLOSE_USER_SETTINGS_REQUEST, event => {
console.log('Close User Settings Request received', event.detail);
+ alert('LuigiClient.uxManager().closeUserSettings()');
});
- compoundContainer.addEventListener(MFEventID.OPEN_USER_SETTINGS_REQUEST, event => {
- console.log('Open User Settings Request received', event.detail);
+ compoundContainer.addEventListener(MFEventID.REMOVE_BACKDROP_REQUEST, event => {
+ console.log('Remove Backdrop Request received', event.detail);
+ alert('LuigiClient.uxManager().removeBackdrop()');
});
compoundContainer.addEventListener(MFEventID.COLLAPSE_LEFT_NAV_REQUEST, event => {
console.log('Collapse Left Side Nav Request received', event.detail);
+ alert('LuigiClient.uxManager().collapseLeftSideNav()');
});
compoundContainer.addEventListener(MFEventID.SET_DOCUMENT_TITLE_REQUEST, event => {
console.log('Set Document Title Request received', event.detail);
- });
- compoundContainer.addEventListener(MFEventID.REMOVE_BACKDROP_REQUEST, event => {
- console.log('Remove Backdrop Request received', event.detail);
+ compoundContainer.documentTitle = event.detail;
});
compoundContainer.addEventListener(
MFEventID.HIDE_LOADING_INDICATOR_REQUEST,
event => {
console.log('Hide Loading Indicator Request received', event.detail);
+ alert('LuigiClient.uxManager().hideAppLoadingIndicator()');
}
);
// linkManager listeners:
// path exists
compoundContainer.addEventListener(MFEventID.PATH_EXISTS_REQUEST, event => {
- console.log('Remove Backdrop Request received', event.detail, event);
+ console.log('Path Exists Request received', event.detail, event);
// send back result with defined 'callback'
// event: MFEventID.PathExistsEvent can be used as an event type to get the callback function
event.callback(true);
diff --git a/container/test-app/compound/helloWorldWC.js b/container/test-app/compound/helloWorldWC.js
index 265ed9b199..422d1270f5 100644
--- a/container/test-app/compound/helloWorldWC.js
+++ b/container/test-app/compound/helloWorldWC.js
@@ -267,12 +267,12 @@ export default class extends HTMLElement {
this.$uxManagerManyRequests = this._shadowRoot.querySelector('#uxManagerManyRequests');
this.$uxManagerManyRequests.addEventListener('click', () => {
- this.LuigiClient.uxManager().closeUserSettings();
this.LuigiClient.uxManager().openUserSettings();
- this.LuigiClient.uxManager().collapseLeftSideNav();
- this.LuigiClient.uxManager().setDocumentTitle('my-title');
+ this.LuigiClient.uxManager().closeUserSettings();
this.LuigiClient.uxManager().removeBackdrop();
+ this.LuigiClient.uxManager().collapseLeftSideNav();
this.LuigiClient.uxManager().hideAppLoadingIndicator();
+ this.LuigiClient.uxManager().setDocumentTitle('my-title');
this.LuigiClient.uxManager().showAlert({
text: 'LuigiClient.uxManager().getDocumentTitle()=' + this.LuigiClient.uxManager().getDocumentTitle(),
type: 'info'
diff --git a/container/test-app/wc/clientAPI.html b/container/test-app/wc/clientAPI.html
index 2685fe82c2..7944f307cf 100644
--- a/container/test-app/wc/clientAPI.html
+++ b/container/test-app/wc/clientAPI.html
@@ -123,35 +123,38 @@
luigiContainer.addEventListener(MFEventID.SET_ANCHOR_LINK_REQUEST, event => {
console.log('anchor', event.detail);
});
-
- // uxManager(). closeUserSettings openUserSettings collapseLeftSideNav
- // setDocumentTitle removeBackdrop hideAppLoadingIndicator
+ luigiContainer.addEventListener(MFEventID.OPEN_USER_SETTINGS_REQUEST, event => {
+ console.log('Open User Settings Request received', event.detail);
+ alert('LuigiClient.uxManager().openUserSettings()');
+ });
luigiContainer.addEventListener(MFEventID.CLOSE_USER_SETTINGS_REQUEST, event => {
console.log('Close User Settings Request received', event.detail);
+ alert('LuigiClient.uxManager().closeUserSettings()');
});
- luigiContainer.addEventListener(MFEventID.OPEN_USER_SETTINGS_REQUEST, event => {
- console.log('Open User Settings Request received', event.detail);
+ luigiContainer.addEventListener(MFEventID.REMOVE_BACKDROP_REQUEST, event => {
+ console.log('Remove Backdrop Request received', event.detail);
+ alert('LuigiClient.uxManager().removeBackdrop()');
});
luigiContainer.addEventListener(MFEventID.COLLAPSE_LEFT_NAV_REQUEST, event => {
console.log('Collapse Left Side Nav Request received', event.detail);
+ alert('LuigiClient.uxManager().collapseLeftSideNav()');
});
luigiContainer.addEventListener(MFEventID.SET_DOCUMENT_TITLE_REQUEST, event => {
console.log('Set Document Title Request received', event.detail);
- });
- luigiContainer.addEventListener(MFEventID.REMOVE_BACKDROP_REQUEST, event => {
- console.log('Remove Backdrop Request received', event.detail);
+ luigiContainer.documentTitle = event.detail;
});
luigiContainer.addEventListener(
MFEventID.HIDE_LOADING_INDICATOR_REQUEST,
event => {
console.log('Hide Loading Indicator Request received', event.detail);
+ alert('LuigiClient.uxManager().hideAppLoadingIndicator()');
}
);
// linkManager listeners:
// path exists
luigiContainer.addEventListener(MFEventID.PATH_EXISTS_REQUEST, event => {
- console.log('Remove Backdrop Request received', event.detail, event);
+ console.log('Path Exists Request received', event.detail, event);
// send back result with defined 'callback'
// event: MFEventID.PathExistsEvent can be used as an event type to get the callback function
event.callback(true);
diff --git a/container/test-app/wc/helloWorldWC.js b/container/test-app/wc/helloWorldWC.js
index 93464af71a..be7ba2d12f 100644
--- a/container/test-app/wc/helloWorldWC.js
+++ b/container/test-app/wc/helloWorldWC.js
@@ -234,12 +234,12 @@ export default class extends HTMLElement {
this.$uxManagerManyRequests = this._shadowRoot.querySelector('#uxManagerManyRequests');
this.$uxManagerManyRequests.addEventListener('click', () => {
- this.LuigiClient.uxManager().closeUserSettings();
this.LuigiClient.uxManager().openUserSettings();
- this.LuigiClient.uxManager().collapseLeftSideNav();
- this.LuigiClient.uxManager().setDocumentTitle('my-title');
+ this.LuigiClient.uxManager().closeUserSettings();
this.LuigiClient.uxManager().removeBackdrop();
+ this.LuigiClient.uxManager().collapseLeftSideNav();
this.LuigiClient.uxManager().hideAppLoadingIndicator();
+ this.LuigiClient.uxManager().setDocumentTitle('my-title');
this.LuigiClient.uxManager().showAlert({
text: 'LuigiClient.uxManager().getDocumentTitle()=' + this.LuigiClient.uxManager().getDocumentTitle(),
type: 'info'