E-commerce Test Automation with Cypress
JoanEsquivel/playwright-mcp-server · 15 stars · TypeScript
MCP server This is an experimental project to integrate Playwright with MCP. My plan is to conduct in-depth research, understand the intricacies of the integration, and review the best articles on the web to create the optimal version of a project using both technologies.
Install
The repo has no one-line install. Follow its README.
Files
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:
- Successful order flow - a user who can complete a purchase successfully
- 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
- Clone the repository
- Install dependencies:
npm install - Set up environment variables:
- Create a
cypress.env.jsonfile (already included but should not be committed to version control in a real project) - Or use a
.envfile with the necessary credentials
- Create a
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 loginCYPRESS_PASSWORD: Password for both usersCYPRESS_FAILURE_USERNAME: Username for the user with failed payments
These can be set in:
cypress.env.jsonfile (for local development).envfile- 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
Facts
- Kind
- MCP server
- Group
- Uncategorized
- Stars
- 15
- Language
- TypeScript
- Last push
- 2025-05-06
- Forks
- 6
- 1REAio.github.morluto/reaReverse engineer anything from your terminal or agent with one CLI and MCP server.125.3k
- 2com.browser-use/browser-usecom.browser-use/browser-useControl a real Chrome browser to complete any task: fill forms, extract data, book flights.117.7k
- 3World Monitorapp.worldmonitor/mcpLive markets, conflicts, country risk, chokepoints, energy, and China decision signals. 93 tools.88.3k
- 4Scrapling MCP Serverd4vinci/scrapling🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scraplingdev86.9k
- 5Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
- 6Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k