X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FContact%2FProfileChecksumTest.php;h=2c661451abbecbe1baf12c37d8d7fb6fe477788a;hb=1861d923dd4e29ac945caa98e1efbeda0bb71483;hp=f726500be579e61debdb48b55137644121fe9637;hpb=997a3533bdaf41983a13c27b078f64bca12436fb;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Contact/ProfileChecksumTest.php b/tests/phpunit/WebTest/Contact/ProfileChecksumTest.php index f726500be5..2c661451ab 100644 --- a/tests/phpunit/WebTest/Contact/ProfileChecksumTest.php +++ b/tests/phpunit/WebTest/Contact/ProfileChecksumTest.php @@ -25,6 +25,10 @@ */ require_once 'CiviTest/CiviSeleniumTestCase.php'; + +/** + * Class WebTest_Contact_ProfileChecksumTest + */ class WebTest_Contact_ProfileChecksumTest extends CiviSeleniumTestCase { protected function setUp() { @@ -66,16 +70,6 @@ class WebTest_Contact_ProfileChecksumTest extends CiviSeleniumTestCase { 'update_value' => substr(sha1(rand()), 0, 7), 'element_name' => 'city-Primary', ), - 'state_province' => array( - 'type' => 'Contact', - 'label' => 'State', - 'location' => 0, - 'default_value' => '1004', - 'update_value' => '1031', - 'update_value_label' => 'NY', - 'element_name' => 'state_province-Primary', - 'html_type' => 'select', - ), 'country' => array( 'type' => 'Contact', 'label' => 'Country', @@ -86,6 +80,16 @@ class WebTest_Contact_ProfileChecksumTest extends CiviSeleniumTestCase { 'element_name' => 'country-Primary', 'html_type' => 'select', ), + 'state_province' => array( + 'type' => 'Contact', + 'label' => 'State', + 'location' => 0, + 'default_value' => '1004', + 'update_value' => '1031', + 'update_value_label' => 'NY', + 'element_name' => 'state_province-Primary', + 'html_type' => 'select', + ), ); // Create a contact. @@ -116,6 +120,7 @@ class WebTest_Contact_ProfileChecksumTest extends CiviSeleniumTestCase { foreach ($fields as $field) { $this->assertTrue($this->isElementPresent($field['element_name']), "Missing Field: {$field['label']}."); if (isset($field['html_type']) && $field['html_type'] == 'select') { + $this->waitForVisible($field['element_name']); $this->select($field['element_name'], "value={$field['update_value']}"); } else { @@ -137,6 +142,12 @@ class WebTest_Contact_ProfileChecksumTest extends CiviSeleniumTestCase { $this->assertStringsPresent($checkFieldValues); } + /** + * @param $fields + * @param string $profileName + * + * @return null + */ function _testCreateContactProfile($fields, $profileName) { // Add new profile. $this->openCiviPage("admin/uf/group", "reset=1");