Open murrayDI opened 10 months ago
I was running in this issue too, first tried to delete the space before and after the pipe (|), but this was also not working for me.
I used the following replacement:
cy.get('#jform_language').then(select => {
if (select.find('option:contains("English (en-GB)")').length) {
// If 'English (en-GB)' exists, select it
cy.get('#jform_language').select('English (en-GB)');
} else if (select.find('option:contains("English (United Kingdom)")').length) {
// If 'English (United Kingdom)' exists, select it
cy.get('#jform_language').select('English (United Kingdom)');
}
});
should I create a PR?
Something happening here? Joomla installation still not possible using joomla-cypress
.
The current joomla-cypress
version 1.0.3's installJoomla()
function uses en-GB
to select the language. This approach works for both Joomla 4 and Joomla 5 due to the following reasons:
In Joomla 4.4.6, the HTML source code for the language option is:
<option value="en-GB">English (United Kingdom)</option>
In Joomla >= 5.1, the HTML source code for the language option is:
<option value="en-GB">English (en-GB) | English (United Kingdom)</option>
@laoneo I recommend closing this issue, which was opened for joomla-cypress 1.0.1, as it has been resolved in version 1.0.3.
@muhme OK. We will try 1.0.3.
@murrayDI can you report back if 1.0.3 works for you?
@laoneo will do
When trying to test Installation with Joomla 5.0.2 and joomla-cypress 1.0.1 this makes trouble https://github.com/joomla-projects/joomla-cypress/pull/11