From: Tim Otten Date: Thu, 12 May 2022 20:53:46 +0000 (-0700) Subject: (NFC) karma - Enable all Civi components (not just CiviCase) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fc64d0fd4e3d8882c8461d2376ea5f56f02362fd;p=civicrm-core.git (NFC) karma - Enable all Civi components (not just CiviCase) This is a small cleanup (suggested by @colemanw) that makes the `karma.conf.js` appear more general. It modifies the startup process for a test-runner; as long as the test-runner still gives the same output, it should be safe. Before ------ `karma` loads baseline Angular modules and CiviCase Angular modules. After ----- `karma` loads baseline Angular modules and any/all component-based Angular modules Comment ------- Why was it only CiviCase? Not certain... but I *think* it's because (historically) `crmMailing.ang.php` did extra work to build `settings`, and this extra work was a bit too heavy. That work has moved (`settings` became `settingsFactory`) and maybe makes this safer. --- diff --git a/karma.conf.js b/karma.conf.js index d55ae83787..644203a1c4 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -2,7 +2,7 @@ var cv = require('civicrm-cv')({mode: 'sync'}); var _CV = cv('vars:show'); var cmd = 'define("CIVICRM_KARMA", 1);' + - 'CRM_Core_BAO_ConfigSetting::enableComponent("CiviCase");' + + 'CRM_Core_BAO_ConfigSetting::enableAllComponents();' + 'global $civicrm_root;' + '$f = CRM_Utils_File::addTrailingSlash($civicrm_root)."tmp/karma.cv.js";' + 'mkdir(dirname($f), 0777, TRUE);' +