If I have a link in my website. Eg. <a href="//google.com" target="_blank">go to Google</a> and I want to make a test:
- GIVEN link (html tag
a) - WHEN click the link
- THEN browser opens new tab and URL of this tab includes 'google.com'
I know that this does not work:
cy.get('a').click();
cy.url().should('include', 'google.com');