CRM-12378 a new webtest helper function introduction which can help detect break...
[civicrm-core.git] / tests / phpunit / WebTest / Case / AddCaseTest.php
index 13350f1ff3393866d28c186112f5e3158f11b53f..b548ea3d0602d0088ab1ef937375afef5a4cb214 100644 (file)
@@ -140,6 +140,21 @@ class WebTest_Case_AddCaseTest extends CiviSeleniumTestCase {
     $this->_testSearchbyDate($firstName, $lastName, "this.year");
   }
 
+  function testAjaxCustomGroupLoad() {
+    $this->webtestLogin();
+
+    // Enable CiviCase module if necessary
+    $this->enableComponents("CiviCase");
+
+    $triggerElement = array('name' => 'case_type_id', 'type' => 'select');
+    $customSets = array(
+      array('entity' => 'Case', 'subEntity' => 'Housing Support', 'triggerElement' => $triggerElement),
+    );
+
+    $pageUrl = array('url' => 'case/add', 'args' => "reset=1&action=add&atype=13&context=standalone");
+    $this->customFieldSetLoadOnTheFlyCheck($customSets, $pageUrl);
+  }
+
   function _testVerifyCaseSummary($validateStrings, $activityTypes) {
     $this->assertStringsPresent($validateStrings);
     foreach ($activityTypes as $aType) {