mcpField
E
E-commerce Test Automation with Cypress

E-commerce Test Automation with Cypress

Local
github.com/JoanEsquivelBrowser Automation15Updated 77w ago

About E-commerce Test Automation with Cypress

E-commerce Test Automation with Cypress is a TypeScript end-to-end test project for a mock e-commerce app. It uses Cypress and the Page Object Model to test successful orders and declined-payment flows.

Key features

  1. 01Automate successful order flow
  2. 02Test declined-payment flow
  3. 03Use TypeScript with Cypress
  4. 04Organize tests with Page Object Model
  5. 05Run tests in GUI or headless mode

Use cases

  1. 01Check checkout for successful purchases
  2. 02Verify behavior when payments are declined
  3. 03Run e-commerce tests locally or in CI

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

E-commerce Test Automation with Cypress

This project contains end-to-end tests for a mock e-commerce application using Cypress with TypeScript and the Page Object Model pattern.

Overview

The tests automate two main flows:

  1. Successful order flow - a user who can complete a purchase successfully
  2. Failed order flow - a user whose payments are always declined

Project Structure

cypress/
  ├── e2e/                  # Test files
  │   ├── successful-order-flow.cy.ts
  │   └── failed-order-flow.cy.ts
  ├── fixtures/             # Test data
  │   ├── users.json
  │   ├── products.json
  │   └── payment.json
  ├── pages/                # Page Objects
  │   ├── LoginPage.ts
  │   ├── ProductsPage.ts
  │   ├── CartPage.ts
  │   └── CheckoutPage.ts
  └── support/              # Support files
      ├── commands.ts
      └── e2e.ts

Setup

  1. Clone the repository
  2. Install dependencies:
    npm install
    
  3. Set up environment variables:
    • Create a cypress.env.json file (already included but should not be committed to version control in a real project)
    • Or use a .env file with the necessary credentials

Running the Tests

Run all tests:

npm test

Run tests in headless mode:

npm run test:headless

Run specific test flow:

npm run test:success  # Successful order flow
npm run test:failure  # Failed order flow

Open Cypress GUI:

npm run cypress:open

Environment Variables

The following environment variables are used:

  • CYPRESS_USERNAME: Username for successful login
  • CYPRESS_PASSWORD: Password for both users
  • CYPRESS_FAILURE_USERNAME: Username for the user with failed payments

These can be set in:

  1. cypress.env.json file (for local development)
  2. .env file
  3. CI/CD pipeline environment variables

Test Application

The tests are designed for the mock e-commerce application located at:
https://v0-imagine-deals.vercel.app

Notes

  • This is a demo project for testing purposes only
  • The application simulates payment scenarios:
    • Any total ending in .99 will simulate a declined payment
    • Any total ending in .88 will simulate a network error

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.