Skip to content

Commit

Permalink
Remove Cypress tests and references from the app
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjarling committed Apr 8, 2024
1 parent 246dd30 commit c98d7c3
Show file tree
Hide file tree
Showing 24 changed files with 398 additions and 3,540 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Digital Collections v2 (DCv2) is a UI application for discovering and interactin

The following dependencies should be "pinned" or held behind `@latest` versions

- `next`: We've experienced issues with the AWS Amplify build process when using `@latest` versions of NextJS. To be safe, in general we should pin NextJS to >= 1 minor versions behind `next@latest`.
- `@elastic/elasticsearch`: To match the version of `OpenSearch` our app uses.
- `swiper`
- `@honeybadger-io/js`
Expand Down Expand Up @@ -123,17 +122,28 @@ A pre-commit hook will ensure code is linted before committed.

### End to end tests

Test fixtures can be accessed by pointing the app to a [Test Environment API](https://github.com/nulib/dc-test-environment). Setting the `NEXT_PUBLIC_DCAPI_ENDPOINT` `env` variable value to https://dc-test-api.rdc-staging.library.northwestern.edu/api/v2 will run DC v2 against test data. The following commands start your server and the test suite.
Test fixtures can be accessed by pointing the app to a [Test Environment API](https://github.com/nulib/dc-test-environment).

```
`NEXT_PUBLIC_DCAPI_ENDPOINT="https://dc-test-api.rdc-staging.library.northwestern.edu/api/v2"`
```

In local dev mode, run the following commands:

```bash

# Point to the test environment
# Set this variable either in your shell or in a `.env.local` file
NEXT_PUBLIC_DCAPI_ENDPOINT="https://dc-test-api.rdc-staging.library.northwestern.edu/api/v2"

# Start local server
npm run dev:test-env

# Start Cypress test runner
npm run cypress:open
# Start Playwright test runner
npm run test:playwright
```

E2E tests use [Cypress](https://docs.cypress.io/), and are linted with [Cypress ESLint Plugin](https://github.com/cypress-io/eslint-plugin-cypress).
For more info, view the docs: [Playwright](https://playwright.dev/).

### Unit tests

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

This file was deleted.

8 changes: 0 additions & 8 deletions cypress/.eslintrc.json

This file was deleted.

32 changes: 0 additions & 32 deletions cypress/e2e/homepage/homepage.cy.ts

This file was deleted.

15 changes: 0 additions & 15 deletions cypress/e2e/item/item.cy.ts

This file was deleted.

285 changes: 0 additions & 285 deletions cypress/e2e/search/search.cy.ts

This file was deleted.

Loading

0 comments on commit c98d7c3

Please sign in to comment.