diff --git a/build.xml b/build.xml index 680e8aa914fa637bd958d9423a598ee621b066ce..0b024b7793e8b3a1816a338dea9ae916aac58e90 100644 --- a/build.xml +++ b/build.xml @@ -113,7 +113,7 @@ <!-- Installs Varbase and sets it up for development. --> <target name="install" depends="env"> <!-- Use passthru() when executing drush site-install so that we'll know if errors occur. --> - <exec command="${drush} site-install varbase --yes --site-name=Varbase4 --account-name=webmaster --account-pass=dD.123123ddd --account-mail=webmaster@vardot.com --db-url=${db.url} varbase_multilingual_configration.enable_multilingual=true -vvv" dir="${docroot}" passthru="true" /> + <exec command="${drush} site-install varbase --yes --site-name=Varbase4 --account-name=webmaster --account-pass=dD.123123ddd --account-mail=webmaster@vardot.com --db-url=${db.url} varbase_multilingual_configuration.enable_multilingual=true -vvv" dir="${docroot}" passthru="true" /> <exec command="${drush} config-set system.performance css.preprocess 0 --yes --format=boolean" dir="${docroot}" /> <exec command="${drush} config-set system.performance js.preprocess 0 --yes --format=boolean" dir="${docroot}" /> <exec command="${drush} config-set system.logging error_level all --yes" dir="${docroot}" /> diff --git a/src/Form/ConfigureMultilingualForm.php b/src/Form/ConfigureMultilingualForm.php index 5ba98acc534b6b47518ed091fccd92aab56b9c60..4721e58b17d789e6ac45b11e41fc5f95d7e6d4bc 100644 --- a/src/Form/ConfigureMultilingualForm.php +++ b/src/Form/ConfigureMultilingualForm.php @@ -70,7 +70,7 @@ class ConfigureMultilingualForm extends FormBase { * {@inheritdoc} */ public function getFormId() { - return 'varbase_multilingual_configration'; + return 'varbase_multilingual_configuration'; } /** @@ -103,7 +103,7 @@ class ConfigureMultilingualForm extends FormBase { } $form['#title'] = $this->t('Multilingual configuration'); - $form['multilingual_configration_introduction'] = array( + $form['multilingual_configuration_introduction'] = array( '#weight' => -1, '#prefix' => '<p>', '#markup' => '<b>' . $default_language_name . '</b> ' . $this->t("is the default language."), diff --git a/tests/tools/install-varbase/README.txt b/tests/tools/install-varbase/README.txt index 55a5a8ed1c31c4253c580e3dd715afcf272c3eed..7af7976efac35b595eefae9dda4d39e685014125 100644 --- a/tests/tools/install-varbase/README.txt +++ b/tests/tools/install-varbase/README.txt @@ -7,4 +7,43 @@ If you want to test the installation process feature, you will need to use the varbase Install config file, as you can see in the following command. -$ bin/behat --config=behat.varbase-install.yml tools/install-varbase/installation_varbase_default-installation-to-initiate-a-site-for-a-client.feature +``` +$ bin/behat --config=behat.varbase-install.yml tools/install-varbase/multilingual-installation.feature +``` +equivalent to: + +``` +drush site-install varbase --yes --site-name=Varbase4 --account-name=webmaster --account-pass=dD.123123ddd --account-mail=webmaster@vardot.com --db-url=mysql://root:123___@localhost/test_varbase4 --locale=en varbase_multilingual_configuration.enable_multilingual=true -vvv +``` +- + +``` +$ bin/behat --config=behat.varbase-install.yml tools/install-varbase/default-installation.feature +``` +equivalent to: +``` +drush site-install varbase --yes --site-name=Varbase4 --account-name=webmaster --account-pass=dD.123123ddd --account-mail=webmaster@vardot.com --db-url=mysql://root:123___@localhost/test_varbase4 --locale=en varbase_multilingual_configuration.enable_multilingual=false -vvv +``` + + +- + +``` +$ bin/behat --config=behat.varbase-install.yml tools/install-varbase/english-language-installation.feature +``` +equivalent to: +``` +drush site-install varbase --yes --site-name=Varbase4 --account-name=webmaster --account-pass=dD.123123ddd --account-mail=webmaster@vardot.com --db-url=mysql://root:123___@localhost/test_varbase4 --locale=en varbase_multilingual_configuration.enable_multilingual=false -vvv +``` + + +- + +``` +$ bin/behat --config=behat.varbase-install.yml tools/install-varbase/arabic-installation.feature +``` +equivalent to: +``` +drush site-install varbase --yes --site-name=Varbase4 --account-name=webmaster --account-pass=dD.123123ddd --account-mail=webmaster@vardot.com --db-url=mysql://root:123___@localhost/test_varbase4 --locale=ar varbase_multilingual_configuration.enable_multilingual=false -vvv +``` + diff --git a/tests/tools/install-varbase/arabic-installation.feature b/tests/tools/install-varbase/arabic-installation.feature new file mode 100644 index 0000000000000000000000000000000000000000..a25a1acd0ceea158446ae87ccbcdadc92482379b --- /dev/null +++ b/tests/tools/install-varbase/arabic-installation.feature @@ -0,0 +1,38 @@ +Feature: Installation - Varbase - Arabic installation. +As an Application site Builder +I want to be able to install Varbase for a selected client +So that I will be able to initiate the site with the default installation + + @javascript @tools @install @local @development + Scenario: Arabic installation for Varbase 8.x-4.x + Given I go to "/core/install.php" + And I wait + Then I should see "Choose language" + When I select "ar" from "langcode" + And I press "Save and continue" + And I wait + Then I should see "إعدادات قاعدة البيانات" + When I fill in "test_varbase4" for "mysql[database]" + And I fill in "root" for "mysql[username]" + And I fill in "123___" for "mysql[password]" + And I press "ØÙظ ومتابعة" + And I wait for the batch job to finish + Then I should see "ضبط الموقع" + And I wait + When I fill in "موقع عربي" for "اسم الموقع" + # And I fill in "noreply@vardot.com" for "Site email address" + # And I fill in "webmaster" for "اسم المستخدم" + And I fill in "dD.123123ddd" for "كلمة المرور" + And I fill in "dD.123123ddd" for "تأكيد كلمة المرور" + # And I fill in "عنوان البريد الإلكتروني" with "webmaster@vardot.com" + And I uncheck the box "Check for updates automatically" + And I press "ØÙظ ومتابعة" + And I wait for the batch job to finish + Then I should see "Multilingual configuration" + When I press "ØÙظ ومتابعة" + And I wait for the batch job to finish + Then I should see "Extra components" + When I check the box "Varbase development" + And I press "ØÙظ ومتابعة" + And I wait for the batch job to finish + Then I should see "Welcome to Varbase4" diff --git a/tests/tools/install-varbase/default-installation.feature b/tests/tools/install-varbase/default-installation.feature index 87f03a188cd9981710fd40561eae3cee382b4050..b369df2a2147521923e1fa86e927615eb10b66c7 100644 --- a/tests/tools/install-varbase/default-installation.feature +++ b/tests/tools/install-varbase/default-installation.feature @@ -4,22 +4,19 @@ I want to be able to install Varbase for a selected client So that I will be able to initiate the site with the default installation @javascript @tools @install @local @development - Scenario: Installation for Varbase 7.x-8.x + Scenario: Default installation for Varbase 8.x-4.x Given I go to "/core/install.php" And I wait Then I should see "Choose language" When I press "Save and continue" And I wait Then I should see "Database configuration" - When I fill in "testing_varbase4" for "Database name" + When I fill in "test_varbase4" for "Database name" And I fill in "root" for "Database username" And I fill in "123___" for "Database password" And I press "Save and continue" And I wait for the batch job to finish - And I wait for the batch job to finish - And I wait for the batch job to finish Then I should see "Configure site" - And I wait When I fill in "Site name" with "Varbase4" # And I fill in "Site email address" with "noreply@vardot.com" # And I fill in "Username" with "webmaster" @@ -29,4 +26,10 @@ So that I will be able to initiate the site with the default installation And I uncheck the box "Check for updates automatically" And I press "Save and continue" And I wait for the batch job to finish + Then I should see "Multilingual configuration" + When I press "Save and continue" + And I wait for the batch job to finish + Then I should see "Extra components" + When I press "Save and continue" + And I wait for the batch job to finish Then I should see "Welcome to Varbase4" diff --git a/tests/tools/install-varbase/english-language-installation.feature b/tests/tools/install-varbase/english-language-installation.feature new file mode 100644 index 0000000000000000000000000000000000000000..2eb435860867a0e5d6e4337926be503d7661bbf8 --- /dev/null +++ b/tests/tools/install-varbase/english-language-installation.feature @@ -0,0 +1,40 @@ +Feature: Installation - Varbase - English installation. +As an Application site Builder +I want to be able to install Varbase for a selected client +So that I will be able to initiate the site with the default installation + + @javascript @tools @install @local @development + Scenario: English installation for Varbase 7.x-8.x + Given I go to "/core/install.php" + And I wait + Then I should see "Choose language" + When I select "en" from "langcode" + And I press "Save and continue" + And I wait + Then I should see "Database configuration" + When I fill in "test_varbase4" for "Database name" + And I fill in "root" for "Database username" + And I fill in "123___" for "Database password" + And I press "Save and continue" + And I wait for the batch job to finish + Then I should see "Configure site" + And I wait + When I fill in "Site name" with "Varbase4" + # And I fill in "Site email address" with "noreply@vardot.com" + # And I fill in "Username" with "webmaster" + And I fill in "Password" with "dD.123123" + And I fill in "Confirm password" with "dD.123123" + # And I fill in "Email address" with "webmaster@vardot.com" + And I uncheck the box "Check for updates automatically" + And I press "Save and continue" + And I wait for the batch job to finish + Then I should see "Multilingual configuration" + When I check the box "Enable multiple languages for this site" + Then I should see "Please select your site's other language(s)" + When I press "Save and continue" + And I wait for the batch job to finish + Then I should see "Extra components" + When I check the box "Varbase development" + When I press "Save and continue" + And I wait for the batch job to finish + Then I should see "Welcome to Varbase4" diff --git a/tests/tools/install-varbase/multilingual-installation.feature b/tests/tools/install-varbase/multilingual-installation.feature new file mode 100644 index 0000000000000000000000000000000000000000..12305b2980b2956c0a70ee5a8914cd5505851ce5 --- /dev/null +++ b/tests/tools/install-varbase/multilingual-installation.feature @@ -0,0 +1,41 @@ +Feature: Installation - Varbase - Multilingual installation. +As an Application site Builder +I want to be able to install Varbase for a selected client +So that I will be able to initiate the site with the default installation + + @javascript @tools @install @local @development + Scenario: Multilingual installation for Varbase 8.x-4.x + Given I go to "/core/install.php" + And I wait + Then I should see "Choose language" + When I select "en" from "langcode" + And I press "Save and continue" + And I wait + Then I should see "Database configuration" + When I fill in "test_varbase4" for "Database name" + And I fill in "root" for "Database username" + And I fill in "123___" for "Database password" + And I press "Save and continue" + And I wait for the batch job to finish + Then I should see "Configure site" + When I fill in "Site name" with "Varbase4" + # And I fill in "Site email address" with "noreply@vardot.com" + # And I fill in "Username" with "webmaster" + And I fill in "Password" with "dD.123123" + And I fill in "Confirm password" with "dD.123123" + # And I fill in "Email address" with "webmaster@vardot.com" + And I uncheck the box "Check for updates automatically" + And I press "Save and continue" + And I wait for the batch job to finish + Then I should see "Multilingual configuration" + When I check the box "Enable multiple languages for this site" + Then I should see "Please select your site's other language(s)" + When I select "ar" from "multilingual_languages[]" + And I select "fr" from "multilingual_languages[]" + When I press "Save and continue" + And I wait for the batch job to finish + Then I should see "Extra components" + When I check the box "Varbase development" + When I press "Save and continue" + And I wait for the batch job to finish + Then I should see "Welcome to Varbase4" diff --git a/varbase.profile b/varbase.profile index 7259047f2aced3da9f2dfcf9be78d368a2cce4b2..99e49e2b981f6dbb26a14f9a0f47e3cb6ec48e8b 100644 --- a/varbase.profile +++ b/varbase.profile @@ -39,7 +39,7 @@ function varbase_install_tasks(&$install_state) { $needs_configure_multilingual = (isset($install_state['varbase']['enable_multilingual']) && $install_state['varbase']['enable_multilingual'] == TRUE); return array( - 'varbase_multilingual_configration_form' => array( + 'varbase_multilingual_configuration_form' => array( 'display_name' => t('Multilingual configuration'), 'display' => TRUE, 'type' => 'form',