📅  最后修改于: 2022-03-11 15:03:28.792000             🧑  作者: Mango
const editWindowUrl =
cy.window().then((win) => {
const stub = cy.stub(win, "open").as("windowOpen");
});
cy.contains("Edit").click();
cy.get("@windowOpen").should("be.called");
cy.window().then((win) => {
win.location.href = editWindowUrl;
});