Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 1 addition & 26 deletions cypress/tests/ui/auth.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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 () {
Expand Down
9 changes: 0 additions & 9 deletions cypress/tests/ui/bankaccounts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
46 changes: 0 additions & 46 deletions cypress/tests/ui/new-transaction.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
11 changes: 0 additions & 11 deletions cypress/tests/ui/transaction-feeds.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
80 changes: 0 additions & 80 deletions cypress/tests/ui/user-settings.spec.ts

This file was deleted.

2 changes: 2 additions & 0 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import CypressLogo from "../components/SvgCypressLogo";
export default function Footer() {
return (
<Container maxWidth="sm" style={{ marginTop: 50 }}>
<button data-test="important-button">I'm new and interactive</button>
<a href="/a-previously-unknown-page">Link to a 404</a>
<Typography variant="body2" color="textSecondary" align="center">
Built by
<a
Expand Down