Skip to content
Snippets Groups Projects
Commit 038dc0e3 authored by Kurund Jalmi's avatar Kurund Jalmi
Browse files

fixed setting of soft credit for WebTest_Campaign_OfflineContributionTest

parent 59445490
No related branches found
No related tags found
No related merge requests found
......@@ -360,13 +360,13 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase {
/**
*/
function webtestFillAutocomplete($sortName) {
$this->click('contact_1');
$this->type('contact_1', $sortName);
$this->typeKeys('contact_1', $sortName);
function webtestFillAutocomplete($sortName, $fieldName = 'contact_1') {
$this->click($fieldName);
$this->type($fieldName, $sortName);
$this->typeKeys($fieldName, $sortName);
$this->waitForElementPresent("css=div.ac_results-inner li");
$this->click("css=div.ac_results-inner li");
$this->assertContains($sortName, $this->getValue('contact_1'), "autocomplete expected $sortName but didn’t find it in " . $this->getValue('contact_1'));
$this->assertContains($sortName, $this->getValue($fieldName), "autocomplete expected $sortName but didn’t find it in " . $this->getValue($fieldName));
}
/**
......
......@@ -168,10 +168,7 @@ class WebTest_Campaign_OfflineContributionTest extends CiviSeleniumTestCase {
$this->type("trxn_id", "P20901X1" . rand(100, 10000));
// soft credit
$this->click("soft_credit_contact_1");
$this->type("soft_credit_contact_1", $softCreditFname);
$this->typeKeys("soft_credit_contact_1", $softCreditFname);
$this->waitForElementPresent("soft_credit_amount_1");
$this->webtestFillAutocomplete("{$softCreditLname}, {$softCreditFname}", 'soft_credit_contact_1');
//Additional Detail section
$this->click("AdditionalDetail");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment