|
@@ -1,41 +1,28 @@
|
|
|
describe("评卷页面", () => {
|
|
|
beforeEach(() => {
|
|
|
- cy.intercept("POST", "/mark/getSetting", {
|
|
|
- fixture: "settings-1.json",
|
|
|
- });
|
|
|
- cy.intercept("GET", "/slice/1/374/46208374-1.jpg", {
|
|
|
- fixture: "assets/46208374-1.jpg,null",
|
|
|
- });
|
|
|
- cy.intercept("GET", "/slice/1/374/46208374-2.jpg", {
|
|
|
- fixture: "assets/46208374-2.jpg,null",
|
|
|
- });
|
|
|
- cy.intercept("GET", "/slice/1/374/46208374-3.jpg", {
|
|
|
- fixture: "assets/46208374-3.jpg,null",
|
|
|
- });
|
|
|
- cy.intercept("GET", "/slice/1/374/46208374-4.jpg", {
|
|
|
- fixture: "assets/46208374-4.jpg,null",
|
|
|
- });
|
|
|
- // FIXME: need better way to do it
|
|
|
- cy.intercept("GET", "/slice/**", { fixture: "assets/46208374-1.jpg,null" });
|
|
|
+ cy.networkStub();
|
|
|
});
|
|
|
|
|
|
it("成功加载", () => {
|
|
|
- cy.visit("/"); // change URL to match your dev URL
|
|
|
+ cy.visit("/");
|
|
|
+ cy.wait(1000);
|
|
|
});
|
|
|
|
|
|
it("科目代码和名称显示", () => {
|
|
|
cy.visit("/");
|
|
|
- cy.get(".header-container a").should("contain", "431-金融学综合");
|
|
|
+ cy.wait(1000)
|
|
|
+ .get(".header-container a")
|
|
|
+ .should("contain", "431-金融学综合");
|
|
|
});
|
|
|
|
|
|
it("用户姓名显示", () => {
|
|
|
cy.visit("/");
|
|
|
- cy.get(".header-container").should("contain", "王小兰");
|
|
|
+ cy.wait(1000).get(".header-container").should("contain", "王小兰");
|
|
|
});
|
|
|
|
|
|
it("小助手显示", () => {
|
|
|
cy.visit("/");
|
|
|
- cy.get(".header-container .assistant-text").click();
|
|
|
+ cy.wait(1000).get(".header-container .assistant-text").click();
|
|
|
cy.get(".assistant-table").should("contain", "全卷");
|
|
|
});
|
|
|
});
|