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 Windows run #43620

Closed
muhme opened this issue Jun 5, 2024 · 1 comment
Closed

Cypress System Test fails on 2nd Windows run #43620

muhme opened this issue Jun 5, 2024 · 1 comment

Comments

@muhme
Copy link
Contributor

muhme commented Jun 5, 2024

Steps to reproduce the issue

> npx cypress run
> npx cypress run

Expected result

The system test suite is executed twice without errors, like on macOS or Linux.

Actual result

First time the system test suite is executed without errors. Second time it is failing in 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 Windows 11 Pro, Laragon with Cmder, branch 4.4-dev

Additional comments

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

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

There is no rm command on Windows.

👉 Workaround is to delete configuration.php before 2nd test run.

This is a minor issue and i will create a PR afterwards.

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

3 participants