- // soft credit
- $this->click("soft_credit_to");
- $this->type("soft_credit_to", $softCreditFname);
- $this->typeKeys("soft_credit_to", $softCreditFname);
-
+ // create first 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->verifyText("soft_credit_amount_1","100");
+ $this->type("soft_credit_amount_1", "50");
+
+ // add second soft credit field
+ $this->click("addMoreSoftCredit");
+ $this->waitForElementPresent("soft_credit_amount_2");
+ // create new individual via soft credit
+ $softCreditSecondFname = substr(sha1(rand()), 0, 7);
+ $softCreditSecondLname = substr(sha1(rand()), 0, 7);
+ $this->webtestNewDialogContact($softCreditSecondFname,$softCreditSecondLname, null, 4, 'soft_credit_profiles_2','soft_credit_1');
+ // enter the second soft credit
+ $this->verifyText("soft_credit_amount_2",""); // it should be blank cause first soft credit != total_amount
+ $this->type("soft_credit_amount_2","100"); //the sum of the soft credit amounts can exceed total_amount
+
+