Install de_DE language to the site during Docker bootstrap

This fixes an issue with the test that switches languages and
It had to wait a long time to ensure the languages are installed.
This commit is contained in:
Rostislav Wolny
2025-04-24 14:54:40 +02:00
committed by Jan Lysý
parent f9e3322236
commit 0b701851e9
2 changed files with 3 additions and 10 deletions

View File

@@ -9,7 +9,6 @@ use MailPoet\Test\DataFactories\Form;
use MailPoet\Test\DataFactories\Newsletter;
use MailPoet\Test\DataFactories\Segment;
use MailPoet\Test\DataFactories\Subscriber;
use Throwable;
class SwitchingLanguagesCest {
public function _before(\AcceptanceTester $i) {
@@ -160,13 +159,4 @@ class SwitchingLanguagesCest {
$i->waitForText('Standardabsender');
$i->waitForText('Einstellungen speichern');
}
public function _after(AcceptanceTester $i) {
try {
$i->cli(['language', 'core', 'uninstall', 'de_DE']);
$i->cli(['language', 'plugin', 'uninstall', 'mailpoet', 'de_DE']);
} catch (Throwable $e) {
// language already uninstalled
}
}
}

View File

@@ -192,6 +192,9 @@ if [[ $BLOCKBASED_THEME == "1" ]]; then
wp theme install twentytwentyfour --activate
fi
# Install German language for testing in foreign languages
wp language core install de_DE
# Remove Doctrine Annotations (they are not needed since generated metadata are packed)
# We want to remove them for tests to make sure they are really not needed
if [[ $TEST_TYPE == "acceptance" ]] && [[ $CIRCLE_JOB ]]; then