From a04bd6d66c70edd72d1caa81c8aeacab17a60758 Mon Sep 17 00:00:00 2001 From: Anton Fedurtsya Date: Mon, 25 Mar 2024 18:57:12 +0200 Subject: [PATCH] OXDEV-7845 Add test running aliases to composer.json and fix codeception defaults Signed-off-by: Anton Fedurtsya --- composer.json | 13 +++++++++---- tests/Codeception/config/params.php | 6 ++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index cd636e4a79..13c064ca10 100644 --- a/composer.json +++ b/composer.json @@ -74,10 +74,7 @@ "bin/oe-console" ], "config": { - "allow-plugins": { - "oxid-esales/oxideshop-composer-plugin": true, - "oxid-esales/oxideshop-unified-namespace-generator": true - } + "allow-plugins": false }, "extra": { "oxideshop": { @@ -99,6 +96,14 @@ ], "oe:ide-helper:generate": [ "if [ -f ./vendor/bin/oe-eshop-ide_helper ]; then oe-eshop-ide_helper; fi" + ], + + "phpunit": "vendor/bin/phpunit --bootstrap=/var/www/source/bootstrap.php --config=phpunit.xml", + "phpunit-coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text --bootstrap=/var/www/source/bootstrap.php --config=phpunit.xml --coverage-html=tests/reports/coverage", + + "codeception": [ + "Composer\\Config::disableProcessTimeout", + "vendor/bin/codecept run acceptance -c tests/codeception.yml" ] } } diff --git a/tests/Codeception/config/params.php b/tests/Codeception/config/params.php index fdd3b1ddf2..ca913ab44d 100755 --- a/tests/Codeception/config/params.php +++ b/tests/Codeception/config/params.php @@ -11,6 +11,8 @@ use OxidEsales\Facts\Facts; use OxidEsales\Codeception\Module\Database\DatabaseDefaultsFileGenerator; +require_once "/var/www/source/bootstrap.php"; + $facts = new Facts(); return [ @@ -26,10 +28,10 @@ 'FIXTURES_PATH' => getTestFixtureSqlFilePath(), 'MYSQL_CONFIG_PATH' => getMysqlConfigPath(), 'SELENIUM_SERVER_PORT' => getenv('SELENIUM_SERVER_PORT') ?: '4444', - 'SELENIUM_SERVER_HOST' => getenv('SELENIUM_SERVER_HOST') ?: '127.0.0.1', + 'SELENIUM_SERVER_HOST' => getenv('SELENIUM_SERVER_HOST') ?: 'selenium', 'PHP_BIN' => (getenv('PHPBIN')) ?: 'php', 'SCREEN_SHOT_URL' => getenv('CC_SCREEN_SHOTS_URL') ?: '', - 'BROWSER' => getenv('BROWSER_NAME') ?: 'firefox', + 'BROWSER' => getenv('BROWSER_NAME') ?: 'chrome', 'THEME_ID' => getenv('THEME_ID') ?: 'apex', ];