Skip to content

Commit

Permalink
feat: added export test
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-McFaddin committed Mar 15, 2024
1 parent 91d2fa7 commit 503b19f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
2 changes: 0 additions & 2 deletions cypress/e2e/boilerplate-e2e/boilerplate.cy.js
@@ -1,5 +1,3 @@
import "@4tw/cypress-drag-drop";

describe("Create a new boilerplate", () => {
it("Logs into the application", () => {
cy.viewport(2560, 1600);
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/boilerplate-e2e/category.cy.js
@@ -1,5 +1,3 @@
import "@4tw/cypress-drag-drop";

describe("Create a new category", () => {
it("Logs into the application", () => {
cy.viewport(2560, 1600);
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/boilerplate-e2e/fundingOrg.cy.js
@@ -1,5 +1,3 @@
import "@4tw/cypress-drag-drop";

describe("Create a new funding org", () => {
it("Logs into the application", () => {
cy.viewport(2560, 1600);
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/boilerplate-e2e/grant.cy.js
@@ -1,5 +1,3 @@
import "@4tw/cypress-drag-drop";

describe("Create a new grant from Grants index", () => {
it("Logs into the application", () => {
cy.viewport(2560, 1600);
Expand Down
22 changes: 22 additions & 0 deletions cypress/e2e/boilerplate-e2e/grantExport.cy.js
@@ -0,0 +1,22 @@
describe("Grant Export modal", () => {
it("Logs into the application", () => {
cy.viewport(2560, 1600);
cy.visit("http://localhost:3001");
cy.get("a:contains('Log In')").click();
cy.get("input[type=email]").type("abarnes@thecypresstree.org");
cy.get("input[type=password]").type("password");
cy.get("button[type=submit]").click();
cy.get('[data-testid="The Cypress Tree"]').click();
cy.get('[data-testid="Grants"]').click();
cy.get('[data-testid="Cypress Tree Neighborhood Grant"]').click();
cy.contains("Export").click();

cy.get(".modal").invoke("prop", "open").should("equal", true);
cy.contains("Include Title").click();
cy.get(".modal").find("p:contains('Case Management Program')");
cy.contains("Exclude Title").click();
cy.get(".export-editor").should("not.contain", "Case Management Program");
cy.contains("Close").click();
cy.get(".modal").should("not.exist");
});
});

0 comments on commit 503b19f

Please sign in to comment.