@@ -10,9 +10,9 @@ DB_NAME="test_joomla"
1010DB_USER=" joomla_ut"
1111DB_PASS=" joomla_ut"
1212ADMIN_USER=" ci-admin"
13- ADMIN_REAL_NAME=" john doe"
13+ ADMIN_REAL_NAME=" jane doe"
1414ADMIN_PASS=" joomla-17082005"
15- ADMIN_EMAIL=" admin@example.org "
15+ ADMIN_EMAIL=" admin@example.com "
1616JOOMLA_ROOT=" /workspaces/joomla-cms"
1717
1818# Allow git commands to run safely in the container
@@ -34,7 +34,7 @@ echo "✅ Dependencies installed."
3434# --- 3. Install Joomla from Repository Source ---
3535echo " --> Installing Joomla using the local repository source..."
3636php installation/joomla.php install \
37- --site-name=" Joomla Core Dev " \
37+ --site-name=" Joomla CMS Test " \
3838 --admin-user=" $ADMIN_REAL_NAME " \
3939 --admin-username=" $ADMIN_USER " \
4040 --admin-password=" $ADMIN_PASS " \
@@ -52,7 +52,7 @@ echo "✅ Joomla installed."
5252# --- 4. Configure Joomla for Development ---
5353echo " --> Applying development settings..."
5454# Enable debug mode and maximum error reporting for easier troubleshooting.
55- php cli/joomla.php config:set debug=true error_reporting=maximum
55+ php cli/joomla.php config:set error_reporting=maximum
5656echo " ✅ Development settings applied."
5757
5858# --- 5. Install and Configure phpMyAdmin ---
@@ -90,6 +90,8 @@ echo "--> Ignoring local changes..."
9090git update-index --assume-unchanged " index.php"
9191git update-index --assume-unchanged " administrator/index.php"
9292git update-index --assume-unchanged " package-lock.json"
93+ git update-index --assume-unchanged " tests/System/integration/install/Installation.cy.js"
94+ git update-index --assume-unchanged " tests/System/support/commands/config.mjs"
9395
9496# For NEW UNTRACKED files, add them to the local exclude file
9597echo " cypress.config.js" >> " .git/info/exclude"
@@ -100,9 +102,16 @@ echo "codespace-details.txt" >> ".git/info/exclude"
100102
101103# --- 7. Finalize Permissions and Testing Tools ---
102104echo " --> Setting up file permissions and Cypress..."
105+ sed -i \
106+ -e " /\/\/ If exists, delete PHP configuration file to force a new installation/d" \
107+ -e " /cy.task('deleteRelativePath', 'configuration.php');/d" \
108+ -e " /cy.installJoomla(config);/d" \
109+ tests/System/integration/install/Installation.cy.js
110+ sed -i " s/return cy.task('writeRelativeFile', { path: 'configuration.php', content });/return cy.task('writeRelativeFile', { path: 'configuration.php', content, mode: 0o775 });/" tests/System/support/commands/config.mjs
111+
103112# Ensure Cypress is executable and owned by the web server user
104- cp cypress.config.dist.mjs cypress.config.js
105113chmod +x ./node_modules/.bin/cypress
114+ cp cypress.config.dist.mjs cypress.config.js
106115npx cypress install
107116sed -i -e " s|baseUrl:.*|baseUrl: 'http://localhost:80',|" -e " s/db_host: 'localhost'/db_host: 'mysql'/g" -e " s/db_user: 'root'/db_user: 'joomla_ut'/g" -e " s/db_password: ''/db_password: 'joomla_ut'/g" cypress.config.js
108117
0 commit comments