Make joomla-cypress Joomla-release-independent#22
Make joomla-cypress Joomla-release-independent#22laoneo merged 1 commit intojoomla-projects:mainfrom
Conversation
Reimplemented in using 'System - Joomla! Statistics' plugins detail view. Runable on actual Joomla 4.4-dev ... 6.0-dev. Executable multiple times.
|
Not against this pr, but can we not just change the state flag in the database? |
|
There was a change in the installation especially for Joomla 5.1 here #11 |
|
Thanks for the explanation, we will see what @muhme says. Doing the change in the database would be faster. |
|
Wrong context. |
Be faster with just change the state flag in the database would affect the joomla-cms repository, specifically in |
|
Sorry for that, was the wrong context. |
|
Why would it affect the joomla-cms repository? |
If understand right, disable statistics during Joomla System Tests installation is faster with a database commend. Therefore line (Database commands is number 6 in architecture picture with interactions – System Tests has Cypress custom Database Commands to interact with the database. In this PR we are in |
|
Inside the disableStatistics function, can you not just do cy.task('queryDB', "update #__extensions set enabled=0 WHERE name = 'plg_system_stats'"); |
|
No sorry, Joomla System Tests' Cypress tasks are not available in joomla-cypress, they are running in node and not in Browser, in the architecture picture see Tasks on the The tasks are triggered by Joomla System Tests and not by joomla-cypress, this is shown in picture, as the arrow is going to Cypress Test Runner and not to joomla-cypress. |
|
I'm merging it for now, so we can tag soon a release. |
|
Thanks! |
Great and after that I will test joomla-cms and manual-examples and create PRs. If I can help please let me know. |
Summary of Changes
Actual Joomla dev-4.4 branch is using joomla-cypress 0.0.16 and the branches 5.1, 5.2 and 6.0 are using joomla-cypress 1.0.3. This PR is intended to make joomla-cypress Joomla-release-independent.
There were no much changes needed. Only
disableStatistics()was reimplemented to work on Joomla 4.Once this (and other open) PR is merged and the new NPM package is created, we will migrate all Joomla development branches to the new version and then only have one joomla-cypress version for Joomla System Tests.
❗ If the version of the NPM package joomla-cypress for Joomla 4 is updated, the overwritten custom commands
doFrontendLogin,doFrontendLogout,doAdministratorLoginanddoAdministratorLogoutin the filetests/System/support/commands.jsmust be deleted in to avoid endless cycles from doubled sessions.Testing Instructions
Tested was in installing
joomla-cypresslocal and changingpackage.jsonto use the local version:installJoomla,doAdministratorLogin,disableStatistics...installJoomlaMultilingualSite,installExtensionFromFolder,publishModule...Code changes between joomla-cypress 0.0.16 and 1.0.3 are compared. There are a lot of small changes for improvement or enhancements in functionality.
❗ Since we don't have a test suite for Joomla-Cypress at the moment, there is no 100% guarantee that everything will work in Joomla 4 (and I assume that not everything will work for Joomla 4 in 0.0.16 either, as bugs have been found in the past).