Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qualityshepherd/cypress-example
Example e2e tests using Cypress
https://github.com/qualityshepherd/cypress-example
automation cypress cypress-io e2e tests
Last synced: about 2 months ago
JSON representation
Example e2e tests using Cypress
- Host: GitHub
- URL: https://github.com/qualityshepherd/cypress-example
- Owner: qualityshepherd
- Created: 2018-01-12T13:34:36.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2023-07-09T22:32:30.000Z (over 1 year ago)
- Last Synced: 2023-07-09T23:22:32.031Z (over 1 year ago)
- Topics: automation, cypress, cypress-io, e2e, tests
- Language: JavaScript
- Homepage:
- Size: 118 KB
- Stars: 6
- Watchers: 3
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![E2E Tests](https://github.com/qualityshepherd/cypress-example/actions/workflows/e2e.yaml/badge.svg)](https://github.com/qualityshepherd/cypress-example/actions/workflows/e2e.yaml)
# Cypress Example
An example project using the automation tool, [Cypress](https://www.cypress.io/). These tests are quite silly but are intended to provide examples of common actions you may need in your testing. I've included:
- page objects
- various ways of running the tests (via npm scripts)## Rant
Cypress is an _agressively_ opinionated framework... some of these opinions are at best, misguided :) YMMV. I know it's very popular... but honestly, **I would avoid Cypress if you can**. My issues with Cypress include:1. it hates on page objects
1. it has a versioning problem: TONS of misinformation about how to use it on the internets
1. it cannot handle new windows/tabs
1. it can't handle multiple domains in one test file
1. it requires learning a proprietary framework rather than learning to code
1. it teaches some bad testing habits (eg. expects in page objects)
1. it thinks conditionals in tests are ok; they're not
1. it's slow
1. anything it doesn't handle the docs will tell you _YOU SHOULDN'T WANT TO DO THAT_ (eg. test if an element exists)
1. I have yet to see _anyone_ use it wellI _strongly_ suggest using [Testcafe](https://github.com/qualityshepherd/testcafe-example) or [Playwright](https://playwright.dev/) instead.
## Requires
1. [node](https://nodejs.org/en/)
1. [git](https://git-scm.com/)## Setup
1. clone: `[email protected]:qualityshepherd/cypress-example.git`
1. install: `npm i`## Run Them Tests
1. all'vum: `npm test`
1. just homePage: `npm run cy:home`
1. headless: `npm run cy:headless`---
![Test Run Gif](https://qualityshepherd.com/screencasts/cypress_testrun.gif)