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] System Tests fixes #43620, fixes #43622 #43656

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

muhme
Copy link
Contributor

@muhme muhme commented Jun 15, 2024

Pull Request for Issue #43620 and Issue #43622

Summary of Changes

Testing Instructions

tested was #43620 with branch dev-4.4 on macOS 14.5 Sonoma, Windows 11 Pro and Ubuntu 24.04 LTS Noble Numbat

  • for Windows: ensured no 'rm' binary is installed (with Laragon simple moved away)
  • run two times
    • npx cypress run --spec tests/System/integration/install/Installation.cy.js
    • 2nd time it fails with
      AssertionError: Timed out retrying after 4000ms: Expected to find element: #jform_language, but never found it.
      at Context.installJoomla (webpack://joomla/./node_modules/joomla-cypress/src/joomla.js:10:0)
  • implement PR
  • run installation step twice without errors
  • run complete test suite without errors

tested was #43622 with branch dev-4.4 on macOS 14.5 Sonoma, Windows 11 Pro and Ubuntu 24.04 LTS Noble Numbat

  • set cmsPath: 'my_fs_path' or '/laragon/www/joomla-cms.old' (and baseUrl if needed)
  • run two times
    • npx cypress run --spec tests/System/integration/install/Installation.cy.js
    • 2nd time it fails with
      AssertionError: Timed out retrying after 4000ms: Expected to find element: #jform_language, but never found it.
      at Context.installJoomla (webpack://joomla/./node_modules/joomla-cypress/src/joomla.js:10:0)
  • implement PR
  • run installation step twice without errors
  • run complete test suite without errors

tested with branches dev-4.4, dev-5.1, dev-5.2 and dev-6.0 on docker based installation

  • merged PR
  • run installation step twice without errors
  • run complete test suite without errors

Actual result BEFORE applying this Pull Request

  • starting with second run of System Tests installation step:
    • if fails on Windows if no 'rm' binary exists
    • if fails if 'cmsPath' is set != "."

Expected result AFTER applying this Pull Request

  • second and all following runs of System Tests installation step:
    • works on Windows if no 'rm' binary exists
    • works if 'cmsPath' is set != "."

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

Upmerge

  • Please up-merge this PR to dev-5.1, dev-5.2 and dev-6.0 as the fixed issues are the same for those branches.

- fixes issue joomla#43620 - if no 'rm' command is available on Windows
- fixes issue joomla#43622 - if cmsPath is set
- custom task 'deleteFolder' can also delete a file and ignores
  if the file does not exist -> exactly what we need
- once PR is merged i will create the next PR to rename 'deleteFolder' as 'deleteRelativePath'
  and also 'writeFile' as 'writeRelativeFile' to better represent the functions
@alikon
Copy link
Contributor

alikon commented Jun 16, 2024

I have tested this item ✅ successfully on 771522b


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

@laoneo laoneo added this to the Joomla! 4.4.6 milestone Jun 17, 2024
@laoneo laoneo merged commit 22beae0 into joomla:4.4-dev Jun 17, 2024
3 of 4 checks passed
@laoneo
Copy link
Member

laoneo commented Jun 17, 2024

Thanks!

muhme added a commit to muhme/joomla-cms that referenced this pull request Jun 17, 2024
- rename deleteFolder > deleteRelativePath
  - to respect the custom task also deletes files and it does it relative to cmsPath
- rename writeFile > writeRelativeFile
  - to unify task naming and to clarify it write relative to cmsPath
- additinal:
  - small comment enhancements
  - using const name 'path' from require('path');

- no functionality is changed, only method name, variable name and comment changes
- this is a follow-up to PR joomla#43656
- tested on branch dev-4.4 successfully
laoneo pushed a commit that referenced this pull request Jun 20, 2024
* [cypress] Rename deleteFolder to clarify function

- rename deleteFolder > deleteRelativePath
  - to respect the custom task also deletes files and it does it relative to cmsPath
- rename writeFile > writeRelativeFile
  - to unify task naming and to clarify it write relative to cmsPath
- additinal:
  - small comment enhancements
  - using const name 'path' from require('path');

- no functionality is changed, only method name, variable name and comment changes
- this is a follow-up to PR #43656
- tested on branch dev-4.4 successfully

* Change to writeRelativeFile in 2 samples too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants