//Add field to profile_testCreateProfile
foreach ($profilefield as $key => $value) {
$this->openCiviPage("admin/uf/group/field/add", "reset=1&action=add&gid=$profileId");
- $this->waitForPageToLoad($this->getTimeoutMsec());
if (in_array($value, $locationfields)) {
$this->select("field_name[0]", "value={$type}");
$this->select("field_name[1]", "value={$value}");
// select newly created processor
$xpath = "xpath=//label[text() = '{$processorName}']/preceding-sibling::input[1]";
- $this->assertTrue($this->isTextPresent($processorName));
+ $this->assertElementContainsText('css=.crm-event-manage-fee-form-block-payment_processor', $processorName);
$this->check($xpath);
$this->select("financial_type_id", "label=Event Fee");
if ($priceSet) {
$cfId = "";
//check wheather webtest has created the field
- if (!$this->isTextPresent("The selected field was not added. It already exists in this profile")) {
+ if($this->assertElementNotContainsText('crm-notification-container', "The selected field was not added. It already exists in this profile")) {
$this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr[8]/td[9]/span/a[text()='Edit']");
$cfId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr[8]/td[9]/span/a[text()='Edit']/@href"));
$cfId = $cfId[1];
$this->click("_qf_Field_next-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
}
-}
-
+}
\ No newline at end of file