Merge pull request #9790 from fliespl/patch-3
[civicrm-core.git] / tests / phpunit / WebTest / Contact / InlineFieldsEditTest.php
index 70796b4d101df8248a09962038c458810defe965..fa0f343f846e0838c24e488425d0278d972d3b38 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016                                |
+ | Copyright CiviCRM LLC (c) 2004-2017                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -309,7 +309,7 @@ class WebTest_Contact_InlineFieldsEditTest extends CiviSeleniumTestCase {
             case 'string':
               if ($val && substr($val, 0, 5) == 'date:') {
                 $val = date('m/d/Y', strtotime(trim(substr($val, 5))));
-                $item = "xpath=//input[starts-with(@id, '{$item}_display_')]";
+                $item = "xpath=//input[@id='{$item}']/following-sibling::input";
               }
               if ($val) {
                 $this->assertElementValueEquals($item, $val);