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 9de337f9ff..942216cfec 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
@@ -217,6 +217,40 @@ describe('Compound Container Tests', () => {
});
});
+ it('openAsModal webcomponent container', () => {
+ cy.on('window:alert', stub);
+
+ cy.get(containerSelector)
+ .shadow()
+ .get('#openAsModalBtn')
+ .click()
+ .then(() => {
+ cy.hash().should('eq', '#openAsModal-wc');
+ });
+ });
+ it('openAsDrawer webcomponent container', () => {
+ cy.on('window:alert', stub);
+
+ cy.get(containerSelector)
+ .shadow()
+ .get('#openAsDrawerBtn')
+ .click()
+ .then(() => {
+ cy.hash().should('eq', '#openAsDrawer-wc');
+ });
+ });
+ it('openAsSplitview webcomponent container', () => {
+ cy.on('window:alert', stub);
+
+ cy.get(containerSelector)
+ .shadow()
+ .get('#openAsSplitviewBtn')
+ .click()
+ .then(() => {
+ cy.hash().should('eq', '#openAsSplitview-wc');
+ });
+ });
+
it('LuigiClient API publishEvent', () => {
cy.on('window:alert', stub);
diff --git a/container/cypress/e2e/test-app/iframe/iframe-container.cy.js b/container/cypress/e2e/test-app/iframe/iframe-container.cy.js
index 0b6b5013e1..fe2b83d177 100644
--- a/container/cypress/e2e/test-app/iframe/iframe-container.cy.js
+++ b/container/cypress/e2e/test-app/iframe/iframe-container.cy.js
@@ -115,4 +115,58 @@ describe('Iframe Container Test', () => {
});
});
});
+
+ it('openAsModal', () => {
+ cy.on('window:confirm', () => false);
+
+ cy.get(containerSelector)
+ .shadow()
+ .get('iframe')
+ .then(iframe => {
+ const $body = iframe.contents().find('body');
+ cy.wrap($body)
+ .contains('test openAsModal()')
+ .click();
+
+ cy.location().should(loc => {
+ expect(loc.hash).to.eq('#openAsModal-iframe');
+ });
+ });
+ });
+
+ it('openAsDrawer', () => {
+ cy.on('window:confirm', () => false);
+
+ cy.get(containerSelector)
+ .shadow()
+ .get('iframe')
+ .then(iframe => {
+ const $body = iframe.contents().find('body');
+ cy.wrap($body)
+ .contains('test openAsDrawer')
+ .click();
+
+ cy.location().should(loc => {
+ expect(loc.hash).to.eq('#openAsDrawer-iframe');
+ });
+ });
+ });
+
+ it('openAsSplitview', () => {
+ cy.on('window:confirm', () => false);
+
+ cy.get(containerSelector)
+ .shadow()
+ .get('iframe')
+ .then(iframe => {
+ const $body = iframe.contents().find('body');
+ cy.wrap($body)
+ .contains('test openAsSplitview')
+ .click();
+
+ cy.location().should(loc => {
+ expect(loc.hash).to.eq('#openAsSplitview-iframe');
+ });
+ });
+ });
});
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 65833119de..5550e977c2 100644
--- a/container/cypress/e2e/test-app/wc/wc-container.cy.js
+++ b/container/cypress/e2e/test-app/wc/wc-container.cy.js
@@ -158,6 +158,40 @@ describe('Web Container Test', () => {
});
});
+ it('openAsModal webcomponent container', () => {
+ cy.on('window:alert', stub);
+
+ cy.get(containerSelector)
+ .shadow()
+ .get('#openAsModalBtn')
+ .click()
+ .then(() => {
+ cy.hash().should('eq', '#openAsModal-wc');
+ });
+ });
+ it('openAsDrawer webcomponent container', () => {
+ cy.on('window:alert', stub);
+
+ cy.get(containerSelector)
+ .shadow()
+ .get('#openAsDrawerBtn')
+ .click()
+ .then(() => {
+ cy.hash().should('eq', '#openAsDrawer-wc');
+ });
+ });
+ it('openAsSplitview webcomponent container', () => {
+ cy.on('window:alert', stub);
+
+ cy.get(containerSelector)
+ .shadow()
+ .get('#openAsSplitviewBtn')
+ .click()
+ .then(() => {
+ cy.hash().should('eq', '#openAsSplitview-wc');
+ });
+ });
+
it('pathExists', () => {
cy.on('window:alert', stub);
diff --git a/container/test-app/compound/helloWorldWC.js b/container/test-app/compound/helloWorldWC.js
index 0bd8936510..59271f5b07 100644
--- a/container/test-app/compound/helloWorldWC.js
+++ b/container/test-app/compound/helloWorldWC.js
@@ -79,12 +79,22 @@ export default class extends HTMLElement {
withParams().navigate()
`;
+ /*
const linkManagerOpenAsRequestsBtn = document.createElement('template');
linkManagerOpenAsRequestsBtn.innerHTML = ``;
+ */
+ const openAsModalBtn = document.createElement('template');
+ openAsModalBtn.innerHTML = '';
+
+ const openAsDrawerBtn = document.createElement('template');
+ openAsDrawerBtn.innerHTML = '';
+
+ const openAsSplitviewBtn = document.createElement('template');
+ openAsSplitviewBtn.innerHTML = '';
const linkManagerUpdateTopPathExistsBackBtn = document.createElement('template');
linkManagerUpdateTopPathExistsBackBtn.innerHTML = `