From: Pratik Joshi Date: Thu, 21 Mar 2013 11:54:41 +0000 (+0530) Subject: webtest fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d275114de839fb0b74cc1fb386b23b3b99533cfa;p=civicrm-core.git webtest fix --- diff --git a/tests/phpunit/WebTest/Event/MultiprofileEventTest.php b/tests/phpunit/WebTest/Event/MultiprofileEventTest.php index f5419f965d..ea6602d89c 100644 --- a/tests/phpunit/WebTest/Event/MultiprofileEventTest.php +++ b/tests/phpunit/WebTest/Event/MultiprofileEventTest.php @@ -420,7 +420,6 @@ class WebTest_Event_MultiprofileEventTest extends CiviSeleniumTestCase { //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}"); @@ -491,7 +490,7 @@ class WebTest_Event_MultiprofileEventTest extends CiviSeleniumTestCase { // 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) { @@ -738,7 +737,7 @@ class WebTest_Event_MultiprofileEventTest extends CiviSeleniumTestCase { $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]; @@ -752,5 +751,4 @@ class WebTest_Event_MultiprofileEventTest extends CiviSeleniumTestCase { $this->click("_qf_Field_next-bottom"); $this->waitForPageToLoad($this->getTimeoutMsec()); } -} - +} \ No newline at end of file