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 Test fails on 2nd run if cmsPath set #43622

Closed
muhme opened this issue Jun 6, 2024 · 3 comments
Closed

Cypress System Test fails on 2nd run if cmsPath set #43622

muhme opened this issue Jun 6, 2024 · 3 comments

Comments

@muhme
Copy link
Contributor

muhme commented Jun 6, 2024

Steps to reproduce the issue

Having an installation with cmsPath set != "." e.g. cmsPath="/tests/www/cmysql/" like drone does

> npx cypress run
> npx cypress run

Expected result

The system test suite is executed twice without errors like with cmsPath="."

Actual result

First time the system test suite is executed without errors. Second time it is failing in the first step 'Install Joomla':

  Install Joomla
    1) Install Joomla


  0 passing (6s)
  1 failing

  1) Install Joomla
       Install Joomla:
     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)

System information (as much as possible)

Seen on docker drone system tests clone, branch 4.4-dev

Additional comments

Obvious reason is missing cmsPath in tests\System\integration\install\Installation.cy.js with

    cy.exec('rm configuration.php', { failOnNonZeroExit: false });

👉 Workaround is to delete file configuration.php in directory cmsPath before 2nd test run.

This is a minor issue and i will create a PR afterwards together with #43620.

@rdeutz
Copy link
Contributor

rdeutz commented Jun 12, 2024

You can create a PR directly an issue is not needed.

@muhme
Copy link
Contributor Author

muhme commented Jun 13, 2024

thx, i have already created PR directly

muhme added a commit to muhme/joomla-cms that referenced this issue Jun 15, 2024
- 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 15, 2024

closing as we have a pr #43656

@alikon alikon closed this as completed Jun 15, 2024
laoneo pushed a commit that referenced this issue Jun 17, 2024
- fixes issue #43620 - if no 'rm' command is available on Windows
- fixes issue #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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants