diff --git a/cypress/integration/api.js b/cypress/integration/api.js deleted file mode 100644 index 420cea25fd..0000000000 --- a/cypress/integration/api.js +++ /dev/null @@ -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); - }); - }); - }); -});