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

[cypress] ESM docu update #43702

Merged
merged 6 commits into from
Jun 26, 2024
Merged

[cypress] ESM docu update #43702

merged 6 commits into from
Jun 26, 2024

Conversation

muhme
Copy link
Contributor

@muhme muhme commented Jun 25, 2024

After PR #43676 '[4.4] Move the Cypress Tests to ESM' the Cypress config file is renamed to cypress.config.mjs. This PR is for updating README, architecture pictures and the Cypress run option in package.json.

Summary of Changes

  1. Update file names cypress.config.mjs and cypress.config.dist.mjs in README and architecture pictures.
  2. Update README with Cypress defineConfig() syntax for new ESM
  3. Explicit name --config-file cypress.config.mjs in package.json to have the new file name in error messages. As this does not work for npx cypress, all given commands are changed to use npm run cypress in README.

Testing Instructions

  • Check all usage of cypress.config.js and cypress.config.dist.js are updated.
  • Check all npx commands are replaces by correct npm run
  • Check all changes, something missing?

Actual result BEFORE applying this Pull Request

  • tests/System/README.md and the used architecture pictures are documenting cypress.config.js and cypress.config.dist.js
  • npx for running Cypress in the code samples

Expected result AFTER applying this Pull Request

  • tests/System/README.md and the used architecture pictures are documenting cypress.config.mjs and cypress.config.dist.mjs
  • npm run for running Cypress in the code samples

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

Note

There are other places with cypress.config.js and cypress.config.dist.js in the source code, which will be covered in a follow-up PR.

muhme added 6 commits June 7, 2024 06:47
Consider file permissions when writing configuration in system tests …
merge joomla/joomla-cms branch 4.4-dev
After PR joomla#43676 '[4.4] Move the Cypress Tests to ESM' the cypress config file is renamed to `.mjs`.
This PR is for updating README and architecture pictures.
Update with Cypress defineConfig() syntax for new ESM
1. Error messages still mention `cypress.config.js`, e.g. on EADDRINUSE,
even there is only `cypress.config.mjs` exisiting:
```
Your configFile threw an error from: cypress.config.js
```

This is avoided for `npm run cypress` by explicitly specifying the name `cypress.config.mjs`.

2. As this does not work for `npx cypress`, all given commands are changed to use `npm run cypress`.
@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-4.4-dev Unit/System Tests labels Jun 25, 2024
@alikon
Copy link
Contributor

alikon commented Jun 25, 2024

I have tested this item ✅ successfully on 45325eb


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43702.

@laoneo laoneo self-assigned this Jun 26, 2024
@laoneo laoneo added this to the Joomla! 4.4.6 milestone Jun 26, 2024
@laoneo laoneo merged commit 10278a1 into joomla:4.4-dev Jun 26, 2024
3 of 4 checks passed
@laoneo
Copy link
Member

laoneo commented Jun 26, 2024

Thanks!

muhme added a commit to muhme/joomla-cms that referenced this pull request Jul 2, 2024
With the joomla#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.
@muhme muhme mentioned this pull request Jul 2, 2024
4 tasks
@muhme muhme deleted the esm-docu-update branch July 12, 2024 10:01
laoneo added a commit that referenced this pull request Jul 22, 2024
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NPM Resource Changed This Pull Request can't be tested by Patchtester PR-4.4-dev Unit/System Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants