mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Replace Protrator e2e tests with Cypress. Move all existing tests to Cypress & add basic Deque Axe integration.
This commit is contained in:
22
README.md
22
README.md
@@ -104,9 +104,9 @@ Default configuration file is located in `src/environments/` folder.
|
||||
To change the default configuration values, create local files that override the parameters you need to change. You can use `environment.template.ts` as a starting point.
|
||||
|
||||
- Create a new `environment.dev.ts` file in `src/environments/` for a `development` environment;
|
||||
- Create a new `environment.prod.ts` file in `src/environments/` for a `production` environment;
|
||||
- Create a new `environment.prod.ts` file in `src/environments/` for a `production` environment;
|
||||
|
||||
The server settings can also be overwritten using an environment file.
|
||||
The server settings can also be overwritten using an environment file.
|
||||
|
||||
This file should be called `.env` and be placed in the project root.
|
||||
|
||||
@@ -125,7 +125,7 @@ DSPACE_REST_SSL # Whether the angular REST uses SSL [true/false]
|
||||
```
|
||||
|
||||
The same settings can also be overwritten by setting system environment variables instead, E.g.:
|
||||
```bash
|
||||
```bash
|
||||
export DSPACE_HOST=api7.dspace.org
|
||||
```
|
||||
|
||||
@@ -140,7 +140,7 @@ To use environment variables in a UI component, use:
|
||||
import { environment } from '../environment.ts';
|
||||
```
|
||||
|
||||
This file is generated by the script located in `scripts/set-env.ts`. This script will run automatically before every build, or can be manually triggered using the appropriate `config` script in `package.json`
|
||||
This file is generated by the script located in `scripts/set-env.ts`. This script will run automatically before every build, or can be manually triggered using the appropriate `config` script in `package.json`
|
||||
|
||||
|
||||
Running the app
|
||||
@@ -219,19 +219,11 @@ and run: `yarn run test`
|
||||
|
||||
### E2E test
|
||||
|
||||
E2E tests use Protractor + Selenium server + browsers. You can find the configuration file at the same level of this README file:`./protractor.conf.js` Protractor is installed as 'local' as a dev dependency.
|
||||
E2E tests (aka integration tests) use [Cypress.io](https://www.cypress.io/). Configuration for cypress can be found in the `cypress.json` file in the root directory.
|
||||
|
||||
If you are going to use a remote test enviroment you need to edit the './e2e//protractor.conf.js'. Follow the instructions you will find inside it.
|
||||
The test files can be found in the `./cypress/integration/` folder.
|
||||
|
||||
The default browser is Google Chrome.
|
||||
|
||||
Place your tests at the following path: `./e2e`
|
||||
|
||||
and run: `ng e2e`
|
||||
|
||||
### Continuous Integration (CI) Test
|
||||
|
||||
To run all the tests (e.g.: to run tests with Continuous Integration software) you can execute:`yarn run ci` Keep in mind that this command prerequisites are the sum of unit test and E2E tests.
|
||||
Run `ng e2e` to kick off the tests. This will start Cypress and allow you to select the browser you wish to use, as well as whether you wish to run all tests or an individual test file.
|
||||
|
||||
Documentation
|
||||
--------------
|
||||
|
Reference in New Issue
Block a user