At the end of a successful microflow, I show a message. This works. After pressing save, I get a popup with a message. But I am trying to automate testing with cypress. To test the text in the popup message, then I have something like cy.on('window:alert',(t)=>{ //assertions expect(t).to.contains('fred'); }) Cypress is skipping that whether the text is incorrect or correct. So I am guessing that it is not coming across an alert. It would not be a confirm because only one button is shown (ok). Looking at the code in browser tools, then the popup message is there. But if I look at non mendix code that uses alert then the alter code is not there. So perhaps a mendix alert is not a javascript alert but a dialog instead? I can actually get cypress to work by looking for the message and then the button and clicking on it. But useful to know if a showMessage in a microflow is a dialog rather than an alert.
asked
John Norris
1 answers
1
Hi John,
I don't have Cypress knowledge, but when the show message is triggered from a Microflow it is similar to a page as it is triggered server-side (Java). When triggered from a Nanoflow it is client-side (JavaScript).