Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installJoomla Language selection #13

Open
murrayDI opened this issue Jan 19, 2024 · 6 comments
Open

installJoomla Language selection #13

murrayDI opened this issue Jan 19, 2024 · 6 comments

Comments

@murrayDI
Copy link

When trying to test Installation with Joomla 5.0.2 and joomla-cypress 1.0.1 this makes trouble #11

1) Install Joomla
       Install Joomla:
     CypressError: Timed out retrying after 4000ms: `cy.select()` failed because it could not find a single `<option>` with value, index, or text matching: `English (en-GB) | English (United Kingdom)`

Installation-cy-js
Joomla-Installer

@muhme
Copy link
Contributor

muhme commented Jan 19, 2024

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?

@murrayDI
Copy link
Author

murrayDI commented Feb 7, 2024

Something happening here? Joomla installation still not possible using joomla-cypress.

@muhme
Copy link
Contributor

muhme commented Jun 18, 2024

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.

@murrayDI
Copy link
Author

@muhme OK. We will try 1.0.3.

@laoneo
Copy link
Contributor

laoneo commented Jun 19, 2024

@murrayDI can you report back if 1.0.3 works for you?

@murrayDI
Copy link
Author

@laoneo will do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants