PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar mahmoudmagdy1-1
mahmoudmagdy1-1
13 Jul 2025

Continuation of #45552

Summary of Changes

a fully Joomla stack : fresh joomla installation with phpmyadmin,xdebug,cypress
This PR adds the ability to test other PRs using GitHub Codespaces, or even use it as a full development environment.
you can access the database directly using phpmyadmin, and run tests using Cypress, you can find more details in the codespace-details.txt file after creating the codespace with this PR

Testing Instructions

  1. Create a new codespace from a branch that contains the .devcontainer files
  2. You can access and see the Joomla install / Cypress GUI in "ports" inside github.dev
  3. For credentials and more details you can see codespace-details.txt

Actual result BEFORE applying this Pull Request

N/A

Expected result AFTER applying this Pull Request

An easy way to test PRs on the cloud without setting everything up manually and on your local machine

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

avatar mahmoudmagdy1-1 mahmoudmagdy1-1 - open - 13 Jul 2025
avatar mahmoudmagdy1-1 mahmoudmagdy1-1 - change - 13 Jul 2025
Status New Pending
avatar mahmoudmagdy1-1 mahmoudmagdy1-1 - change - 13 Jul 2025
Labels Added: PR-6.0-dev
avatar brianteeman
brianteeman - comment - 14 Jul 2025

Is it expected that at the end of the setup the terminal doesnt return to a prompt

image
avatar brianteeman
brianteeman - comment - 14 Jul 2025

It is not possible to run the cypress tests as Joomla wont install in this configuration see screenshot

image
avatar mahmoudmagdy1-1
mahmoudmagdy1-1 - comment - 14 Jul 2025

It is not possible to run the cypress tests as Joomla wont install in this configuration see screenshot

we don't need to run the installation script as Joomla is already installed automatically, you can access it when clicking on this after the github codespaces finishes building
image
other tests pass normally using this setup, for example:
image

avatar mahmoudmagdy1-1
mahmoudmagdy1-1 - comment - 14 Jul 2025

Is it expected that at the end of the setup the terminal doesnt return to a prompt
yes this is expected after building the container, but you can always start a new terminal

avatar mahmoudmagdy1-1
mahmoudmagdy1-1 - comment - 14 Jul 2025

Is it expected that at the end of the setup the terminal doesnt return to a prompt

yes this is expected after building the container, but you can always start a new terminal

avatar brianteeman
brianteeman - comment - 14 Jul 2025

Is it expected that at the end of the setup the terminal doesnt return to a prompt

yes this is expected after building the container, but you can always start a new terminal

thanks - was just checking

avatar brianteeman
brianteeman - comment - 14 Jul 2025

It is not possible to run the cypress tests as Joomla wont install in this configuration see screenshot

we don't need to run the installation script as Joomla is already installed automatically, you can access it when clicking on this after the github codespaces finishes building

Then I suggest a change in the text is required because it currently says

    echo "  Run interactive tests: npx cypress open"
    echo "  Run headless tests:   npx cypress run"

and that fails because the first test is installation and that will fail for the reasons above

avatar mahmoudmagdy1-1
mahmoudmagdy1-1 - comment - 15 Jul 2025

Then I suggest a change in the text is required because it currently says

    echo "  Run interactive tests: npx cypress open"
    echo "  Run headless tests:   npx cypress run"

and that fails because the first test is installation and that will fail for the reasons above

okay, what do you suggest i should change the text to? i want to also add that you can use npx cypress run --spec path/to/file.spec.js to run a specific spec and you don't have to run all specs at once
I think the current cypress tests are mainly focused on the ci pipeline (please correct me if i'm wrong), but at least with this setup if someone wants to test or add a spec they can

avatar mahmoudmagdy1-1
mahmoudmagdy1-1 - comment - 16 Jul 2025

I just edited some of the joomla config names to match Cypress config' default values, and got Cypress to run and pass all tests, except 2 test files that had 2 errors each
image
those are the files with the errors
image
the error is the same for all 4 failing tests:
image

I would love to hear some feedback about the setup and if someone can direct me on how fix the last errors, this exact error was mentioned in #44434 but had no actual solution

Add a Comment

Login with GitHub to post a comment