I have local file where I can check if correct messages have been sent through console. I can see the messages through cypress and count them but it seems that I can't check the actual message.
Code Example:
it(`Checking Error Text in:`, () => {
cy.visit('../testmessages.html', {
onBeforeLoad(win) {
cy.stub(win.console, 'log').as('consoleLog')},
})
cy.get('button').click()
cy.get("@consoleLog").should('be.calledThrice')
//here I would like to confirm that message contains "Id" etc
})})})