From 1130dbb5f68469d043ed5c40f2093376d0aa1580 Mon Sep 17 00:00:00 2001 From: Peter Stakoun Date: Fri, 9 Aug 2024 14:02:47 -0400 Subject: [PATCH 1/8] Skip bank account tests --- cypress/tests/ui/bankaccounts.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/tests/ui/bankaccounts.spec.ts b/cypress/tests/ui/bankaccounts.spec.ts index 4658361bf..6174f828b 100644 --- a/cypress/tests/ui/bankaccounts.spec.ts +++ b/cypress/tests/ui/bankaccounts.spec.ts @@ -7,7 +7,7 @@ type BankAccountsTestCtx = { user?: User; }; -describe("Bank Accounts", function () { +describe.skip("Bank Accounts", function () { const ctx: BankAccountsTestCtx = {}; beforeEach(function () { From 8319698cea2589ee570e5f1815d288a6b285d26a Mon Sep 17 00:00:00 2001 From: Peter Stakoun Date: Fri, 9 Aug 2024 14:21:34 -0400 Subject: [PATCH 2/8] Update tests --- cypress/tests/ui/bankaccounts.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/tests/ui/bankaccounts.spec.ts b/cypress/tests/ui/bankaccounts.spec.ts index 6174f828b..08e29c736 100644 --- a/cypress/tests/ui/bankaccounts.spec.ts +++ b/cypress/tests/ui/bankaccounts.spec.ts @@ -7,7 +7,7 @@ type BankAccountsTestCtx = { user?: User; }; -describe.skip("Bank Accounts", function () { +describe("Bank Accounts", function () { const ctx: BankAccountsTestCtx = {}; beforeEach(function () { @@ -128,7 +128,7 @@ describe.skip("Bank Accounts", function () { cy.visualSnapshot("Bank Account Form with Errors and Submit button disabled"); }); - it("soft deletes a bank account", function () { + it.only("soft deletes a bank account", function () { cy.visit("/bankaccounts"); cy.getBySelLike("delete").first().click(); From 7f9e1de01b87359d50afcd2b48095d527d66b844 Mon Sep 17 00:00:00 2001 From: Peter Stakoun Date: Fri, 9 Aug 2024 14:42:08 -0400 Subject: [PATCH 3/8] Update tests --- cypress/tests/ui/bankaccounts.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/tests/ui/bankaccounts.spec.ts b/cypress/tests/ui/bankaccounts.spec.ts index 08e29c736..8db19ab1a 100644 --- a/cypress/tests/ui/bankaccounts.spec.ts +++ b/cypress/tests/ui/bankaccounts.spec.ts @@ -128,7 +128,7 @@ describe("Bank Accounts", function () { cy.visualSnapshot("Bank Account Form with Errors and Submit button disabled"); }); - it.only("soft deletes a bank account", function () { + it.skip("soft deletes a bank account", function () { cy.visit("/bankaccounts"); cy.getBySelLike("delete").first().click(); From be72daa8fd1c12f7ed2a9f36a9581e3b15007907 Mon Sep 17 00:00:00 2001 From: Peter Stakoun Date: Fri, 4 Oct 2024 13:27:10 -0400 Subject: [PATCH 4/8] Update tests for demo --- cypress/tests/ui/new-transaction.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/tests/ui/new-transaction.spec.ts b/cypress/tests/ui/new-transaction.spec.ts index d7c07c039..9fc2b6c48 100644 --- a/cypress/tests/ui/new-transaction.spec.ts +++ b/cypress/tests/ui/new-transaction.spec.ts @@ -88,7 +88,7 @@ describe("New Transaction", function () { cy.visualSnapshot("Personal List Validate Transaction in List"); }); - it("navigates to the new transaction form, selects a user and submits a transaction request", function () { + it.skip("navigates to the new transaction form, selects a user and submits a transaction request", function () { const request = { amount: "95", description: "Fancy Hotel 🏨", From 6319feba3b599407d54ad2ab542d681d7ccef4d0 Mon Sep 17 00:00:00 2001 From: Peter Stakoun Date: Fri, 24 Jan 2025 12:29:19 -0500 Subject: [PATCH 5/8] Automatic Test Creation Webinar --- cypress/tests/ui/bankaccounts.spec.ts | 9 -------- cypress/tests/ui/new-transaction.spec.ts | 29 ------------------------ 2 files changed, 38 deletions(-) diff --git a/cypress/tests/ui/bankaccounts.spec.ts b/cypress/tests/ui/bankaccounts.spec.ts index 8db19ab1a..52fb15423 100644 --- a/cypress/tests/ui/bankaccounts.spec.ts +++ b/cypress/tests/ui/bankaccounts.spec.ts @@ -128,15 +128,6 @@ describe("Bank Accounts", function () { cy.visualSnapshot("Bank Account Form with Errors and Submit button disabled"); }); - it.skip("soft deletes a bank account", function () { - cy.visit("/bankaccounts"); - cy.getBySelLike("delete").first().click(); - - cy.wait("@gqlDeleteBankAccountMutation"); - cy.getBySelLike("list-item").children().contains("Deleted"); - cy.visualSnapshot("Soft Delete Bank Account"); - }); - // TODO: [enhancement] the onboarding modal assertion can be removed after adding "onboarded" flag to user profile it("renders an empty bank account list state with onboarding modal", function () { cy.wait("@getNotifications"); diff --git a/cypress/tests/ui/new-transaction.spec.ts b/cypress/tests/ui/new-transaction.spec.ts index 9fc2b6c48..a402eb97b 100644 --- a/cypress/tests/ui/new-transaction.spec.ts +++ b/cypress/tests/ui/new-transaction.spec.ts @@ -88,35 +88,6 @@ describe("New Transaction", function () { cy.visualSnapshot("Personal List Validate Transaction in List"); }); - it.skip("navigates to the new transaction form, selects a user and submits a transaction request", function () { - const request = { - amount: "95", - description: "Fancy Hotel 🏨", - }; - - cy.getBySelLike("new-transaction").click(); - cy.wait("@allUsers"); - - cy.getBySelLike("user-list-item").contains(ctx.contact!.firstName).click({ force: true }); - cy.visualSnapshot("User Search First Name Input"); - - cy.getBySelLike("amount-input").type(request.amount); - cy.getBySelLike("description-input").type(request.description); - cy.visualSnapshot("Amount and Description Input"); - cy.getBySelLike("submit-request").click(); - cy.wait("@createTransaction"); - cy.getBySel("alert-bar-success") - .should("be.visible") - .and("have.text", "Transaction Submitted!"); - cy.visualSnapshot("Transaction Request Submitted Notification"); - - cy.getBySelLike("return-to-transactions").click(); - cy.getBySelLike("personal-tab").click().should("have.class", "Mui-selected"); - - cy.getBySelLike("transaction-item").should("contain", request.description); - cy.visualSnapshot("Transaction Item Description in List"); - }); - it("displays new transaction errors", function () { cy.getBySelLike("new-transaction").click(); cy.wait("@allUsers"); From 333cc9910f8c18782e7b34ae685782b607f07bd9 Mon Sep 17 00:00:00 2001 From: Peter Stakoun Date: Mon, 24 Mar 2025 16:52:53 -0400 Subject: [PATCH 6/8] Remove interactions for demo --- cypress/tests/ui/new-transaction.spec.ts | 17 ----------------- cypress/tests/ui/transaction-feeds.spec.ts | 11 ----------- 2 files changed, 28 deletions(-) diff --git a/cypress/tests/ui/new-transaction.spec.ts b/cypress/tests/ui/new-transaction.spec.ts index a402eb97b..29e895015 100644 --- a/cypress/tests/ui/new-transaction.spec.ts +++ b/cypress/tests/ui/new-transaction.spec.ts @@ -69,23 +69,6 @@ describe("New Transaction", function () { cy.getBySelLike("user-balance").should("contain", updatedAccountBalance); cy.visualSnapshot("Updated User Balance"); - - if (isMobile()) { - cy.get(".MuiBackdrop-root").click({ force: true }); - } - - cy.getBySelLike("create-another-transaction").click(); - cy.getBySel("app-name-logo").find("a").click(); - cy.getBySelLike("personal-tab").click().should("have.class", "Mui-selected"); - cy.wait("@personalTransactions"); - - cy.getBySel("transaction-list").first().should("contain", payment.description); - - cy.database("find", "users", { id: ctx.contact!.id }) - .its("balance") - .should("equal", ctx.contact!.balance + parseInt(payment.amount) * 100); - cy.getBySel("alert-bar-success").should("not.exist"); - cy.visualSnapshot("Personal List Validate Transaction in List"); }); it("displays new transaction errors", function () { diff --git a/cypress/tests/ui/transaction-feeds.spec.ts b/cypress/tests/ui/transaction-feeds.spec.ts index 2739c090a..34e73df05 100644 --- a/cypress/tests/ui/transaction-feeds.spec.ts +++ b/cypress/tests/ui/transaction-feeds.spec.ts @@ -216,17 +216,6 @@ describe("Transaction Feed", function () { }); describe("filters transaction feeds by date range", function () { - if (isMobile()) { - it("closes date range picker modal", () => { - cy.getBySelLike("filter-date-range-button").click({ force: true }); - cy.get(".Cal__Header__root").should("be.visible"); - cy.visualSnapshot("Mobile Open Date Range Picker"); - cy.getBySel("date-range-filter-drawer-close").click(); - cy.get(".Cal__Header__root").should("not.exist"); - cy.visualSnapshot("Mobile Close Date Range Picker"); - }); - } - _.each(feedViews, (feed, feedName) => { it(`filters ${feedName} transaction feed by date range`, function () { cy.database("find", "transactions").then((transaction: Transaction) => { From da1d5df7c2456eba7fcee49ad4ea0a7e0bcadf29 Mon Sep 17 00:00:00 2001 From: Peter Stakoun Date: Tue, 25 Mar 2025 10:32:06 -0400 Subject: [PATCH 7/8] Remove interactions for demo --- cypress/tests/ui/auth.spec.ts | 27 +-------- cypress/tests/ui/user-settings.spec.ts | 80 -------------------------- 2 files changed, 1 insertion(+), 106 deletions(-) delete mode 100644 cypress/tests/ui/user-settings.spec.ts diff --git a/cypress/tests/ui/auth.spec.ts b/cypress/tests/ui/auth.spec.ts index ec94f7011..1b5520c09 100644 --- a/cypress/tests/ui/auth.spec.ts +++ b/cypress/tests/ui/auth.spec.ts @@ -30,24 +30,7 @@ describe("User Sign-up and Login", function () { cy.location("pathname").should("equal", "/"); }); - it("should remember a user for 30 days after login", function () { - cy.database("find", "users").then((user: User) => { - cy.login(user.username, "s3cret", { rememberUser: true }); - }); - - // Verify Session Cookie - cy.getCookie("connect.sid").should("have.property", "expiry"); - - // Logout User - if (isMobile()) { - cy.getBySel("sidenav-toggle").click(); - } - cy.getBySel("sidenav-signout").click(); - cy.location("pathname").should("eq", "/signin"); - cy.visualSnapshot("Redirect to SignIn"); - }); - - it("should allow a visitor to sign-up, login, and logout", function () { + it("should allow a visitor to sign-up and login", function () { const userInfo = { firstName: "Bob", lastName: "Ross", @@ -98,14 +81,6 @@ describe("User Sign-up and Login", function () { cy.getBySel("transaction-list").should("be.visible"); cy.visualSnapshot("Transaction List is visible after User Onboarding"); - - // Logout User - if (isMobile()) { - cy.getBySel("sidenav-toggle").click(); - } - cy.getBySel("sidenav-signout").click(); - cy.location("pathname").should("eq", "/signin"); - cy.visualSnapshot("Redirect to SignIn"); }); it("should display login errors", function () { diff --git a/cypress/tests/ui/user-settings.spec.ts b/cypress/tests/ui/user-settings.spec.ts deleted file mode 100644 index 2a9e552eb..000000000 --- a/cypress/tests/ui/user-settings.spec.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { User } from "../../../src/models"; -import { isMobile } from "../../support/utils"; - -describe("User Settings", function () { - beforeEach(function () { - cy.task("db:seed"); - - cy.intercept("PATCH", "/users/*").as("updateUser"); - cy.intercept("GET", "/notifications*").as("getNotifications"); - - cy.database("find", "users").then((user: User) => { - cy.loginByXstate(user.username); - }); - - if (isMobile()) { - cy.getBySel("sidenav-toggle").click(); - } - - cy.getBySel("sidenav-user-settings").click(); - }); - - it("renders the user settings form", function () { - cy.wait("@getNotifications"); - cy.getBySel("user-settings-form").should("be.visible"); - cy.location("pathname").should("include", "/user/settings"); - - cy.visualSnapshot("User Settings Form"); - }); - - it("should display user setting form errors", function () { - ["first", "last"].forEach((field) => { - cy.getBySelLike(`${field}Name-input`).type("Abc").clear().blur(); - cy.get(`#user-settings-${field}Name-input-helper-text`) - .should("be.visible") - .and("contain", `Enter a ${field} name`); - }); - - cy.getBySelLike("email-input").type("abc").clear().blur(); - cy.get("#user-settings-email-input-helper-text") - .should("be.visible") - .and("contain", "Enter an email address"); - - cy.getBySelLike("email-input").type("abc@bob.").blur(); - cy.get("#user-settings-email-input-helper-text") - .should("be.visible") - .and("contain", "Must contain a valid email address"); - - cy.getBySelLike("phoneNumber-input").type("abc").clear().blur(); - cy.get("#user-settings-phoneNumber-input-helper-text") - .should("be.visible") - .and("contain", "Enter a phone number"); - - cy.getBySelLike("phoneNumber-input").type("615-555-").blur(); - cy.get("#user-settings-phoneNumber-input-helper-text") - .should("be.visible") - .and("contain", "Phone number is not valid"); - - cy.getBySelLike("submit").should("be.disabled"); - cy.visualSnapshot("User Settings Form Errors and Submit Disabled"); - }); - - it("updates first name, last name, email and phone number", function () { - cy.getBySelLike("firstName").clear().type("New First Name"); - cy.getBySelLike("lastName").clear().type("New Last Name"); - cy.getBySelLike("email").clear().type("email@email.com"); - cy.getBySelLike("phoneNumber-input").clear().type("6155551212").blur(); - - cy.getBySelLike("submit").should("not.be.disabled"); - cy.getBySelLike("submit").click(); - - cy.wait("@updateUser").its("response.statusCode").should("equal", 204); - - if (isMobile()) { - cy.getBySel("sidenav-toggle").click(); - } - - cy.getBySel("sidenav-user-full-name").should("contain", "New First Name"); - cy.visualSnapshot("User Settings Update Profile"); - }); -}); From 71ba1fb2ef3bfe62e5d403ab8ad5678c70f21642 Mon Sep 17 00:00:00 2001 From: marktnoonan Date: Thu, 1 May 2025 14:56:06 -0400 Subject: [PATCH 8/8] add some new elements for demo --- src/components/Footer.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 562030f89..0f98e8122 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -6,6 +6,8 @@ import CypressLogo from "../components/SvgCypressLogo"; export default function Footer() { return ( + + Link to a 404 Built by