From: jitendrapurohit Date: Mon, 2 May 2016 06:19:03 +0000 (+0530) Subject: CRM-18454 - pass proper id for datepicker of core and custom field X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=22d1f513bd681523c912e2d1b789cde421bf6efc;p=civicrm-core.git CRM-18454 - pass proper id for datepicker of core and custom field Fix id of custom date field --- diff --git a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php index 8d6668b13f..c719f503e4 100644 --- a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php +++ b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php @@ -585,7 +585,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { $day = date('j', $timeStamp); if (!$multiselect) { - $this->click($dateElement); + $this->click("xpath=//input[@id='{$dateElement}']/following-sibling::input"); } $this->waitForElementPresent("css=div#ui-datepicker-div.ui-datepicker div.ui-datepicker-header div.ui-datepicker-title select.ui-datepicker-month"); $this->select("css=div#ui-datepicker-div.ui-datepicker div.ui-datepicker-header div.ui-datepicker-title select.ui-datepicker-month", "value=$mon"); diff --git a/tests/phpunit/WebTest/Contact/InlineFieldsEditTest.php b/tests/phpunit/WebTest/Contact/InlineFieldsEditTest.php index 70796b4d10..0409889de5 100644 --- a/tests/phpunit/WebTest/Contact/InlineFieldsEditTest.php +++ b/tests/phpunit/WebTest/Contact/InlineFieldsEditTest.php @@ -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);