Skip to content

Commit

Permalink
Remove Cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
leoapost committed May 29, 2024
1 parent e80dc5e commit c59cceb
Show file tree
Hide file tree
Showing 55 changed files with 152 additions and 6,079 deletions.
76 changes: 0 additions & 76 deletions .github/workflows/cypress.yml

This file was deleted.

8 changes: 2 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,9 @@ jobs:
name: Run the RSpec tests
uses: ./.github/workflows/rspec.yml

cypress:
name: Run the Cypress tests
uses: ./.github/workflows/cypress.yml

permit-merge:
name: Permit merge
needs: [lint, rspec, cypress]
needs: [lint, rspec]
runs-on: ubuntu-latest
steps:
- run: "echo 'Linting and tests passed, this branch is ready to be merged'"
Expand Down Expand Up @@ -132,7 +128,7 @@ jobs:

deploy_staging:
name: Deploy staging
needs: [docker, rspec, cypress, lint, brakeman]
needs: [docker, rspec, lint, brakeman]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
environment:
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ group :development, :test do
# Testing framework
gem "rspec-rails", "~> 6.1.2"

gem "cypress-on-rails", "~> 1.17"
gem "database_cleaner-active_record"

gem "dotenv-rails", "~> 2.8.1"
Expand Down
3 changes: 0 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ GEM
cssbundling-rails (1.4.0)
railties (>= 6.0.0)
csv (3.3.0)
cypress-on-rails (1.17.0)
rack
database_cleaner-active_record (2.1.0)
activerecord (>= 5.a)
database_cleaner-core (~> 2.0.0)
Expand Down Expand Up @@ -716,7 +714,6 @@ DEPENDENCIES
capybara (~> 3.40)
countries (~> 5.7)
cssbundling-rails (~> 1.4)
cypress-on-rails (~> 1.17)
database_cleaner-active_record
devise (>= 4.8.0)
dfe-analytics!
Expand Down
31 changes: 2 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ The E2E scenarios currently covered are:

Scenarios tests use the `:end_to_end_scenario` tag so that they get excluded from the standard rspec command

For more information on how we now write feature scenarios please our [feature testing documentation](./documentation/feature_testing.md)

### Setup

```
Expand All @@ -135,35 +137,6 @@ SCENARIOS=2,12,20 bundle exec bin/scenarios_ci

Please note: `--fail-fast` is recommended when running scenarios locally due to the length of time they can all take to run.

## End to end browser testing

We use Cypress for end-to-end tests. This integrates with Axe for automated accessibility tests.

We aim to have an accessibility and snapshot test for every page on the service.

### Setup

```
RAILS_ENV=test bin/rake db:create db:schema:load
```

Then in separate windows:

```
bin/rails server -e test -p 5017
yarn cypress:open
```

#### Moving to capybara

Features and user journeys are being migrated to Capybara as part of the feature scenarios and these can be run using:

```
bundle exec bin/features_ci
```

For more information on how we now write feature scenarios please our [feature testing documentation](./documentation/feature_testing.md)

## Smoke tests

Expand Down
14 changes: 0 additions & 14 deletions bin/cypress_ci

This file was deleted.

14 changes: 0 additions & 14 deletions config/initializers/cypress_on_rails.rb

This file was deleted.

181 changes: 0 additions & 181 deletions documentation/cypress_cucumber.md

This file was deleted.

Loading

0 comments on commit c59cceb

Please sign in to comment.