1const editWindowUrl = <yourUrl>
2cy.window().then((win) => {
3const stub = cy.stub(win, "open").as("windowOpen");
4});
5cy.contains("Edit").click();
6cy.get("@windowOpen").should("be.called");
7cy.window().then((win) => {
8win.location.href = editWindowUrl;
9});