1234567891011121314151617181920212223242526272829303132333435363738394041 |
- 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" });
- });
- it("成功加载", () => {
- cy.visit("/"); // change URL to match your dev URL
- });
- it("科目代码和名称显示", () => {
- cy.visit("/");
- cy.get(".header-container a").should("contain", "431-金融学综合");
- });
- it("用户姓名显示", () => {
- cy.visit("/");
- cy.get(".header-container").should("contain", "王小兰");
- });
- it("小助手显示", () => {
- cy.visit("/");
- cy.get(".header-container .assistant-text").click();
- cy.get(".assistant-table").should("contain", "全卷");
- });
- });
|