Skip to content

Commit

Permalink
Fixes flaky e2e test in container (#4158)
Browse files Browse the repository at this point in the history
  • Loading branch information
walmazacn authored Feb 21, 2025
1 parent 0acadf8 commit 76813fc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,17 @@ describe('Compound Container Tests', () => {
it('LuigiClient API publishEvent', () => {
cy.on('window:alert', stub);

cy.get(containerSelector).shadow().contains('Publish event').click();
cy.get(containerSelector)
.shadow()
.contains('Publish event')
.click({force: true});

cy.should(() => {
if (consoleInfo) {
expect(consoleInfo).to.equal('dataConverter(): Received Custom Message from "input1" MF My own event data');
}

expect(stub.getCall(0)).to.be.calledWith('custom-message: sendInput');
expect(consoleInfo).to.equal('dataConverter(): Received Custom Message from "input1" MF My own event data');
});
});

Expand Down
9 changes: 3 additions & 6 deletions container/test-app/compound/compoundClientAPI.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ <h3>

compoundContainer.addEventListener(MFEventID.CUSTOM_MESSAGE, (e) => {
console.debug('CUSTOM_MESSAGE Listener picked up: ', e.detail);
if (event.detail.id !== 'timer') {
alert(MFEventID.CUSTOM_MESSAGE + ': ' + event.detail.id);
}
});

compoundContainer.compoundConfig = {
Expand Down Expand Up @@ -202,12 +205,6 @@ <h3>
}
},
);
compoundContainer.addEventListener(MFEventID.CUSTOM_MESSAGE, (event) => {
if (event.detail.id !== 'timer') {
alert(MFEventID.CUSTOM_MESSAGE + ': ' + event.detail.id);
}
});

compoundContainer.addEventListener(
MFEventID.RUNTIME_ERROR_HANDLING_REQUEST,
(event) => {
Expand Down

0 comments on commit 76813fc

Please sign in to comment.