【发布时间】:2022-10-22 03:50:48
【问题描述】:
我有一个带有嵌套描述的大描述,它会阻塞。 我想让每个 it 块都在它的描述中。问题是赛普拉斯在所有测试运行后都存在测试运行器。我想保留它阻止测试的那些,以便查看历史条目。
describe("Move timetable until the specified event is executed", () => {
describe("Login", () => {
it("should log in and retrive the timetable related info", () => {
cy.login()
});
});
describe("Access dedicated menu leaf", () => {
it("should access the Maintenance menu and click on Execute", () => {
executeCurrentTimetable.accessMenuLeafAndClickExecute();
});
describe("Execute events until specified event is executed", () => {
it("should execute the timetable until a specified event is reached", () => {
// get the event based on eventsList array
executeCurrentTimetable.executeEvents(eventKeyObj.SoBD);
});
});
仅当所有命令都包含在相同的描述中并且它阻止工作时:
describe("Execute events until last event of the day", () => {
it.only("should execute the timetable until a specified event is reached", () => {
cy.login()
executeCurrentTimetable.accessMenuLeafAndClickExecute();
executeCurrentTimetable.executeLastEvent();
});
});
测试完成后,cypress 自动进入菜单(见图)。 任何帮助将非常感激。 谢谢!
【问题讨论】: