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 0422b11f71..e6df71b7e0 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 @@ -1,15 +1,20 @@ describe('Compound Container Tests', () => { describe('LuigiClient API - LuigiCompoundContainer', () => { const containerSelector = '[data-test-id="luigi-client-api-test-compound-01"]'; - let consoleLog; + let consoleInfo; let stub; beforeEach(() => { cy.visit('http://localhost:8080/compound/compoundClientAPI.html', { onBeforeLoad(win) { - // Set up a spy on console.log - cy.stub(win.console, 'log', (value) => { - consoleLog = value; + // Clear logs in window console + if (Object.prototype.toString.call(win.console.clear) === '[object Function]') { + win.console.clear(); + } + + // Set up a spy on console.info + cy.stub(win.console, 'info', (value) => { + consoleInfo = value; }); } }); @@ -290,7 +295,7 @@ describe('Compound Container Tests', () => { cy.should(() => { expect(stub.getCall(0)).to.be.calledWith('custom-message: sendInput'); - expect(consoleLog).to.equal('dataConverter(): Received Custom Message from "input1" MF My own event data'); + expect(consoleInfo).to.equal('dataConverter(): Received Custom Message from "input1" MF My own event data'); }); }); diff --git a/container/test-app/compound/compoundClientAPI.html b/container/test-app/compound/compoundClientAPI.html index b84d661c0c..9b94deeeb7 100644 --- a/container/test-app/compound/compoundClientAPI.html +++ b/container/test-app/compound/compoundClientAPI.html @@ -119,7 +119,7 @@