chore: Drop API tests
These are already tested with far more coverage in server side tests.
This commit is contained in:
parent
41ca767f66
commit
adcb9ef72a
1 changed files with 0 additions and 44 deletions
|
|
@ -1,44 +0,0 @@
|
|||
context("API Resources", () => {
|
||||
before(() => {
|
||||
cy.visit("/login");
|
||||
cy.login();
|
||||
cy.visit("/app/website");
|
||||
});
|
||||
|
||||
it("Creates two Comments", () => {
|
||||
cy.insert_doc("Comment", { comment_type: "Comment", content: "hello" });
|
||||
cy.insert_doc("Comment", { comment_type: "Comment", content: "world" });
|
||||
});
|
||||
|
||||
it("Lists the Comments", () => {
|
||||
cy.get_list("Comment")
|
||||
.its("data")
|
||||
.then((data) => expect(data.length).to.be.at.least(2));
|
||||
|
||||
cy.get_list("Comment", ["name", "content"], [["content", "=", "hello"]]).then((body) => {
|
||||
expect(body).to.have.property("data");
|
||||
expect(body.data).to.have.lengthOf(1);
|
||||
expect(body.data[0]).to.have.property("content");
|
||||
expect(body.data[0]).to.have.property("name");
|
||||
});
|
||||
});
|
||||
|
||||
it("Gets each Comment", () => {
|
||||
cy.get_list("Comment").then((body) =>
|
||||
body.data.forEach((comment) => {
|
||||
cy.get_doc("Comment", comment.name);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
it("Removes the Comments", () => {
|
||||
cy.get_list("Comment").then((body) => {
|
||||
let comment_names = [];
|
||||
body.data.map((comment) => comment_names.push(comment.name));
|
||||
comment_names = [...new Set(comment_names)]; // remove duplicates
|
||||
comment_names.forEach((comment_name) => {
|
||||
cy.remove_doc("Comment", comment_name);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Reference in a new issue