I'm trying to get email catched by Mailcatcher in Cypress test. Mailcatcher runs at localhost:1080, and my app is running on port 3000.
So far I cannot simply use cy.visit('localhost:1080) because I am already visiting my app via cy.visit() (second unique domain). So I tried this:
cy
.request('http://localhost:1080/')
.its('body') //this gives me only a list of headers
The email is stored inside <tbody></tbody>, but that request above shoves me, that the <tbody> element is empty
I'm expecting to get tr where email is stored. Any suggestions how to do that?
Not my solution, just borrowed it from google and the github of Cypress (https://github.com/cypress-io/cypress/issues/418):