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/bankaccounts.spec.ts b/cypress/tests/ui/bankaccounts.spec.ts index 4658361bf..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("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 d7c07c039..29e895015 100644 --- a/cypress/tests/ui/new-transaction.spec.ts +++ b/cypress/tests/ui/new-transaction.spec.ts @@ -69,52 +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("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 () { 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) => { 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"); - }); -}); 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