Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add short Cypress test script npm run test:short #3309

Merged
merged 2 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This repository contains the source files of the official website for the Corona

You need the Node.js 18 (Active LTS) version of [Node.js](https://nodejs.org/en/) (which includes npm) to build the website.

In case you use a Mac computer with Apple Silicon, make sure that [Rosetta](https://support.apple.com/en-us/HT211861) is installed.
In case you use a Mac computer with Apple Silicon, make sure that [Rosetta](https://support.apple.com/en-us/HT211861) is installed.

### Getting started

Expand Down Expand Up @@ -80,9 +80,16 @@ Manuals for the most common use cases of updating website content are available
[Cypress](https://docs.cypress.io/guides/overview/why-cypress.html#In-a-nutshell) is used to run End-To-End tests. Tests are located in the `cypress/e2e` folder and can be run with:

```bash
npm run test
npm test
```
Since the full test includes testing of external links which can take 10 to 15 minutes to execute, a shorter version of the test is available, which excludes testing external links. It can be run with:
```bash
npm run test:short
```
To interactively run individual tests through the Cypress console use:
```bash
npm run test:open
```
Alternatively, execute `npm run test:open` to select individual tests to run from the Cypress console.

To minimize the occurrence of errors we would ask you to perform all tests when contributing to our repository.

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "corona-warn-app-landingpage",
"version": "1.1.0",
"version": "1.2.0",
"description": "Corona-Warn-App website coronawarn.app",
"main": "gulpfile.js",
"main": "gulpfile.mjs",
"scripts": {
"start-fast": "gulp --skip-compression",
"start": "gulp",
Expand All @@ -11,14 +11,17 @@
"cypress:open": "cypress open --e2e --browser chrome",
"cypress:run:chrome": "cypress run --browser chrome --headed",
"cypress:run:firefox": "cypress run --browser firefox --headed",
"cypress:run:short": "cypress run -s 'cypress/e2e/*.js' --e2e --headless",
"start-server": "gulp start-server",
"test:open:phase2": "start-server-and-test start-server http://localhost:8000 cypress:open",
"test:open": "run-s build test:open:phase2",
"test": "npm run test:chrome",
"test:chrome:phase2": "start-server-and-test start-server http://localhost:8000 cypress:run:chrome",
"test:chrome": "run-s build test:chrome:phase2",
"test:firefox:phase2": "start-server-and-test start-server http://localhost:8000 cypress:run:firefox",
"test:firefox": "run-s build test:firefox:phase2"
"test:firefox": "run-s build test:firefox:phase2",
"test:short": "run-s build test:short:phase2",
"test:short:phase2": "start-server-and-test start-server http://localhost:8000 cypress:run:short"
},
"author": "SAP Corona-Warn-App Open Source Team <[email protected]>",
"license": "Apache-2.0",
Expand Down