Skip to content

Commit

Permalink
2nd ESM Update tests/System/README.md (#43731)
Browse files Browse the repository at this point in the history
With the #43702 ESM documentation update, the small problem has arisen that `npx` uses `cypress.config.js` in error messages, although `cypress.config.mjs` is used. This was 'fixed' in using `npm`.

Unfortunately, it turned out that:
* npx cypress run --spec
is not replaceable by:
* npm run cypress:run --spec
therefore changed back.

A short note has been added to the Troubleshooting section.

It was also discovered that the environment variable in the `sudo` call was set in the wrong order, which has been corrected.

Co-authored-by: Allon Moritz <allon.moritz@digital-peak.com>
  • Loading branch information
muhme and laoneo authored Jul 22, 2024
1 parent 8bceedb commit 1221ba2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/System/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ npm run cypress:run

You can execute single test specs, e.g. to run the installation step only.
```
npm run cypress:run --spec tests/System/integration/install/Installation.cy.js
npx cypress run --spec tests/System/integration/install/Installation.cy.js
```

You can run multiple test specs separated by commas and use patterns. For example, to execute all the tests from the
administrator, site, api and plugins specs without the installation step:
You can run multiple test specs separated by commas and use patterns.
For example, to run all tests without the installation step:
```
npm run cypress:run --spec 'tests/System/integration/{administrator,site,api,plugins}/**/*.cy.js'
npx cypress run --spec 'tests/System/integration/{administrator,site,api,plugins}/**/*.cy.js'
```

> [!NOTE]
Expand Down Expand Up @@ -293,7 +293,7 @@ sudo npm run cypress:run

If the `root` user does not have a Cypress installation, you can use the Cypress installation cache of the current user:
```
sudo CYPRESS_CACHE_FOLDER=$HOME/.cache/Cypress npm run cypress:run
CYPRESS_CACHE_FOLDER=$HOME/.cache/Cypress sudo npm run cypress:run
```


Expand All @@ -310,6 +310,8 @@ If the used SMTP server port is already in use you will see an error like:

:point_right: Configure a different, unused port in the `cypress.config.mjs` file as `smtp_port`.

:point_right: If you use `npx` instead of `npm`, you may see `Your configFile threw an error from: cypress.config.js`,
but you still need to configure `cypress.config.mjs` file.

### Timeout Error on Slow Machines

Expand Down

0 comments on commit 1221ba2

Please sign in to comment.