Skip to content

Commit

Permalink
fix(cypress): remove cypress from codebase (#1082)
Browse files Browse the repository at this point in the history
I'm really happy with where we are with our Playwright tests, so let's
get rid of the cypress tests to prevent those failures from letting us
have those sweet green check marks. ✅

Currently the cypress tests fail when running on commits on main due to
[a missing record
key](https://github.com/cfpb/sbl-frontend/actions/runs/12263581708/job/34215508209).
We don't need these tests anymore, and I think now is the time to get
rid of them.

<img width="1234" alt="Screenshot 2024-12-10 at 2 24 59 PM"
src="https://github.com/user-attachments/assets/db4ac511-17d4-4223-a6fb-24b12c04fac5">

Closes #992 



## Changes

- Removes cypress from deps, readme, package.json scripts, cache, and
removes the folder of test files


## How to test this PR

1. Does the website still build and work?

## Screenshots
<img width="1109" alt="Screenshot 2024-12-10 at 2 22 04 PM"
src="https://github.com/user-attachments/assets/822aeaf6-e47e-46e0-8f01-748399b2a424">
  • Loading branch information
billhimmelsbach authored Dec 10, 2024
1 parent 72dad67 commit b84427e
Show file tree
Hide file tree
Showing 82 changed files with 28 additions and 826 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ dist-ssr
node_modules/*
.yarn
playwright.config.ts
cypress.config.js
prettier.config.cjs
tailwind.config.js
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
"error",
{
"devDependencies": [
"cypress.config.js",
"vite.config.ts",
"src/setupTests.ts",
"src/testUtils.tsx",
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,6 @@ jobs:
- name: Run React tests
run: yarn test:ci

cypress:
name: Cypress
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setvars
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'yarn'
cache-dependency-path: ./yarn.lock

- name: Install dependencies
run: yarn

- name: Run React tests
run: yarn test:e2e:ci

playwright:
name: Playwright
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ dist-ssr
coverage
.nyc_output
.stylelintcache
cypress/videos
package-lock.json
e2e/pages/filing-app/uploadFile/downloads/*
e2e/utils/downloads/*
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/arch-npm-2.2.0-34797684d8-e21b763502.zip
Binary file not shown.
Binary file removed .yarn/cache/asn1-npm-0.2.6-bdd07356c4-39f2ae343b.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ini-npm-2.0.0-28f7426761-e7aadc5fb2.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/jsbn-npm-0.1.1-0eb7132404-e5ff29c1b8.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/pend-npm-1.2.0-7a13d93266-6c72f52433.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/pump-npm-3.0.0-0080bf6a7a-e42e9229fb.zip
Binary file not shown.
Binary file removed .yarn/cache/qs-npm-6.10.4-9b6a538d57-31e4fedd75.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/uuid-npm-8.3.2-eca0baba53-5575a8a75c.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ If you'll be using VS Code, be sure to:
- `yarn update` - update all dependent repos and then start the app's full stack (auth, api, frontend) via `docker-compose`
- `yarn seed` - run all mock data generation scripts
- `yarn test` - run unit and integration tests related to changed files based on git.
- `yarn test:ci` - run all unit and integration tests in CI mode (legacy Cypress tests until Playwright tests are ready).
- `yarn test:ci` - run all unit and integration tests in CI mode
- `yarn test:e2e` - run all e2e tests with Playwright UI mode.
- `yarn test:e2e:headless` - run all e2e tests headlessly.
- `yarn format` - format all files with Prettier.
- `yarn lint` - runs TypeScript, ESLint and Stylelint.
- `yarn validate` - runs `lint`, `test:ci` and `test:e2e:ci`.
- `yarn validate` - runs `lint`, `test:ci` and `test:e2e`.

## Dev Tools

Expand Down
11 changes: 0 additions & 11 deletions cypress.config.js

This file was deleted.

42 changes: 0 additions & 42 deletions cypress/.eslintrc.js

This file was deleted.

13 changes: 0 additions & 13 deletions cypress/e2e/index.spec.ts

This file was deleted.

5 changes: 0 additions & 5 deletions cypress/support/e2e.ts

This file was deleted.

16 changes: 0 additions & 16 deletions cypress/tsconfig.json

This file was deleted.

5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@
"test:ci": "vitest run",
"test:e2e": "chmod +x ./run-playwright.sh && sh ./run-playwright.sh",
"test:e2e:snapshot": "chmod +x ./run-playwright.sh && SBL_ENABLE_PLAYWRIGHT_SNAPSHOT_TESTING=true sh ./run-playwright.sh",
"test:e2e:ci": "vite build && yarn preview:test 'cypress run --record'",
"format": "prettier -uw --cache .",
"run-tsc": "tsc",
"run-eslint": "eslint --cache --fix --ignore-path .gitignore --ignore-path .eslintignore --ext .ts,.tsx .",
"run-stylelint": "stylelint --cache --fix --ignore-path .gitignore **/*.css",
"run-prettier": "prettier -uc --cache .",
"lint": "run-p run-tsc run-eslint run-stylelint",
"validate": "run-p lint test:ci test:e2e:headless"
"validate": "run-p lint test:ci test:e2e"
},
"dependencies": {
"@hookform/resolvers": "^3.2.0",
Expand Down Expand Up @@ -90,7 +89,6 @@
"autoprefixer": "^10.4.14",
"commitizen": "4.3.0",
"css-mediaquery": "0.1.2",
"cypress": "13.11.0",
"cz-conventional-changelog": "3.3.0",
"debug": "^4.3.4",
"dotenv": "^16.4.5",
Expand All @@ -100,7 +98,6 @@
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-cypress": "2.13.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.3",
"eslint-plugin-jsx-a11y": "6.7.1",
Expand Down
Loading

0 comments on commit b84427e

Please sign in to comment.