Merge pull request #9629 from colemanw/CRM-19770
[civicrm-core.git] / tests / phpunit / WebTest / Contact / CustomDataAddTest.php
index 00c86ad42d8a21e958f9836eefe5e26cc21f7c9d..fb2aaee5553dd57657646dfc3ba1083e7231a71c 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.                                    |
  |                                                                    |
@@ -68,7 +68,7 @@ class WebTest_Contact_CustomDataAddTest extends CiviSeleniumTestCase {
     $checkboxOptionLabel2 = 'optionLabel_' . substr(sha1(rand()), 0, 5);
     $this->type("option_label_2", $checkboxOptionLabel2);
     $this->type("option_value_2", "2");
-    $this->click("link=another choice");
+    $this->click("link=add another choice");
     $checkboxOptionLabel3 = 'optionLabel_' . substr(sha1(rand()), 0, 5);
     $this->type("option_label_3", $checkboxOptionLabel3);
     $this->type("option_value_3", "3");
@@ -109,7 +109,7 @@ class WebTest_Contact_CustomDataAddTest extends CiviSeleniumTestCase {
     $radioOptionLabel2 = 'optionLabel_' . substr(sha1(rand()), 0, 5);
     $this->type("option_label_2", $radioOptionLabel2);
     $this->type("option_value_2", "2");
-    $this->click("link=another choice");
+    $this->click("link=add another choice");
     $radioOptionLabel3 = 'optionLabel_' . substr(sha1(rand()), 0, 5);
     $this->type("option_label_3", $radioOptionLabel3);
     $this->type("option_value_3", "3");
@@ -232,7 +232,7 @@ class WebTest_Contact_CustomDataAddTest extends CiviSeleniumTestCase {
 
     //verify the money custom field value in the proper format
     $this->assertTrue($this->isElementPresent("xpath=//div[@id='custom-set-content-{$customFieldsetId}']/div/div[2]/div[2]"));
-    $this->verifyText("xpath=//div[@id='custom-set-content-{$customFieldsetId}']/div/div[2]/div[2]", '12,345,678.98');
+    $this->assertElementContainsText("xpath=//div[@id='custom-set-content-{$customFieldsetId}']/div/div[2]/div[2]", '12,345,678.98');
   }
 
   public function testCustomDataChangeLog() {