// counter.spec.js describe("Counter", () => { it("increments the counter when the button is clicked", () => { cy.visit("http://localhost:8080"); // 修改为你的应用程序地址
cy.get("button").click();
cy.get("p").should("have.text", "Count: 1"); });
it("resets the counter to 0 when the button is clicked twice", () => { cy.visit("http://localhost:8080"); // 修改为你的应用程序地址