Merge pull request #9617 from totten/master-19824
[civicrm-core.git] / tests / phpunit / WebTest / Case / CaseDashboardTest.php
index 0dd150ec276e58057523dc73f3b6597035cb781c..eed28f6286c99d36b819622c44be430714752c21 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2017                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -77,7 +77,7 @@ class WebTest_Case_CaseDashboardTest extends CiviSeleniumTestCase {
     $this->openCiviPage('case/add', 'reset=1&action=add&atype=13&context=standalone', '_qf_Case_upload-bottom');
 
     // We're using pop-up New Contact dialog
-    $this->createDialogContact('client_id');
+    $params = $this->createDialogContact('client_id');
 
     // Fill in other form values. We'll use a case type which is included in CiviCase sample data / xml files.
     $caseTypeLabel = "Adult Day Care Referral";
@@ -108,6 +108,12 @@ class WebTest_Case_CaseDashboardTest extends CiviSeleniumTestCase {
     // Is status message correct?
     $this->waitForText('crm-notification-container', "Case opened successfully.");
 
+    // Go back to dashboard
+    $this->openCiviPage('case', 'reset=1');
+    //Check whether case status link opens in search correctly
+    $this->clickLink("xpath=//table[@class='report']/tbody/tr[3]/td/a");
+    $this->assertElementContainsText('Search', "{$params['last_name']}, {$params['first_name']}");
+
     // Go back to dashboard
     $this->openCiviPage('case', 'reset=1');