+
+
+
+
+
+
+
+
+
+
+
diff --git a/administrator/components/com_scheduler/src/Model/TasksModel.php b/administrator/components/com_scheduler/src/Model/TasksModel.php
index ec1bbabe3dcf4..c699887897fba 100644
--- a/administrator/components/com_scheduler/src/Model/TasksModel.php
+++ b/administrator/components/com_scheduler/src/Model/TasksModel.php
@@ -472,7 +472,7 @@ public function hasDueTasks(Date $time): bool
* Check if we have right now any enabled due tasks and no locked tasks.
*
* @return boolean
- * @since __DEPLOY_VERSION__
+ * @since 5.2.0
*/
public function getHasDueTasks()
{
diff --git a/administrator/language/en-GB/com_joomlaupdate.ini b/administrator/language/en-GB/com_joomlaupdate.ini
index 5902c52891851..66daf5ab8fdb9 100644
--- a/administrator/language/en-GB/com_joomlaupdate.ini
+++ b/administrator/language/en-GB/com_joomlaupdate.ini
@@ -69,6 +69,8 @@ COM_JOOMLAUPDATE_SELF_EMPTYSTATE_CONTENT="You must update this component first b
COM_JOOMLAUPDATE_SELF_EMPTYSTATE_TITLE="A new version of the Joomla Update Component is available"
COM_JOOMLAUPDATE_SYSTEM_CHECK="System Check"
COM_JOOMLAUPDATE_TOOLBAR_CHECK="Check for Updates"
+COM_JOOMLAUPDATE_UPDATE_CHANGE_UPDATE_SOURCE_FAILED="Failed to reset the update channel from \"%1$s\" to \"%2$s\". Please change it in the Joomla Update Component's options so you don't miss future updates."
+COM_JOOMLAUPDATE_UPDATE_CHANGE_UPDATE_SOURCE_OK="The update channel has been reset from \"%1$s\" to \"%2$s\"."
COM_JOOMLAUPDATE_UPDATE_CHECK="Update Check"
COM_JOOMLAUPDATE_UPDATE_CONFIRM_BACKUP="I'm aware that a backup before any update is highly recommended."
COM_JOOMLAUPDATE_UPDATE_EMPTYSTATE_TITLE="Update your site to \"Joomla! %s\""
@@ -169,7 +171,7 @@ COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATE_NOTICE="Before you update Joomla, ensure th
COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATEFOUND="A Joomla update was found."
COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_CUSTOM="You are on the "%s" update channel. This is not an official Joomla update channel."
COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_DEFAULT="You are on the "%s" update channel. Through this channel you'll receive notifications for all updates of the current Joomla release (5.x)"
-COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_NEXT="You are on the "%s" update channel. Through this channel you'll receive notifications for all updates of the current Joomla release (5.x) and you will also be notified when the future major release (6.x) will be available. Before upgrading to 6.x you'll need to assess its compatibility with your environment."
+COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_NEXT="You are on the "%s" update channel. Through this channel you will be notified when the future major release (6.x) will be available. Before upgrading to 6.x you'll need to assess its compatibility with your environment. You will not be notified about updates of the current Joomla release (5.x)."
COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_TESTING="You are on the "%s" update channel. This channel is designed for testing new releases and fixes in Joomla.
It is only intended for JBS (Joomla Bug Squad™) members and others within the Joomla community who are testing. Do not use this setting on a production site."
COM_JOOMLAUPDATE_VIEW_DEFAULT_UPLOAD_INTRO="You can use this feature to update Joomla if your server is behind a firewall or otherwise unable to contact the update servers. First download the Joomla
Update Package in ZIP format from
the official Joomla download page. Then use the fields below to upload and install it."
COM_JOOMLAUPDATE_VIEW_UPDATE_BYTESEXTRACTED="Bytes extracted"
diff --git a/build/build.php b/build/build.php
index 262df44faeec1..34818dedb56a2 100644
--- a/build/build.php
+++ b/build/build.php
@@ -403,7 +403,7 @@ function clean_composer(string $dir)
'composer.json',
'composer.lock',
'crowdin.yml',
- 'cypress.config.dist.js',
+ 'cypress.config.dist.mjs',
'package-lock.json',
'package.json',
'phpunit-pgsql.xml.dist',
diff --git a/build/media_source/system/js/fields/joomla-field-subform.w-c.es6.js b/build/media_source/system/js/fields/joomla-field-subform.w-c.es6.js
index eaafaf052aea8..305b0d7c7165f 100644
--- a/build/media_source/system/js/fields/joomla-field-subform.w-c.es6.js
+++ b/build/media_source/system/js/fields/joomla-field-subform.w-c.es6.js
@@ -279,47 +279,61 @@ class JoomlaFieldSubform extends HTMLElement {
const nameNew = name.replace(`[${group}][`, `[${groupnew}][`); // New name
let idNew = id.replace(group, groupnew).replace(/\W/g, '_'); // Count new id
let countMulti = 0; // count for multiple radio/checkboxes
- let forOldAttr = id; // Fix "for" in the labels
+ const forOldAttr = $el.id; // Fix "for" in the labels
if ($el.type === 'checkbox' && name.match(/\[\]$/)) { //
fix
- // Recount id
countMulti = ids[id] ? ids[id].length : 0;
- if (!countMulti) {
- // Set the id for fieldset and group label
- const fieldset = $el.closest('fieldset.checkboxes');
- const elLbl = row.querySelector(`label[for="${id}"]`);
+ // Set the id for fieldset and group label
+ if (!countMulti) {
+ // Look for
or
+ let fieldset = $el.closest('.checkboxes');
+ // eslint-disable-next-line no-nested-ternary
+ fieldset = fieldset.nodeName === 'FIELDSET' ? fieldset : (fieldset.parentElement.nodeName === 'FIELDSET' ? fieldset.parentElement : false);
if (fieldset) {
- fieldset.setAttribute('id', idNew);
- }
+ const oldSetId = fieldset.id;
+ fieldset.id = idNew;
+
+ const groupLbl = row.querySelector(`label[for="${oldSetId}"]`);
- if (elLbl) {
- elLbl.setAttribute('for', idNew);
- elLbl.setAttribute('id', `${idNew}-lbl`);
+ if (groupLbl) {
+ groupLbl.setAttribute('for', idNew);
+
+ if (groupLbl.id) {
+ groupLbl.setAttribute('id', `${idNew}-lbl`);
+ }
+ }
}
}
- forOldAttr += countMulti;
+
idNew += countMulti;
} else if ($el.type === 'radio') { //
fix
- // Recount id
countMulti = ids[id] ? ids[id].length : 0;
- if (!countMulti) {
- // Set the id for fieldset and group label
- const fieldset = $el.closest('fieldset.radio');
- const elLbl = row.querySelector(`label[for="${id}"]`);
+ // Set the id for fieldset and group label
+ if (!countMulti) {
+ // Look for
or
+ let fieldset = $el.closest('.radio');
+ // eslint-disable-next-line no-nested-ternary
+ fieldset = fieldset.nodeName === 'FIELDSET' ? fieldset : (fieldset.parentElement.nodeName === 'FIELDSET' ? fieldset.parentElement : false);
if (fieldset) {
- fieldset.setAttribute('id', idNew);
- }
+ const oldSetId = fieldset.id;
+ fieldset.id = idNew;
+
+ const groupLbl = row.querySelector(`label[for="${oldSetId}"]`);
+
+ if (groupLbl) {
+ groupLbl.setAttribute('for', idNew);
- if (elLbl) {
- elLbl.setAttribute('for', idNew);
- elLbl.setAttribute('id', `${idNew}-lbl`);
+ if (groupLbl.id) {
+ groupLbl.setAttribute('id', `${idNew}-lbl`);
+ }
+ }
}
}
- forOldAttr += countMulti;
+
idNew += countMulti;
}
@@ -344,7 +358,10 @@ class JoomlaFieldSubform extends HTMLElement {
const lbl = row.querySelector(`label[for="${forOldAttr}"]`);
if (lbl) {
lbl.setAttribute('for', idNew);
- lbl.setAttribute('id', `${idNew}-lbl`);
+
+ if (lbl.id) {
+ lbl.setAttribute('id', `${idNew}-lbl`);
+ }
}
});
}
diff --git a/cypress.config.dist.js b/cypress.config.dist.mjs
similarity index 89%
rename from cypress.config.dist.js
rename to cypress.config.dist.mjs
index c402c269e5db0..e4d00070815a3 100644
--- a/cypress.config.dist.js
+++ b/cypress.config.dist.mjs
@@ -1,7 +1,7 @@
-const { defineConfig } = require('cypress');
-const setupPlugins = require('./tests/System/plugins/index');
+import { defineConfig } from 'cypress';
+import setupPlugins from './tests/System/plugins/index.mjs';
-module.exports = defineConfig({
+export default defineConfig({
fixturesFolder: 'tests/System/fixtures',
videosFolder: 'tests/System/output/videos',
screenshotsFolder: 'tests/System/output/screenshots',
diff --git a/installation/language/af-ZA/langmetadata.xml b/installation/language/af-ZA/langmetadata.xml
index d4f9bf4828a36..7572eabdbcf79 100644
--- a/installation/language/af-ZA/langmetadata.xml
+++ b/installation/language/af-ZA/langmetadata.xml
@@ -2,7 +2,7 @@
Afrikaans (Suid-Afrika)
5.1.2
- 2024-05
+ 2024-07
Afrikaans Translation Team
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/ar-AA/langmetadata.xml b/installation/language/ar-AA/langmetadata.xml
index 5b33d0f3a65fb..6ada8fbc21fb1 100644
--- a/installation/language/ar-AA/langmetadata.xml
+++ b/installation/language/ar-AA/langmetadata.xml
@@ -2,7 +2,7 @@
Arabic (اللغة العربية)
5.1.2
- 2024-05
+ 2024-07
Dr. Ashraf Damra
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/be-BY/langmetadata.xml b/installation/language/be-BY/langmetadata.xml
index 0fe818bea8e52..7dd6a6e958746 100644
--- a/installation/language/be-BY/langmetadata.xml
+++ b/installation/language/be-BY/langmetadata.xml
@@ -2,7 +2,7 @@
Belarusian (Belarus)
5.1.2
- 2024-05
+ 2024-07
Joomla Belarus Community
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/bg-BG/langmetadata.xml b/installation/language/bg-BG/langmetadata.xml
index 934487ebb9f6b..2560e6f4ddc3d 100644
--- a/installation/language/bg-BG/langmetadata.xml
+++ b/installation/language/bg-BG/langmetadata.xml
@@ -2,7 +2,7 @@
Bulgarian (bg-BG)
5.1.2
- 2024-05
+ 2024-07
Joomla! Bulgaria
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/ca-ES/langmetadata.xml b/installation/language/ca-ES/langmetadata.xml
index 6a4a1e500084e..781b39dbbb145 100644
--- a/installation/language/ca-ES/langmetadata.xml
+++ b/installation/language/ca-ES/langmetadata.xml
@@ -2,7 +2,7 @@
Catalan (ca-ES)
5.1.2
- 2024-05
+ 2024-07
Catalan [ca-ES] Translation Team
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/cs-CZ/langmetadata.xml b/installation/language/cs-CZ/langmetadata.xml
index 5aa1058cffdbf..d4ede0bf12ee1 100644
--- a/installation/language/cs-CZ/langmetadata.xml
+++ b/installation/language/cs-CZ/langmetadata.xml
@@ -2,7 +2,7 @@
Czech (Čeština)
5.1.2
- 2024-05
+ 2024-07
Czech Translation Team
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/cy-GB/langmetadata.xml b/installation/language/cy-GB/langmetadata.xml
index ab24c61926b19..9a5fb77200d30 100644
--- a/installation/language/cy-GB/langmetadata.xml
+++ b/installation/language/cy-GB/langmetadata.xml
@@ -2,7 +2,7 @@
Welsh (United Kingdom)
5.1.2
- 2024-05
+ 2024-07
Joomla! Project - Welsh Translation Team
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/da-DK/langmetadata.xml b/installation/language/da-DK/langmetadata.xml
index ce726490fdf34..110951f8b218e 100644
--- a/installation/language/da-DK/langmetadata.xml
+++ b/installation/language/da-DK/langmetadata.xml
@@ -2,7 +2,7 @@
Danish (Danmark)
5.1.2
- 2024-05
+ 2024-07
Danish Translation Team (Transl.: Ronny Buelund)
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/el-GR/langmetadata.xml b/installation/language/el-GR/langmetadata.xml
index 5983a85b5665c..b22a3faa9c998 100644
--- a/installation/language/el-GR/langmetadata.xml
+++ b/installation/language/el-GR/langmetadata.xml
@@ -2,7 +2,7 @@
Greek (el-GR)
5.1.2
- 2024-05
+ 2024-07
Ομάδα Μετάφρασης: joomla. gr
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/en-AU/langmetadata.xml b/installation/language/en-AU/langmetadata.xml
index 22c8bbc7a63fa..e45fe1004d07a 100644
--- a/installation/language/en-AU/langmetadata.xml
+++ b/installation/language/en-AU/langmetadata.xml
@@ -2,7 +2,7 @@
English (Australia)
5.1.2
- 2024-05
+ 2024-07
Joomla! Project
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/en-CA/langmetadata.xml b/installation/language/en-CA/langmetadata.xml
index 279535067c053..bb8519e7d085a 100644
--- a/installation/language/en-CA/langmetadata.xml
+++ b/installation/language/en-CA/langmetadata.xml
@@ -2,7 +2,7 @@
English (Canada)
5.1.2
- 2024-05
+ 2024-07
Joomla! Project
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/en-NZ/langmetadata.xml b/installation/language/en-NZ/langmetadata.xml
index 8e3538be28f9f..2813105a747bc 100644
--- a/installation/language/en-NZ/langmetadata.xml
+++ b/installation/language/en-NZ/langmetadata.xml
@@ -2,7 +2,7 @@
English (New Zealand)
5.1.2
- 2024-05
+ 2024-07
Joomla! Project
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/en-US/langmetadata.xml b/installation/language/en-US/langmetadata.xml
index 414d0362035d0..334174613e44e 100644
--- a/installation/language/en-US/langmetadata.xml
+++ b/installation/language/en-US/langmetadata.xml
@@ -2,7 +2,7 @@
English (United States)
5.1.2
- 2024-05
+ 2024-07
Joomla! Project
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/es-ES/langmetadata.xml b/installation/language/es-ES/langmetadata.xml
index 39fbc706b6746..232bd9bf45471 100644
--- a/installation/language/es-ES/langmetadata.xml
+++ b/installation/language/es-ES/langmetadata.xml
@@ -2,7 +2,7 @@
Spanish (es-ES)
5.1.2
- 2024-05
+ 2024-07
Spanish [es-ES] Translation Team
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/et-EE/langmetadata.xml b/installation/language/et-EE/langmetadata.xml
index 014c54398fe38..f01f436567b1c 100644
--- a/installation/language/et-EE/langmetadata.xml
+++ b/installation/language/et-EE/langmetadata.xml
@@ -2,7 +2,7 @@
Estonian
5.1.2
- 2024-05
+ 2024-07
Joomla! Project
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/eu-ES/langmetadata.xml b/installation/language/eu-ES/langmetadata.xml
index 1c8382e614ec8..4b2ff50ffa3b2 100644
--- a/installation/language/eu-ES/langmetadata.xml
+++ b/installation/language/eu-ES/langmetadata.xml
@@ -2,7 +2,7 @@
Basque
5.1.2
- 2024-05
+ 2024-07
Joomla! Basque Translation Team
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/fa-AF/langmetadata.xml b/installation/language/fa-AF/langmetadata.xml
index a5553c449a0ee..263127bc219a4 100644
--- a/installation/language/fa-AF/langmetadata.xml
+++ b/installation/language/fa-AF/langmetadata.xml
@@ -2,7 +2,7 @@
فارسی (دری)
5.1.2
- 2024-05
+ 2024-07
JoomlaPersian Translation Team
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/fa-IR/langmetadata.xml b/installation/language/fa-IR/langmetadata.xml
index a8a1ada620207..cba2468b7f13a 100644
--- a/installation/language/fa-IR/langmetadata.xml
+++ b/installation/language/fa-IR/langmetadata.xml
@@ -2,7 +2,7 @@
Persian (fa-IR)
5.1.2
- 2024-05
+ 2024-07
Persian Translation Team: joomlafarsi.com
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/fi-FI/langmetadata.xml b/installation/language/fi-FI/langmetadata.xml
index d4d8b6b8e0270..fb83c0bdb51fa 100644
--- a/installation/language/fi-FI/langmetadata.xml
+++ b/installation/language/fi-FI/langmetadata.xml
@@ -2,7 +2,7 @@
Finnish (Finland)
5.1.2
- 2024-05
+ 2024-07
Finnish translation team: Joomla.fi
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/fr-CA/langmetadata.xml b/installation/language/fr-CA/langmetadata.xml
index b9ee09a403f4d..c65199a822815 100644
--- a/installation/language/fr-CA/langmetadata.xml
+++ b/installation/language/fr-CA/langmetadata.xml
@@ -2,7 +2,7 @@
French (Canada)
5.1.2
- 2024-05
+ 2024-07
Joomla! Project - French translation team
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/fr-FR/langmetadata.xml b/installation/language/fr-FR/langmetadata.xml
index dbae79bb5f1d3..6b9e9e076f7dc 100644
--- a/installation/language/fr-FR/langmetadata.xml
+++ b/installation/language/fr-FR/langmetadata.xml
@@ -2,7 +2,7 @@
French (fr-FR)
5.1.2
- 2024-05
+ 2024-07
Joomla! Project - French translation team
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/he-IL/langmetadata.xml b/installation/language/he-IL/langmetadata.xml
index 29498025458d6..370f3cf5eacff 100644
--- a/installation/language/he-IL/langmetadata.xml
+++ b/installation/language/he-IL/langmetadata.xml
@@ -2,7 +2,7 @@
Hebrew (Israel)
5.1.2
- 2024-05
+ 2024-07
פרוייקט ג'ומלה
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/hr-HR/langmetadata.xml b/installation/language/hr-HR/langmetadata.xml
index 9a4b08b5a337d..dc86d1d8a36b9 100644
--- a/installation/language/hr-HR/langmetadata.xml
+++ b/installation/language/hr-HR/langmetadata.xml
@@ -2,7 +2,7 @@
Croatian (Croatia)
5.1.2
- 2024-05
+ 2024-07
Joomla! Hrvatska team
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/hu-HU/langmetadata.xml b/installation/language/hu-HU/langmetadata.xml
index 77f12ff716bae..202a7675de054 100644
--- a/installation/language/hu-HU/langmetadata.xml
+++ b/installation/language/hu-HU/langmetadata.xml
@@ -2,7 +2,7 @@
Hungarian (Magyar)
5.1.2
- 2024-05
+ 2024-07
Joomla! Magyarország
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/id-ID/langmetadata.xml b/installation/language/id-ID/langmetadata.xml
index 3914050426383..c25c2819183a8 100644
--- a/installation/language/id-ID/langmetadata.xml
+++ b/installation/language/id-ID/langmetadata.xml
@@ -2,7 +2,7 @@
Bahasa Indonesia (id-ID)
5.1.2
- 2024-05
+ 2024-07
Joomla! Indonesia
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/it-IT/langmetadata.xml b/installation/language/it-IT/langmetadata.xml
index f1eb07a223848..7610a4239e301 100644
--- a/installation/language/it-IT/langmetadata.xml
+++ b/installation/language/it-IT/langmetadata.xml
@@ -2,7 +2,7 @@
Italiano (it-IT)
5.1.2
- 2024-05
+ 2024-07
Joomla! Project (Italian Translation Team)
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/ja-JP/langmetadata.xml b/installation/language/ja-JP/langmetadata.xml
index dd1f67fab6bab..3af88db901010 100644
--- a/installation/language/ja-JP/langmetadata.xml
+++ b/installation/language/ja-JP/langmetadata.xml
@@ -2,7 +2,7 @@
Japanese (Japan)
5.1.2
- 2024-05
+ 2024-07
Joomla!じゃぱん
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/ka-GE/langmetadata.xml b/installation/language/ka-GE/langmetadata.xml
index 595f6adbd345c..c4ca918f1cc0b 100644
--- a/installation/language/ka-GE/langmetadata.xml
+++ b/installation/language/ka-GE/langmetadata.xml
@@ -2,7 +2,7 @@
Georgian (Georgia)
5.1.2
- 2024-05
+ 2024-07
Georgian Translation Team
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/kk-KZ/langmetadata.xml b/installation/language/kk-KZ/langmetadata.xml
index f158e72edc004..3a440b82c3775 100644
--- a/installation/language/kk-KZ/langmetadata.xml
+++ b/installation/language/kk-KZ/langmetadata.xml
@@ -2,7 +2,7 @@
Kazakh (Kazakhstan)
5.1.2
- 2024-05
+ 2024-07
Sarvarov Akylkerey
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/ko-KR/langmetadata.xml b/installation/language/ko-KR/langmetadata.xml
index 5e4a1b5bc6672..51bbf3327b650 100644
--- a/installation/language/ko-KR/langmetadata.xml
+++ b/installation/language/ko-KR/langmetadata.xml
@@ -2,7 +2,7 @@
Korean (Republic of Korea)
5.1.2
- 2024-05
+ 2024-07
Joomla! 프로젝트
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/lt-LT/langmetadata.xml b/installation/language/lt-LT/langmetadata.xml
index 4672f476b039d..14c66ae4d25f4 100644
--- a/installation/language/lt-LT/langmetadata.xml
+++ b/installation/language/lt-LT/langmetadata.xml
@@ -2,7 +2,7 @@
Lietuvių (lt-LT)
5.1.2
- 2024-05
+ 2024-07
Oskaras Jankauskas
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/lv-LV/langmetadata.xml b/installation/language/lv-LV/langmetadata.xml
index 2246a31f65b6e..6009b71c861ca 100644
--- a/installation/language/lv-LV/langmetadata.xml
+++ b/installation/language/lv-LV/langmetadata.xml
@@ -2,7 +2,7 @@
Latvian (Latvia)
5.1.2
- 2024-05
+ 2024-07
Joomla! Projekts
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/mk-MK/langmetadata.xml b/installation/language/mk-MK/langmetadata.xml
index 8441a648b3262..3039f4a3284f5 100644
--- a/installation/language/mk-MK/langmetadata.xml
+++ b/installation/language/mk-MK/langmetadata.xml
@@ -2,7 +2,7 @@
Macedonian (mk-MK)
5.1.2
- 2024-05
+ 2024-07
Joomla! Project
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/nl-BE/langmetadata.xml b/installation/language/nl-BE/langmetadata.xml
index 79d90d17abf2f..05cb11970a092 100644
--- a/installation/language/nl-BE/langmetadata.xml
+++ b/installation/language/nl-BE/langmetadata.xml
@@ -2,7 +2,7 @@
Dutch (Belgium)
5.1.2
- 2024-05
+ 2024-07
Dutch (BE) translation team
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/nl-NL/langmetadata.xml b/installation/language/nl-NL/langmetadata.xml
index 3ef59af286418..cc858bda3b539 100644
--- a/installation/language/nl-NL/langmetadata.xml
+++ b/installation/language/nl-NL/langmetadata.xml
@@ -2,7 +2,7 @@
Dutch (nl-NL)
5.1.2
- 2024-05
+ 2024-07
Dutch Translation Team
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/pl-PL/langmetadata.xml b/installation/language/pl-PL/langmetadata.xml
index dd6a2972574e1..5dbca359da994 100644
--- a/installation/language/pl-PL/langmetadata.xml
+++ b/installation/language/pl-PL/langmetadata.xml
@@ -2,7 +2,7 @@
Polski (PL)
5.1.2
- 2024-05
+ 2024-07
Projekt Joomla!
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/pt-BR/langmetadata.xml b/installation/language/pt-BR/langmetadata.xml
index 90a4c766bf1cb..b1c1bee491ae7 100644
--- a/installation/language/pt-BR/langmetadata.xml
+++ b/installation/language/pt-BR/langmetadata.xml
@@ -2,7 +2,7 @@
Português do Brasil (pt-BR)
5.1.2
- 2024-05
+ 2024-07
Projeto Joomla!
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/pt-PT/langmetadata.xml b/installation/language/pt-PT/langmetadata.xml
index 5f6b12ba73362..b2a7b6b5c818a 100644
--- a/installation/language/pt-PT/langmetadata.xml
+++ b/installation/language/pt-PT/langmetadata.xml
@@ -2,7 +2,7 @@
Português (Portugal)
5.1.2
- 2024-05
+ 2024-07
Comunidade JoomlaPortugal
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/ro-RO/langmetadata.xml b/installation/language/ro-RO/langmetadata.xml
index 470128d750b8e..da87ee2083fd0 100644
--- a/installation/language/ro-RO/langmetadata.xml
+++ b/installation/language/ro-RO/langmetadata.xml
@@ -2,7 +2,7 @@
Română (România)
5.1.2
- 2024-05
+ 2024-07
Horia Negura - Quanta
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/sk-SK/langmetadata.xml b/installation/language/sk-SK/langmetadata.xml
index b235cce37c330..ba1ed4c1c0f7a 100644
--- a/installation/language/sk-SK/langmetadata.xml
+++ b/installation/language/sk-SK/langmetadata.xml
@@ -2,7 +2,7 @@
Slovak (Slovakia)
5.1.2
- 2024-05
+ 2024-07
Slovak translation team : Peter Michnica
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/sl-SI/langmetadata.xml b/installation/language/sl-SI/langmetadata.xml
index d270b28ffc042..5d6d6ec461aee 100644
--- a/installation/language/sl-SI/langmetadata.xml
+++ b/installation/language/sl-SI/langmetadata.xml
@@ -2,7 +2,7 @@
Slovenščina (Slovenija)
5.1.2
- 2024-05
+ 2024-07
Slovenska prevajalska ekipa
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/sr-YU/langmetadata.xml b/installation/language/sr-YU/langmetadata.xml
index bed4a7bf7609d..571bb1f9af950 100644
--- a/installation/language/sr-YU/langmetadata.xml
+++ b/installation/language/sr-YU/langmetadata.xml
@@ -2,7 +2,7 @@
Srpski (Republika Srbija)
5.1.2
- 2024-05
+ 2024-07
Goran Nešić - UIX Web Design & Saša Matić Bardak.RS
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/sv-SE/langmetadata.xml b/installation/language/sv-SE/langmetadata.xml
index 51ff7cf87634e..ccc86c5cdcbe3 100644
--- a/installation/language/sv-SE/langmetadata.xml
+++ b/installation/language/sv-SE/langmetadata.xml
@@ -2,7 +2,7 @@
Swedish (Sweden)
5.1.2
- 2024-05
+ 2024-07
Swedish Translation Team - SvenskJoomla
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/ta-IN/langmetadata.xml b/installation/language/ta-IN/langmetadata.xml
index 174549b64dc03..63b463cbe102e 100644
--- a/installation/language/ta-IN/langmetadata.xml
+++ b/installation/language/ta-IN/langmetadata.xml
@@ -2,7 +2,7 @@
Tamil (India)
5.1.2
- 2024-05
+ 2024-07
Ilagnayeru 'MIG' Manickam, Elango Samy Manim
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/th-TH/langmetadata.xml b/installation/language/th-TH/langmetadata.xml
index eb26443ddf415..dd075d4fd5958 100644
--- a/installation/language/th-TH/langmetadata.xml
+++ b/installation/language/th-TH/langmetadata.xml
@@ -2,7 +2,7 @@
Thai (ภาษาไทย)
5.1.2
- 2024-05
+ 2024-07
Thai Translation Team
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/tr-TR/langmetadata.xml b/installation/language/tr-TR/langmetadata.xml
index 4d16c49962b99..127fb1c2d2a26 100644
--- a/installation/language/tr-TR/langmetadata.xml
+++ b/installation/language/tr-TR/langmetadata.xml
@@ -2,7 +2,7 @@
Turkish (Turkey)
5.1.2
- 2024-05
+ 2024-07
Joomla! Türkiye
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/uk-UA/langmetadata.xml b/installation/language/uk-UA/langmetadata.xml
index cda0dbd26209c..d9a96e8ae86ac 100644
--- a/installation/language/uk-UA/langmetadata.xml
+++ b/installation/language/uk-UA/langmetadata.xml
@@ -2,7 +2,7 @@
Ukrainian (uk-UA)
5.1.2
- 2024-05
+ 2024-07
Denys Nosov
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/ur-PK/langmetadata.xml b/installation/language/ur-PK/langmetadata.xml
index cd5a8b0b596b2..1657b4ea8eca0 100644
--- a/installation/language/ur-PK/langmetadata.xml
+++ b/installation/language/ur-PK/langmetadata.xml
@@ -2,7 +2,7 @@
انگریزی (برطانیہ)
5.1.2
- 2024-05
+ 2024-07
عبدالوحید
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/vi-VN/langmetadata.xml b/installation/language/vi-VN/langmetadata.xml
index c6c5d29519450..7ce369030b10d 100644
--- a/installation/language/vi-VN/langmetadata.xml
+++ b/installation/language/vi-VN/langmetadata.xml
@@ -2,7 +2,7 @@
Vietnamese (Vietnam)
5.1.2
- 2024-05
+ 2024-07
Joomla! Project
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/installation/language/zh-CN/langmetadata.xml b/installation/language/zh-CN/langmetadata.xml
index ab80bf513d877..17ec789a8ca94 100644
--- a/installation/language/zh-CN/langmetadata.xml
+++ b/installation/language/zh-CN/langmetadata.xml
@@ -2,16 +2,16 @@
Chinese Simplified (China)
5.1.2
- 2024-05
- Joomla!中文官网 www.joomlachina.org.cn 周永建
+ 2024-07
+ Joomla中文网
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
joomla.ini
- Chinese Simplified (zh-CN)
- Chinese Simplified (China)
+ 简体中文(zh-CN)
+ 简体中文 (中国)
zh-CN
0
diff --git a/installation/language/zh-TW/langmetadata.xml b/installation/language/zh-TW/langmetadata.xml
index 69b62d3c42d7a..f4139f199e53f 100644
--- a/installation/language/zh-TW/langmetadata.xml
+++ b/installation/language/zh-TW/langmetadata.xml
@@ -2,7 +2,7 @@
正體中文
5.1.2
- 2024-05
+ 2024-07
正體中文 Translation Team
(C) 2005 Open Source Matters, Inc.
GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/layouts/joomla/form/field/modal-select.php b/layouts/joomla/form/field/modal-select.php
index 95f9d189a53ad..04a11b89ebf79 100644
--- a/layouts/joomla/form/field/modal-select.php
+++ b/layouts/joomla/form/field/modal-select.php
@@ -73,5 +73,5 @@
+ name="" value="escape($value); ?>" />
diff --git a/libraries/src/Console/UpdateCoreCommand.php b/libraries/src/Console/UpdateCoreCommand.php
index 8a28fe15aab31..bef4f091c4722 100644
--- a/libraries/src/Console/UpdateCoreCommand.php
+++ b/libraries/src/Console/UpdateCoreCommand.php
@@ -272,6 +272,24 @@ private function updateJoomlaCore($updatemodel): bool
$result = $updatemodel->finaliseUpgrade();
if ($result) {
+ $updateSourceChanged = $updatemodel->resetUpdateSource();
+
+ if ($updateSourceChanged) {
+ $message = Text::sprintf(
+ 'COM_JOOMLAUPDATE_UPDATE_CHANGE_UPDATE_SOURCE_OK',
+ Text::_('COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_NEXT'),
+ Text::_('COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_DEFAULT')
+ );
+ $this->ioStyle->info($message);
+ } elseif ($updateSourceChanged !== null) {
+ $message = Text::sprintf(
+ 'COM_JOOMLAUPDATE_UPDATE_CHANGE_UPDATE_SOURCE_FAILED',
+ Text::_('COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_NEXT'),
+ Text::_('COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_DEFAULT')
+ );
+ $this->ioStyle->warning($message);
+ }
+
$this->progressBar->clear();
$this->ioStyle->writeln("Cleaning up ...");
$this->progressBar->display();
diff --git a/libraries/src/Form/FormField.php b/libraries/src/Form/FormField.php
index 65102767654ab..36f3e90c0f6b8 100644
--- a/libraries/src/Form/FormField.php
+++ b/libraries/src/Form/FormField.php
@@ -646,6 +646,9 @@ public function setup(\SimpleXMLElement $element, $value, $group = null)
$this->input = null;
$this->label = null;
+ // Reset the cached layout data
+ $this->layoutData = [];
+
// Set the XML element object.
$this->element = $element;
diff --git a/libraries/src/Http/Transport/SocketTransport.php b/libraries/src/Http/Transport/SocketTransport.php
index 17e9395a1e49c..a7e64e766ce0a 100644
--- a/libraries/src/Http/Transport/SocketTransport.php
+++ b/libraries/src/Http/Transport/SocketTransport.php
@@ -130,8 +130,8 @@ public function request($method, UriInterface $uri, $data = null, array $headers
$content = $this->getResponse($content);
// Follow Http redirects
- if ($content->code >= 301 && $content->code < 400 && isset($content->headers['Location'])) {
- return $this->request($method, new Uri($content->headers['Location']), $data, $headers, $timeout, $userAgent);
+ if ($content->code >= 301 && $content->code < 400 && isset($content->headers['Location'][0])) {
+ return $this->request($method, new Uri($content->headers['Location'][0]), $data, $headers, $timeout, $userAgent);
}
return $content;
diff --git a/libraries/src/Table/Content.php b/libraries/src/Table/Content.php
index 8bf6d85248b50..32b0a7dac83c4 100644
--- a/libraries/src/Table/Content.php
+++ b/libraries/src/Table/Content.php
@@ -330,6 +330,9 @@ public function store($updateNulls = true)
// Existing item
$this->modified_by = $user->id;
$this->modified = $date;
+ if (empty($this->created_by)) {
+ $this->created_by = 0;
+ }
} else {
// Field created_by can be set by the user, so we don't touch it if it's set.
if (empty($this->created_by)) {
diff --git a/libraries/src/Version.php b/libraries/src/Version.php
index bb8ae65a12d8a..203bf50bd376f 100644
--- a/libraries/src/Version.php
+++ b/libraries/src/Version.php
@@ -90,7 +90,7 @@ final class Version
* @var string
* @since 3.5
*/
- public const RELDATE = '2-July-2024';
+ public const RELDATE = '23-July-2024';
/**
* Release time.
@@ -98,7 +98,7 @@ final class Version
* @var string
* @since 3.5
*/
- public const RELTIME = '07:45';
+ public const RELTIME = '16:00';
/**
* Release timezone.
diff --git a/package.json b/package.json
index c3670c9bdda2f..b9c7167a8603e 100644
--- a/package.json
+++ b/package.json
@@ -29,8 +29,8 @@
"versioning": "node build/build.js --versioning",
"browserlist:update": "npx browserslist@latest --update-db",
"cypress:install": "cypress install",
- "cypress:open": "cypress open",
- "cypress:run": "cypress run"
+ "cypress:open": "cypress open --config-file cypress.config.mjs",
+ "cypress:run": "cypress run --config-file cypress.config.mjs"
},
"browserslist": [
"last 2 major version",
diff --git a/plugins/system/schemaorg/src/Extension/Schemaorg.php b/plugins/system/schemaorg/src/Extension/Schemaorg.php
index c76b395afab8b..abdb4dbcb3bd2 100644
--- a/plugins/system/schemaorg/src/Extension/Schemaorg.php
+++ b/plugins/system/schemaorg/src/Extension/Schemaorg.php
@@ -531,6 +531,10 @@ protected function isSupported($context)
$parts = explode('.', $context, 2);
$component = $this->getApplication()->bootComponent($parts[0]);
- return $component instanceof SchemaorgServiceInterface;
+ if ($component instanceof SchemaorgServiceInterface) {
+ return \in_array($context, array_keys($component->getSchemaorgContexts()));
+ }
+
+ return false;
}
}
diff --git a/tests/System/README.md b/tests/System/README.md
index 65790212d9cf1..a0c72946fa8c3 100644
--- a/tests/System/README.md
+++ b/tests/System/README.md
@@ -17,7 +17,7 @@ It is simplified to offer an initial understanding. Detailed explanations follow

-On the left, **Cypress** is running as a [Node.js](https://nodejs.org/) application. The file **`cypress.config.js`** is used to configure settings and preferences for running the System Tests in your environment.
+On the left, **Cypress** is running as a [Node.js](https://nodejs.org/) application. The file **`cypress.config.mjs`** is used to configure settings and preferences for running the System Tests in your environment.
In the middle, the **Cypress Test Runner** controls a **Browser** with the **Joomla** application running HTML, CSS, and JavaScript. Also running in the browser context are the **Database Commands**, the **API commands** and the npm packages **[joomala-cypress](https://github.com/joomla-projects/joomla-cypress/)** and
**[smtp-tester](https://www.npmjs.com/package/smtp-tester)**.
@@ -52,29 +52,29 @@ npm ci
```
3. Create the Cypress configuration file from the distribution template.
```
-cp cypress.config.dist.js cypress.config.js
+cp cypress.config.dist.mjs cypress.config.mjs
```
-4. Adjust the parameter `baseUrl` in the `cypress.config.js` file, it should point to the Joomla base URL.
-5. Adapt the env variables in the file `cypress.config.js`, they should point to the site, user data and database environment. Ensure that the `smtp_port` is not in use on your system.
+4. Adjust the parameter `baseUrl` in the `cypress.config.mjs` file, it should point to the Joomla base URL.
+5. Adapt the env variables in the file `cypress.config.mjs`, they should point to the site, user data and database environment. Ensure that the `smtp_port` is not in use on your system.
## Running System Tests
After installation, you can start the Joomla System Tests with headless Cypress. The test suite starts with Joomla Web-Installer as the first test step.
```
-npx cypress run
+npm run cypress:run
```
:point_right: In case of errors, see [Troubleshooting](#Troubleshooting) at the end.
You can execute single test specs, e.g. to run the installation step only.
```
-npx cypress run --spec tests/System/integration/install/Installation.cy.js
+npm run cypress:run --spec tests/System/integration/install/Installation.cy.js
```
You can run multiple test specs separated by commas and use patterns. For example, to execute all the tests from the
administrator, site, api and plugins specs without the installation step:
```
-npx cypress run --spec 'tests/System/integration/{administrator,site,api,plugins}/**/*.cy.js'
+npm run cypress:run --spec 'tests/System/integration/{administrator,site,api,plugins}/**/*.cy.js'
```
> [!NOTE]
@@ -83,13 +83,13 @@ npx cypress run --spec 'tests/System/integration/{administrator,site,api,plugins
> The Cypress GUI also displays the Cypress log output, providing real-time feedback on the test execution process.
> To open the Cypress GUI, run the following command.
> ```
-> npx cypress open
+> npm run cypress:open
> ```
If you are running System Tests, you will see `console.log()` outputs from Cypress Tasks in the Node.js environment. If you would like to see `console.log()` output from the browser in headless mode as well, you can use the Electron web browser and set the following environment variable:
```
export ELECTRON_ENABLE_LOGGING=1
-npx cypress run --browser electron
+npm run cypress:run --browser electron
```
@@ -107,7 +107,7 @@ which are numbered and described below.
interacting with the file system.
5. Joomla on the Web Server interacts with the **Database** as it normally would, without running any tests.
6. System Tests has Cypress custom **Database Commands** (described later) to interact with the database.
-7. The file `cypress.config.js` is read by **Cypress** and used to configure settings and preferences for running the System Tests in your environment.
+7. The file `cypress.config.mjs` is read by **Cypress** and used to configure settings and preferences for running the System Tests in your environment.
8. The Joomla installation is initiated by the test spec [Installation.cy.js](integration/install/Installation.cy.js),
which is the first test executed in the overall test suite.
This test spec deletes the Joomla configuration file, and since the `configuration.php` file no longer exists,
@@ -127,7 +127,7 @@ The used npm package "Helpers for using Cypress with Joomla for testing" **[joom
> see [tests/System/support/commands.js](/tests/System/support/commands.js).
The **[smtp-tester](https://www.npmjs.com/package/smtp-tester)** npm package creates an SMTP server that listens
-on the `smtp_port` specified in `cypress.config.js` during test runtime.
+on the `smtp_port` specified in `cypress.config.mjs` during test runtime.
This server accepts connections, receives emails, and provides the capability to check the received emails during the test.
> [!IMPORTANT]
@@ -288,12 +288,12 @@ If the Web Server and Cypress are run by different users, this can lead to file
:point_right: You have to give the user running Cypress the permission to write `configuration.php`
e.g. with the command `sudo` on macOS, Linux or Windows WSL 2:
```
-sudo npx cypress run
+sudo npm run cypress:run
```
If the `root` user does not have a Cypress installation, you can use the Cypress installation cache of the current user:
```
-sudo CYPRESS_CACHE_FOLDER=$HOME/.cache/Cypress npx cypress run
+sudo CYPRESS_CACHE_FOLDER=$HOME/.cache/Cypress npm run cypress:run
```
@@ -301,14 +301,14 @@ sudo CYPRESS_CACHE_FOLDER=$HOME/.cache/Cypress npx cypress run
If the used SMTP server port is already in use you will see an error like:
```
- Your configFile threw an error from: cypress.config.js
+ Your configFile threw an error from: cypress.config.mjs
We stopped running your tests because your config file crashed.
Error: listen EADDRINUSE: address already in use :::1025
```
-:point_right: Configure a different, unused port in the `cypress.config.js` file as `smtp_port`.
+:point_right: Configure a different, unused port in the `cypress.config.mjs` file as `smtp_port`.
### Timeout Error on Slow Machines
@@ -319,10 +319,10 @@ If you encounter the following error while running the System Tests on slow mach
AssertionError: Timed out retrying after 4000ms: Expected to find element
```
-:point_right: You can increase the default 4 second waiting time in the cypress.config.js file:
+:point_right: You can increase the default 4 second waiting time in the cypress.config.mjs file:
```JavaScript
- module.exports = {
+ export default defineConfig({
defaultCommandTimeout: 20000, // sets the waiting time to 20 seconds
...
}
diff --git a/tests/System/images/system-tests-interactions.odg b/tests/System/images/system-tests-interactions.odg
index 70b9f1a12d1c8..c6f6ad80e4630 100644
Binary files a/tests/System/images/system-tests-interactions.odg and b/tests/System/images/system-tests-interactions.odg differ
diff --git a/tests/System/images/system-tests-interactions.pdf b/tests/System/images/system-tests-interactions.pdf
index 4adcdcf476a42..af0fc5eef4266 100644
Binary files a/tests/System/images/system-tests-interactions.pdf and b/tests/System/images/system-tests-interactions.pdf differ
diff --git a/tests/System/images/system-tests-interactions.svg b/tests/System/images/system-tests-interactions.svg
index 37dfd1ea07985..4619717244c93 100644
--- a/tests/System/images/system-tests-interactions.svg
+++ b/tests/System/images/system-tests-interactions.svg
@@ -154,13 +154,13 @@
-
+
-
+
-
+
@@ -650,51 +650,51 @@
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
@@ -734,8 +734,8 @@
-
-
+
+
@@ -833,46 +833,49 @@
-
+
+
+
+
-
+
+
-
-
+
+
-
-
+
-
+
-
+
-
+
+
-
-
+
-
+
-
+
-
+
-
+
-
+
@@ -882,7 +885,7 @@
-
+
@@ -894,7 +897,7 @@
-
+
@@ -908,10 +911,10 @@
-
+
-
+
@@ -1222,7 +1225,7 @@
-
+
@@ -1304,7 +1307,7 @@
-
+
@@ -1347,10 +1350,10 @@
-
+
-
+
@@ -1371,7 +1374,7 @@
-
+
@@ -1417,7 +1420,7 @@
-
+
@@ -1427,7 +1430,7 @@
-
+
diff --git a/tests/System/images/system-tests.odg b/tests/System/images/system-tests.odg
index 9bdf4eca4fa0a..d14e172f4effd 100644
Binary files a/tests/System/images/system-tests.odg and b/tests/System/images/system-tests.odg differ
diff --git a/tests/System/images/system-tests.pdf b/tests/System/images/system-tests.pdf
index e8fd77f7f0686..d004da41281c3 100644
Binary files a/tests/System/images/system-tests.pdf and b/tests/System/images/system-tests.pdf differ
diff --git a/tests/System/images/system-tests.svg b/tests/System/images/system-tests.svg
index ed74d37c81d0a..d354729bdea6e 100644
--- a/tests/System/images/system-tests.svg
+++ b/tests/System/images/system-tests.svg
@@ -154,13 +154,13 @@
-
+
-
+
-
+
@@ -612,51 +612,51 @@
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
@@ -791,50 +791,53 @@
-
+
+
+
+
-
+
+
-
-
+
+
-
-
+
-
+
-
+
-
+
+
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -846,7 +849,7 @@
-
+
@@ -860,10 +863,10 @@
-
+
-
+
@@ -1097,7 +1100,7 @@
-
+
@@ -1179,7 +1182,7 @@
-
+
@@ -1220,10 +1223,10 @@
-
+
-
+
@@ -1244,7 +1247,7 @@
-
+
@@ -1294,7 +1297,7 @@
-
+
diff --git a/tests/System/integration/administrator/components/com_actionlogs/Actionlogs.cy.js b/tests/System/integration/administrator/components/com_actionlogs/Actionlogs.cy.js
new file mode 100644
index 0000000000000..eebdcf55962c0
--- /dev/null
+++ b/tests/System/integration/administrator/components/com_actionlogs/Actionlogs.cy.js
@@ -0,0 +1,51 @@
+describe('Test in backend that the action logs', () => {
+ beforeEach(() => {
+ cy.db_enableExtension('1', 'plg_actionlog_joomla');
+ cy.doAdministratorLogin();
+ cy.visit('/administrator/index.php?option=com_actionlogs&view=actionlogs');
+ });
+
+ it('have a title', () => {
+ cy.get('h1.page-title').should('contain.text', 'User Actions Log');
+ });
+
+ it('can display no results', () => {
+ cy.task('queryDB', 'TRUNCATE #__action_logs');
+ cy.reload();
+ cy.get('div.alert.alert-info').should('contain.text', 'No Matching Results');
+ });
+
+ it('can display a list of actions', () => {
+ cy.doAdministratorLogout();
+ cy.doAdministratorLogin();
+ cy.visit('/administrator/index.php?option=com_actionlogs&view=actionlogs');
+ cy.contains('User ci-admin logged in to admin');
+ cy.task('queryDB', 'TRUNCATE #__action_logs');
+ });
+
+ it('have an export button', () => {
+ cy.get('#toolbar-download1').click();
+ cy.get('#system-message-container').contains('There are no User Action logs to export').should('exist');
+ });
+
+ it('can clear logs', () => {
+ cy.get('#toolbar-delete1').click();
+ cy.clickDialogConfirm(true);
+ cy.get('#system-message-container').contains('All User Action logs have been deleted').should('exist');
+ });
+
+ it('can delete selected logs', () => {
+ cy.get('#toolbar-delete').click();
+ cy.clickDialogConfirm(true);
+ cy.get('#system-message-container').contains('Please first make a selection from the list').should('exist');
+ cy.log('Make a selection first');
+ cy.doAdministratorLogout();
+ cy.doAdministratorLogin();
+ cy.visit('/administrator/index.php?option=com_actionlogs&view=actionlogs');
+ cy.checkAllResults();
+ cy.get('#toolbar-delete').click();
+ cy.clickDialogConfirm(true);
+ cy.get('#system-message-container').contains('logs deleted').should('exist');
+ cy.task('queryDB', 'TRUNCATE #__action_logs');
+ });
+});
diff --git a/tests/System/integration/administrator/components/com_config/Application.cy.js b/tests/System/integration/administrator/components/com_config/Application.cy.js
index 004420961815d..4a9be2772a950 100644
--- a/tests/System/integration/administrator/components/com_config/Application.cy.js
+++ b/tests/System/integration/administrator/components/com_config/Application.cy.js
@@ -24,7 +24,7 @@ describe('Test in backend that the application configuration', () => {
cy.task('getMails').then((mails) => {
cy.get('#system-message-container').should('contain.text', 'The email was sent to');
- cy.wrap(mails).should('have.lengthOf', 1);
+ expect(mails.length).to.equal(1);
cy.wrap(mails[0].body).should('have.string', 'This is a test mail sent using');
cy.wrap(mails[0].sender).should('equal', Cypress.env('email'));
cy.wrap(mails[0].receivers).should('have.property', Cypress.env('email'));
diff --git a/tests/System/integration/administrator/components/com_login/Login.cy.js b/tests/System/integration/administrator/components/com_login/Login.cy.js
index 1aa5a4e6f7b87..78f40b249ee3d 100644
--- a/tests/System/integration/administrator/components/com_login/Login.cy.js
+++ b/tests/System/integration/administrator/components/com_login/Login.cy.js
@@ -1,6 +1,47 @@
describe('Test in backend that the login component', () => {
+ // Clearing the sessions before the tests to ensure we arrive at the login mask
+ beforeEach(() => Cypress.session.clearAllSavedSessions());
+ // Clearing the sessions after the tests to ensure next login works
+ afterEach(() => Cypress.session.clearAllSavedSessions());
+
it('can log in and out', () => {
- cy.doAdministratorLogin(null, null, false);
- cy.doAdministratorLogout();
+ cy.visit('administrator/index.php');
+ cy.get('#mod-login-username').type(Cypress.env('username'));
+ cy.get('#mod-login-password').type(Cypress.env('password'));
+ cy.get('#btn-login-submit').click();
+
+ cy.get('h1.page-title').should('contain', 'Home Dashboard');
+
+ cy.get('.header-item .header-profile > .dropdown-toggle').click();
+ cy.get('.header-item .header-profile a.dropdown-item:last-child').click();
+
+ cy.get('#mod-login-username').should('exist');
+ });
+
+ it('can not log in with wrong username', () => {
+ cy.visit('administrator/index.php');
+ cy.get('#mod-login-username').type('invalid');
+ cy.get('#mod-login-password').type(Cypress.env('password'));
+ cy.get('#btn-login-submit').click();
+
+ cy.get('#system-message-container').contains('Username and password do not match or you do not have an account yet.').should('exist');
+ });
+
+ it('can not log in with wrong password', () => {
+ cy.visit('administrator/index.php');
+ cy.get('#mod-login-username').type(Cypress.env('username'));
+ cy.get('#mod-login-password').type('invalid');
+ cy.get('#btn-login-submit').click();
+
+ cy.get('#system-message-container').contains('Username and password do not match or you do not have an account yet.').should('exist');
+ });
+
+ it('can not log in with not existing user', () => {
+ cy.visit('administrator/index.php');
+ cy.get('#mod-login-username').type('invalid');
+ cy.get('#mod-login-password').type('invalid');
+ cy.get('#btn-login-submit').click();
+
+ cy.get('#system-message-container').contains('Username and password do not match or you do not have an account yet.').should('exist');
});
});
diff --git a/tests/System/integration/administrator/components/com_mails/Templates.cy.js b/tests/System/integration/administrator/components/com_mails/Templates.cy.js
new file mode 100644
index 0000000000000..5c3c753a4ce8d
--- /dev/null
+++ b/tests/System/integration/administrator/components/com_mails/Templates.cy.js
@@ -0,0 +1,22 @@
+describe('Test in backend that the mails', () => {
+ beforeEach(() => {
+ cy.doAdministratorLogin();
+ cy.visit('/administrator/index.php?option=com_mails&view=templates');
+ });
+
+ it('has a title', () => {
+ cy.get('h1.page-title').should('contain.text', 'Mail Templates');
+ });
+
+ it('can display a list of mail templates', () => {
+ cy.get('tr.row0').should('contain.text', 'User Actions Log');
+ });
+
+ it('check redirection to list view', () => {
+ cy.visit('/administrator/index.php?option=com_mails&task=template.edit&template_id=com_actionlogs.notification&language=en-GB');
+ cy.intercept('index.php?option=com_mails&view=templates').as('listview');
+ cy.clickToolbarButton('Cancel');
+
+ cy.wait('@listview');
+ });
+});
diff --git a/tests/System/integration/administrator/components/com_media/Media.cy.js b/tests/System/integration/administrator/components/com_media/Media.cy.js
index 00c816bbb335a..3ddf849f9c4e7 100644
--- a/tests/System/integration/administrator/components/com_media/Media.cy.js
+++ b/tests/System/integration/administrator/components/com_media/Media.cy.js
@@ -1,6 +1,6 @@
describe('Test in backend that the media manager', () => {
beforeEach(() => {
- cy.doAdministratorLogin(Cypress.env('username'), Cypress.env('password'));
+ cy.doAdministratorLogin();
cy.intercept('*format=json*task=api.files*').as('getMedia');
});
diff --git a/tests/System/integration/api/com_contact/Contacts.cy.js b/tests/System/integration/api/com_contact/Contacts.cy.js
index 632e7bd0e6af1..0e428f617debe 100644
--- a/tests/System/integration/api/com_contact/Contacts.cy.js
+++ b/tests/System/integration/api/com_contact/Contacts.cy.js
@@ -57,7 +57,7 @@ describe('Test that contacts API endpoint', () => {
.should('equal', 200));
cy.task('getMails').then((mails) => {
- cy.wrap(mails).should('have.lengthOf', 1);
+ expect(mails.length).to.equal(1);
cy.wrap(mails[0].sender).should('equal', Cypress.env('email'));
cy.wrap(mails[0].receivers).should('have.property', Cypress.env('email'));
cy.wrap(mails[0].headers.subject).should('equal', `${Cypress.env('sitename')}: automated test subject`);
diff --git a/tests/System/integration/api/com_plugins/Plugins.cy.js b/tests/System/integration/api/com_plugins/Plugins.cy.js
index 5e6ccaddbaf26..3358c52487ca0 100644
--- a/tests/System/integration/api/com_plugins/Plugins.cy.js
+++ b/tests/System/integration/api/com_plugins/Plugins.cy.js
@@ -31,5 +31,6 @@ describe('Test that plugins API endpoint', () => {
.its('enabled')
.should('equal', 0));
});
+ cy.db_enableExtension('1', 'plg_actionlog_joomla');
});
});
diff --git a/tests/System/integration/site/components/com_privacy/Request.cy.js b/tests/System/integration/site/components/com_privacy/Request.cy.js
index 6064fbee328ef..f4122ab668c11 100644
--- a/tests/System/integration/site/components/com_privacy/Request.cy.js
+++ b/tests/System/integration/site/components/com_privacy/Request.cy.js
@@ -12,7 +12,7 @@ describe('Test in frontend that the privacy request view', () => {
cy.task('getMails').then((mails) => {
cy.get('.alert-message').should('contain.text', 'Your information request has been created. Before it can be processed, you must verify this request. An email has been sent to your address with additional instructions to complete this verification.');
- cy.wrap(mails).should('have.lengthOf', 2);
+ expect(mails.length).to.equal(2);
cy.wrap(mails[0].sender).should('equal', Cypress.env('email'));
cy.wrap(mails[0].body).should('have.string', `A new information request has been submitted by ${Cypress.env('email')}.`);
cy.wrap(mails[1].body).should('have.string', 'Someone has created a request to export all personal information related to this email address at ');
@@ -29,7 +29,7 @@ describe('Test in frontend that the privacy request view', () => {
cy.task('getMails').then((mails) => {
cy.get('.alert-message').should('contain.text', 'Your information request has been created. Before it can be processed, you must verify this request. An email has been sent to your address with additional instructions to complete this verification.');
- cy.wrap(mails).should('have.lengthOf', 2);
+ expect(mails.length).to.equal(2);
cy.wrap(mails[0].sender).should('equal', Cypress.env('email'));
cy.wrap(mails[0].body).should('have.string', `A new information request has been submitted by ${Cypress.env('email')}.`);
cy.wrap(mails[1].body).should('have.string', 'Someone has created a request to export all personal information related to this email address at ');
@@ -44,7 +44,7 @@ describe('Test in frontend that the privacy request view', () => {
cy.task('getMails').then((mails) => {
cy.get('.alert-message').should('contain.text', 'Your information request has been created. Before it can be processed, you must verify this request. An email has been sent to your address with additional instructions to complete this verification.');
- cy.wrap(mails).should('have.lengthOf', 2);
+ expect(mails.length).to.equal(2);
cy.wrap(mails[0].sender).should('equal', Cypress.env('email'));
cy.wrap(mails[0].body).should('have.string', `A new information request has been submitted by ${Cypress.env('email')}.`);
cy.wrap(mails[1].body).should('have.string', 'Someone has created a request to remove all personal information related to this email address at ');
@@ -61,7 +61,7 @@ describe('Test in frontend that the privacy request view', () => {
cy.task('getMails').then((mails) => {
cy.get('.alert-message').should('contain.text', 'Your information request has been created. Before it can be processed, you must verify this request. An email has been sent to your address with additional instructions to complete this verification.');
- cy.wrap(mails).should('have.lengthOf', 2);
+ expect(mails.length).to.equal(2);
cy.wrap(mails[0].sender).should('equal', Cypress.env('email'));
cy.wrap(mails[0].body).should('have.string', `A new information request has been submitted by ${Cypress.env('email')}.`);
cy.wrap(mails[1].body).should('have.string', 'Someone has created a request to remove all personal information related to this email address at ');
@@ -75,6 +75,7 @@ describe('Test in frontend that the privacy request view', () => {
cy.get('.controls > .btn').click();
cy.task('getMails').then((mails) => {
+ expect(mails.length).to.equal(2);
const str = mails[1].body;
const firstSplit = str.split('URL: ')[1];
@@ -93,6 +94,7 @@ describe('Test in frontend that the privacy request view', () => {
cy.get('.controls > .btn').click();
cy.task('getMails').then((mails) => {
+ expect(mails.length).to.equal(2);
const str = mails[1].body;
const firstSplitURL = str.split('paste your token into the form.\n')[1];
diff --git a/tests/System/integration/site/components/com_users/Remind.cy.js b/tests/System/integration/site/components/com_users/Remind.cy.js
index cfff552d39d77..102463660b064 100644
--- a/tests/System/integration/site/components/com_users/Remind.cy.js
+++ b/tests/System/integration/site/components/com_users/Remind.cy.js
@@ -15,7 +15,7 @@ describe('Test in frontend that the users remind view', () => {
cy.task('getMails').then((mails) => {
cy.get('#system-message-container').should('contain.text', 'If the email address you entered is registered on this site you will shortly receive an email with a reminder.');
- cy.wrap(mails).should('have.lengthOf', 1);
+ expect(mails.length).to.equal(1);
cy.wrap(mails[0].body).should('have.string', 'A username reminder has been requested');
cy.wrap(mails[0].body).should('have.string', '/test-reminder');
cy.wrap(mails[0].sender).should('equal', Cypress.env('email'));
@@ -34,7 +34,7 @@ describe('Test in frontend that the users remind view', () => {
cy.task('getMails').then((mails) => {
cy.get('#system-message-container').should('contain.text', 'If the email address you entered is registered on this site you will shortly receive an email with a reminder.');
- cy.wrap(mails).should('have.lengthOf', 1);
+ expect(mails.length).to.equal(1);
cy.wrap(mails[0].body).should('have.string', 'A username reminder has been requested');
cy.wrap(mails[0].body).should('have.string', '/component/users/login');
cy.wrap(mails[0].sender).should('equal', Cypress.env('email'));
@@ -51,7 +51,7 @@ describe('Test in frontend that the users remind view', () => {
cy.task('getMails').then((mails) => {
cy.get('#system-message-container').should('contain.text', 'If the email address you entered is registered on this site you will shortly receive an email with a reminder.');
- cy.wrap(mails).should('have.lengthOf', 0);
+ expect(mails.length).to.equal(0);
});
});
});
diff --git a/tests/System/integration/site/components/com_users/Reset.cy.js b/tests/System/integration/site/components/com_users/Reset.cy.js
index c70f3d50178f0..df93ce7e5f952 100644
--- a/tests/System/integration/site/components/com_users/Reset.cy.js
+++ b/tests/System/integration/site/components/com_users/Reset.cy.js
@@ -11,7 +11,7 @@ describe('Test in frontend that the users reset view', () => {
cy.task('getMails').then((mails) => {
cy.get('#system-message-container').should('contain.text', 'If the email address you entered is registered on this site you will shortly receive an email with a link to reset the password for your account.');
- cy.wrap(mails).should('have.lengthOf', 1);
+ expect(mails.length).to.equal(1);
cy.wrap(mails[0].body).should('have.string', 'To reset your password, you will need to submit this verification code');
cy.wrap(mails[0].body).should('have.string', '/component/users/reset');
cy.wrap(mails[0].sender).should('equal', Cypress.env('email'));
@@ -34,7 +34,7 @@ describe('Test in frontend that the users reset view', () => {
cy.task('getMails').then((mails) => {
cy.get('#system-message-container').should('contain.text', 'If the email address you entered is registered on this site you will shortly receive an email with a link to reset the password for your account.');
- cy.wrap(mails).should('have.lengthOf', 1);
+ expect(mails.length).to.equal(1);
cy.wrap(mails[0].body).should('have.string', 'To reset your password, you will need to submit this verification code');
cy.wrap(mails[0].body).should('have.string', '/test-reset');
cy.wrap(mails[0].sender).should('equal', Cypress.env('email'));
@@ -51,7 +51,7 @@ describe('Test in frontend that the users reset view', () => {
cy.task('getMails').then((mails) => {
cy.get('#system-message-container').should('contain.text', 'If the email address you entered is registered on this site you will shortly receive an email with a link to reset the password for your account.');
- cy.wrap(mails).should('have.lengthOf', 0);
+ expect(mails.length).to.equal(0);
});
});
diff --git a/tests/System/plugins/db.js b/tests/System/plugins/db.mjs
similarity index 97%
rename from tests/System/plugins/db.js
rename to tests/System/plugins/db.mjs
index 02ee7b83c89af..c829819eef1fc 100644
--- a/tests/System/plugins/db.js
+++ b/tests/System/plugins/db.mjs
@@ -1,5 +1,5 @@
-const mysql = require('mysql');
-const postgres = require('postgres');
+import mysql from 'mysql';
+import postgres from 'postgres';
// Items cache which are added by an insert statement
let insertedItems = [];
@@ -144,4 +144,4 @@ function deleteInsertedItems(config) {
return Promise.all(promises);
}
-module.exports = { queryTestDB, deleteInsertedItems };
+export { queryTestDB, deleteInsertedItems };
diff --git a/tests/System/plugins/fs.js b/tests/System/plugins/fs.mjs
similarity index 74%
rename from tests/System/plugins/fs.js
rename to tests/System/plugins/fs.mjs
index 4461e80e2c010..819d285eb33ea 100644
--- a/tests/System/plugins/fs.js
+++ b/tests/System/plugins/fs.mjs
@@ -1,6 +1,6 @@
-const fs = require('fs');
-const path = require('path');
-const { umask } = require('node:process');
+import { chmodSync, existsSync, writeFileSync, mkdirSync, rmSync } from "fs";
+import { dirname, join } from "path";
+import { umask } from 'node:process';
/**
* Synchronously deletes a file or folder, relative to cmsPath.
@@ -13,8 +13,8 @@ const { umask } = require('node:process');
* @returns null
*/
function deleteRelativePath(relativePath, config) {
- const fullPath = path.join(config.env.cmsPath, relativePath);
- fs.rmSync(fullPath, { recursive: true, force: true });
+ const fullPath = join(config.env.cmsPath, relativePath);
+ rmSync(fullPath, { recursive: true, force: true });
return null;
}
@@ -34,24 +34,24 @@ function deleteRelativePath(relativePath, config) {
* @returns null
*/
function writeRelativeFile(relativePath, content, config, mode = 0o444) {
- const fullPath = path.join(config.env.cmsPath, relativePath);
+ const fullPath = join(config.env.cmsPath, relativePath);
// Prologue: Reset process file mode creation mask to ensure the umask value is not subtracted
const oldmask = umask(0);
// Create missing parent directories with 'rwxrwxrwx'
- fs.mkdirSync(path.dirname(fullPath), { recursive: true, mode: 0o777 });
+ mkdirSync(dirname(fullPath), { recursive: true, mode: 0o777 });
// Check if the file exists
- if (fs.existsSync(fullPath)) {
+ if (existsSync(fullPath)) {
// Set 'rw-rw-rw-' to be able to overwrite the file
- fs.chmodSync(fullPath, 0o666);
+ chmodSync(fullPath, 0o666);
}
// Write or overwrite the file on relative path with given content
- fs.writeFileSync(fullPath, content);
+ writeFileSync(fullPath, content);
// Finally set given file mode or default 'r--r--r--'
- fs.chmodSync(fullPath, mode);
+ chmodSync(fullPath, mode);
// Epilogue: Restore process file mode creation mask
umask(oldmask);
return null;
}
-module.exports = { writeRelativeFile, deleteRelativePath };
+export { writeRelativeFile, deleteRelativePath };
diff --git a/tests/System/plugins/index.js b/tests/System/plugins/index.js
deleted file mode 100644
index 2c76e48f5ac9e..0000000000000
--- a/tests/System/plugins/index.js
+++ /dev/null
@@ -1,25 +0,0 @@
-const mail = require('./mail');
-const fs = require('./fs');
-const db = require('./db');
-
-/**
- * Does the setup of the plugins.
- *
- * @param {*} on
- * @param {object} config The configuration
- *
- * @see https://docs.cypress.io/guides/references/configuration#setupNodeEvents
- */
-function setupPlugins(on, config) {
- on('task', {
- queryDB: (query) => db.queryTestDB(query, config),
- cleanupDB: () => db.deleteInsertedItems(config),
- writeRelativeFile: ({ path, content, mode }) => fs.writeRelativeFile(path, content, config, mode),
- deleteRelativePath: (path) => fs.deleteRelativePath(path, config),
- getMails: () => mail.getMails(),
- clearEmails: () => mail.clearEmails(),
- startMailServer: () => mail.startMailServer(config),
- });
-}
-
-module.exports = setupPlugins;
diff --git a/tests/System/plugins/index.mjs b/tests/System/plugins/index.mjs
new file mode 100644
index 0000000000000..fff01fe477d04
--- /dev/null
+++ b/tests/System/plugins/index.mjs
@@ -0,0 +1,24 @@
+import { getMails, clearEmails, startMailServer } from "./mail.mjs";
+import { writeRelativeFile, deleteRelativePath } from "./fs.mjs";
+import { queryTestDB, deleteInsertedItems } from "./db.mjs";
+
+/**
+ * Does the setup of the plugins.
+ *
+ * @param {*} on
+ * @param {object} config The configuration
+ *
+ * @see https://docs.cypress.io/guides/references/configuration#setupNodeEvents
+ */
+export default function setupPlugins(on, config) {
+ on('task', {
+ queryDB: (query) => queryTestDB(query, config),
+ cleanupDB: () => deleteInsertedItems(config),
+ writeRelativeFile: ({ path, content, mode }) => writeRelativeFile(path, content, config, mode),
+ deleteRelativePath: (path) => deleteRelativePath(path, config),
+ getMails: () => getMails(),
+ clearEmails: () => clearEmails(),
+ startMailServer: () => startMailServer(config),
+ });
+}
+
diff --git a/tests/System/plugins/mail.js b/tests/System/plugins/mail.mjs
similarity index 93%
rename from tests/System/plugins/mail.js
rename to tests/System/plugins/mail.mjs
index 4deea22b85f3e..c40ca24794d32 100644
--- a/tests/System/plugins/mail.js
+++ b/tests/System/plugins/mail.mjs
@@ -1,4 +1,4 @@
-const mailTester = require('smtp-tester');
+import mailTester from 'smtp-tester';
// The mail server instance
let mailServer = null;
@@ -64,4 +64,4 @@ function startMailServer(config) {
return null;
}
-module.exports = { getMails, clearEmails, startMailServer };
+export { getMails, clearEmails, startMailServer };
diff --git a/tests/System/support/commands.js b/tests/System/support/commands.mjs
similarity index 78%
rename from tests/System/support/commands.js
rename to tests/System/support/commands.mjs
index 0ccd9db509426..1b32065094970 100644
--- a/tests/System/support/commands.js
+++ b/tests/System/support/commands.mjs
@@ -5,11 +5,11 @@
* https://github.com/cypress-io/cypress/issues/6575
*/
-import './commands/api';
-import './commands/config';
-import './commands/db';
+import { registerCommands } from 'joomla-cypress';
-const { registerCommands } = require('../../../node_modules/joomla-cypress/src/index.js');
+import './commands/api.mjs';
+import './commands/config.mjs';
+import './commands/db.mjs';
registerCommands();
diff --git a/tests/System/support/commands/api.js b/tests/System/support/commands/api.mjs
similarity index 100%
rename from tests/System/support/commands/api.js
rename to tests/System/support/commands/api.mjs
diff --git a/tests/System/support/commands/config.js b/tests/System/support/commands/config.mjs
similarity index 100%
rename from tests/System/support/commands/config.js
rename to tests/System/support/commands/config.mjs
diff --git a/tests/System/support/commands/db.js b/tests/System/support/commands/db.mjs
similarity index 100%
rename from tests/System/support/commands/db.js
rename to tests/System/support/commands/db.mjs
diff --git a/tests/System/support/index.js b/tests/System/support/index.js
index 43e0237e29b65..68b3967f8d96f 100644
--- a/tests/System/support/index.js
+++ b/tests/System/support/index.js
@@ -1,5 +1,5 @@
-import './commands';
-import 'joomla-cypress';
+import('./commands.mjs');
+import('joomla-cypress');
before(() => {
cy.task('startMailServer');