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 4bf9966660..a8f824c24d 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 @@ -105,6 +105,18 @@ describe('Compound Container Tests', () => { }); }); + it('LuigiClient API - getActiveFeatureToggles', () => { + cy.on('window:alert', stub); + + cy.get(containerSelector) + .shadow() + .contains('getFeatureToggleList') + .click() + .then(() => { + expect(stub.getCall(0)).to.be.calledWith('LuigiClient.getActiveFeatureToggles()=["ft1","ft2"]'); + }); + }); + it('LuigiClient API - getCurrentTheme', () => { cy.on('window:alert', stub); diff --git a/container/src/LuigiCompoundContainer.svelte b/container/src/LuigiCompoundContainer.svelte index 2dd289b597..d3f2abc28d 100644 --- a/container/src/LuigiCompoundContainer.svelte +++ b/container/src/LuigiCompoundContainer.svelte @@ -3,6 +3,7 @@ tag: null, shadow: 'none', props: { + activeFeatureToggleList: { type: 'Array', reflect: false, attribute: 'active-feature-toggle-list' }, anchor: { type: 'String', reflect: false, attribute: 'anchor' }, clientPermissions: { type: 'Object', @@ -65,6 +66,7 @@ import { Events } from './constants/communication'; import { GenericHelperFunctions } from './utilities/helpers'; + export let activeFeatureToggleList: string[]; export let anchor: string; export let clientPermissions: any; export let compoundConfig: any; @@ -92,6 +94,7 @@ // Only needed for get rid of "unused export property" svelte compiler warnings export const unwarn = () => { return ( + activeFeatureToggleList && anchor && clientPermissions && dirtyStatus && diff --git a/container/test-app/compound/compoundClientAPI.html b/container/test-app/compound/compoundClientAPI.html index d76a17e1ee..85eefa9a37 100644 --- a/container/test-app/compound/compoundClientAPI.html +++ b/container/test-app/compound/compoundClientAPI.html @@ -26,6 +26,7 @@