Lines 2-8
import { mount } from "@cypress/vue";
Link Here
|
2 |
|
2 |
|
3 |
describe("Generate Random Patron", () => { |
3 |
describe("Generate Random Patron", () => { |
4 |
it("should generate a random patron from the schema", () => { |
4 |
it("should generate a random patron from the schema", () => { |
5 |
cy.task("buildSamplePatron").then(mockPatron => { |
5 |
cy.task("buildSampleObject", { object: "patron" }).then(mockPatron => { |
6 |
expect(mockPatron).to.have.property("patron_id"); |
6 |
expect(mockPatron).to.have.property("patron_id"); |
7 |
}); |
7 |
}); |
8 |
}); |
8 |
}); |
Lines 10-35
describe("Generate Random Patron", () => {
Link Here
|
10 |
|
10 |
|
11 |
describe("Generate Random Patrons", () => { |
11 |
describe("Generate Random Patrons", () => { |
12 |
it("should generate 42 random patron from the schema", () => { |
12 |
it("should generate 42 random patron from the schema", () => { |
13 |
cy.task("buildSamplePatrons", 42).then(mockPatrons => { |
13 |
cy.task("buildSampleObjects", { object: "patron", count: 42 }).then( |
14 |
expect(mockPatrons.length).to.equal(42); |
14 |
mockPatrons => { |
15 |
expect(mockPatrons[0]).to.have.property("patron_id"); |
15 |
expect(mockPatrons.length).to.equal(42); |
16 |
}); |
16 |
expect(mockPatrons[0]).to.have.property("patron_id"); |
|
|
17 |
} |
18 |
); |
17 |
}); |
19 |
}); |
18 |
}); |
20 |
}); |
19 |
|
21 |
|
20 |
describe("Generate Random Library", () => { |
22 |
describe("Generate Random Library", () => { |
21 |
it("should generate a random library from the schema", () => { |
23 |
it("should generate a random library from the schema", () => { |
22 |
cy.task("buildSampleLibrary").then(mockLibrary => { |
24 |
cy.task("buildSampleObject", { object: "library" }).then( |
23 |
expect(mockLibrary).to.have.property("library_id"); |
25 |
mockLibrary => { |
24 |
}); |
26 |
expect(mockLibrary).to.have.property("library_id"); |
|
|
27 |
} |
28 |
); |
25 |
}); |
29 |
}); |
26 |
}); |
30 |
}); |
27 |
|
31 |
|
28 |
describe("Generate Random Libraries", () => { |
32 |
describe("Generate Random Libraries", () => { |
29 |
it("should generate 42 random library from the schema", () => { |
33 |
it("should generate 42 random library from the schema", () => { |
30 |
cy.task("buildSampleLibraries", 42).then(mockLibraries => { |
34 |
cy.task("buildSampleObjects", { object: "library", count: 42 }).then( |
31 |
expect(mockLibraries.length).to.equal(42); |
35 |
mockLibraries => { |
32 |
expect(mockLibraries[0]).to.have.property("library_id"); |
36 |
expect(mockLibraries.length).to.equal(42); |
33 |
}); |
37 |
expect(mockLibraries[0]).to.have.property("library_id"); |
|
|
38 |
} |
39 |
); |
34 |
}); |
40 |
}); |
35 |
}); |
41 |
}); |