mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 15:25:57 +00:00
Cypress:
- removed unused commands - moved cypress config - adjusted documentation
This commit is contained in:
parent
c0dacdc243
commit
b5aaaa4e0c
@ -13,16 +13,13 @@ $ docker-compose up
|
||||
|
||||
## Setup without docker
|
||||
|
||||
First, you have to tell cypress how to connect to your local neo4j database
|
||||
among other things. You can copy our template configuration and change the new
|
||||
file according to your needs.
|
||||
To start the services that are required for cypress testing manually. You basically need the whole setup to run:
|
||||
|
||||
To start the services that are required for cypress testing, run:
|
||||
- backend
|
||||
- webapp
|
||||
- neo4j
|
||||
|
||||
```bash
|
||||
# in the top level folder Ocelot-Social/
|
||||
$ yarn cypress:setup
|
||||
```
|
||||
Navigate to the corresponding folders and start the services.
|
||||
|
||||
## Install cypress
|
||||
|
||||
@ -35,21 +32,11 @@ without docker, you would have to install cypress and its dependencies first:
|
||||
$ yarn install
|
||||
```
|
||||
|
||||
## Run cypress
|
||||
|
||||
After verifying that there are no errors with the servers starting, open another tab in your terminal and run the following command:
|
||||
|
||||
```bash
|
||||
$ yarn cypress:run
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Open Interactive Test Console
|
||||
|
||||
If you are like me, you might want to see some visual output. The interactive cypress environment also helps at debugging your tests, you can even time travel between individual steps and see the exact state of the app.
|
||||
The interactive cypress test console allows to run tests and have visual feedback on that. The interactive cypress environment also helps at debugging the tests, you can even time travel between individual steps and see the exact state of the app.
|
||||
|
||||
To use this feature, instead of `yarn cypress:run` you would run the following command:
|
||||
To use this feature run:
|
||||
|
||||
```bash
|
||||
$ yarn cypress:open
|
||||
@ -57,7 +44,19 @@ $ yarn cypress:open
|
||||
|
||||

|
||||
|
||||
## Run cypress
|
||||
|
||||
To run cypress without the user interface:
|
||||
|
||||
```bash
|
||||
$ yarn cypress:run
|
||||
```
|
||||
|
||||
This is used to run cypress in CI or in console
|
||||
|
||||

|
||||
|
||||
## Write some Tests
|
||||
|
||||
Check out the Cypress documentation for further information on how to write tests:
|
||||
[https://docs.cypress.io/guides/getting-started/writing-your-first-test.html\#Write-a-simple-test](https://docs.cypress.io/guides/getting-started/writing-your-first-test.html#Write-a-simple-test)
|
||||
[Write-a-simple-test](https://docs.cypress.io/guides/getting-started/writing-your-first-test.html#Write-a-simple-test)
|
||||
|
||||
@ -13,14 +13,10 @@
|
||||
"nonGlobalStepDefinitions": true
|
||||
},
|
||||
"scripts": {
|
||||
"install:all": "yarn install && cd backend && yarn install && cd ../webapp && yarn install",
|
||||
"db:seed": "cd backend && yarn run db:seed",
|
||||
"db:reset": "cd backend && yarn run db:reset",
|
||||
"cypress:backend": "cd backend && yarn run dev",
|
||||
"cypress:webapp": "cd webapp && yarn run dev",
|
||||
"cypress:setup": "run-p cypress:backend cypress:webapp",
|
||||
"cypress:run": "cross-env cypress run --browser electron",
|
||||
"cypress:open": "cross-env cypress open --browser electron",
|
||||
"cypress:run": "cypress run --browser electron --config-file ./cypress/cypress.json",
|
||||
"cypress:open": "cypress open --browser electron --config-file ./cypress/cypress.json",
|
||||
"cucumber:setup": "cd backend && yarn run dev",
|
||||
"cucumber": "wait-on tcp:4000 && cucumber-js --require-module @babel/register --exit",
|
||||
"release": "yarn version --no-git-tag-version --no-commit-hooks --no-commit && auto-changelog --latest-version $(node -p -e \"require('./package.json').version\") && cd backend && yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $(node -p -e \"require('./../package.json').version\") && cd ../webapp && yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $(node -p -e \"require('./../package.json').version\")"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user