else {
$text = "The financial type \"{$financialType['name']}\" has been updated.";
}
- $this->waitForElementPresent("xpath=//div[@class='notify-content']");
- $this->assertElementContainsText('crm-notification-container', $text);
+ $this->assertSuccessMsg($text);
}
/**
$this->waitForElementPresent("css=.crm-status-box-outer.status-success");
}
+ /**
+ * Wait for unobtrusive status message as set by CRM.status
+ */
+ function assertSuccessMsg($text) {
+ $this->waitForElementPresent("css=div.success");
+ $this->assertElementContainsText("css=div.success", $text);
+ }
+
/**
* function to enable or disable Pop-ups via Display Preferences
*/
$this->clickLink("_qf_Contribution_upload");
// Is status message correct?
$this->waitForText('crm-notification-container', "The contribution record has been saved.");
- // verify if Membership is created
+ // verify if Contribution is created
$this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']");
//click through to the Contribution edit screen
$contId = explode('&id=', $this->getAttribute("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']@href"));
$this->select('product_name_0', "label=$premiumName2 ( $sku2 )");
// Clicking save.
$this->clickLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']", FALSE);
+ $this->assertSuccessMsg("The contribution record has been saved.");
+ // Opening View page and cancelling to give the DB time to get updated prior to Assert statements below. dgg
+ $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']");
+ $this->clickLink("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE);
+ $this->waitForElementPresent("_qf_ContributionView_cancel-bottom");
+ $this->clickLink("_qf_ContributionView_cancel-bottom", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']", FALSE);
//Assertions
$actualAmount = $this->_getPremiumActualCost($contId, $to, $from, $cost2, "'civicrm_contribution'");
$this->clickLink("_qf_Contribution_upload");
// Is status message correct?
$this->waitForText('crm-notification-container', "The contribution record has been saved.");
- // verify if Membership is created
+ // verify if Contribution is created
$this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']");
//click through to the Contribution edit screen
$contId = explode('&id=', $this->getAttribute("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']@href"));