diff --git a/CHANGELOG.md b/CHANGELOG.md index c825390ddcce8ba0daf2aa1a745a0dae58a88be2..9df956bfeff80e1f78d3c9e8ae3ac0c05e019ece 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +[1.4.5] - 2019-12-06 +# Fixed +* unexpected alert open: {Alert text : } + +[1.4.4] - 2019-12-06 +# Added +* reports and more verbose when runs form composer command + [1.4.3] - 2019-12-05 # Fixed * Themes cache diff --git a/README.md b/README.md index 91c472f847f59421219a8d31901eb798df09e5c2..a23055fc3e981c53abc9ac20738086cacdf7f6db 100644 --- a/README.md +++ b/README.md @@ -80,4 +80,10 @@ When plugin uses other plugins and that plugins are in WordPress repository we c When we want to use plugin from wpdesk gitlab we can use prepare.sh script. There are example usage in flexible-shipping-pro plugin. Check flexible-shipping-pro/tests/codeception/prepare.sh.dist file. +# Tips +If there is `unexpected alert open: {Alert text : }` add to acceptance.suite.yml in `WPWebDriver` config section: +```yaml + capabilities: + unexpectedAlertBehaviour: "accept" +``` diff --git a/configuration/acceptance.suite.yml b/configuration/acceptance.suite.yml index 60eded446dcb06cb504159b0085fbea5aa45230a..e197ae3ee1398dc827f7cadfcf38c9343ca20b29 100644 --- a/configuration/acceptance.suite.yml +++ b/configuration/acceptance.suite.yml @@ -40,6 +40,9 @@ modules: adminUsername: '%TEST_SITE_ADMIN_USERNAME%' adminPassword: '%TEST_SITE_ADMIN_PASSWORD%' adminPath: '%TEST_SITE_WP_ADMIN_PATH%' + log_js_errors: true + capabilities: + unexpectedAlertBehaviour: "accept" WPCLI: path: '%WP_ROOT_FOLDER%' throw: true diff --git a/src/WPDesk/Composer/Commands/RunCodeceptionTests.php b/src/WPDesk/Composer/Commands/RunCodeceptionTests.php index 33defb0abe3c3a641b01c8d7ce8d809eebf8a376..27db00c794ef304fe1e6241ec09f29450e467f22 100644 --- a/src/WPDesk/Composer/Commands/RunCodeceptionTests.php +++ b/src/WPDesk/Composer/Commands/RunCodeceptionTests.php @@ -65,9 +65,10 @@ class RunCodeceptionTests extends BaseCommand mkdir($cache_dir, 0777, true); } putenv('TMP_CACHE_DIR=' . $cache_dir); - $additionalParameters = ' '; + $codecept_param = ' --html --verbose '; + $additionalParameters = ' -e CODECEPT_PARAM="' . $codecept_param . '" '; if (!empty($singleTest) && 'all' !== $singleTest) { - $additionalParameters .= ' -e CODECEPT_PARAM="acceptance ' . $singleTest . '" '; + $additionalParameters .= ' -e CODECEPT_PARAM="' . $codecept_param . ' acceptance ' . $singleTest . '" '; } if (!empty($wooVersion)) { $additionalParameters .= ' -e WOOCOMMERCE_VERSION="' . $wooVersion . '" ';