每当我运行新的 cypress 测试时,应该显示 UI 的页面都是空白的。即使我单击每个测试的每个部分,它仍然是空白的。请参见下图。
图像

Cypress 软件包版本:10.4.0
Node v16.16.0
代码:
describe("home page", () => {
beforeEach(() => {
cy.visit("http://localhost:3000")
})
context("Hero section", () => {
it("the h1 contains the correct text", () => {
cy.getByData("hero-heading").contains(
"Testing Next.js Applications with Cypress"
)
})
it("the features on the homepage are correct", () => {
cy.get("dt").eq(0).contains("4 Courses")
cy.get("dt").eq(1).contains("25+ Lessons")
cy.get("dt").eq(2).contains("Free and Open Source")
})
})
context("Courses section", () => {
it("CourseL Testing Your First Next.js Application", () => {
cy.getByData('course-0')
.find('a')
.eq(3) …Run Code Online (Sandbox Code Playgroud) cypress ×1