X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FFinancial%2FFinancialAccountTypeTest.php;h=8b72ca92285c2a7608af3aef8c0eabd29c90b4df;hb=397d0aec7771968e6ad649229f9a72c9c0e9b12c;hp=26e786054d321f16885ebff2369dd42c61df5d85;hpb=1789c269b1c68178c1f3de38d751a4e37f94db4c;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Financial/FinancialAccountTypeTest.php b/tests/phpunit/WebTest/Financial/FinancialAccountTypeTest.php index 26e786054d..8b72ca9228 100644 --- a/tests/phpunit/WebTest/Financial/FinancialAccountTypeTest.php +++ b/tests/phpunit/WebTest/Financial/FinancialAccountTypeTest.php @@ -2,7 +2,7 @@ /* +--------------------------------------------------------------------+ - | CiviCRM version 4.5 | + | CiviCRM version 4.6 | +--------------------------------------------------------------------+ | Copyright CiviCRM LLC (c) 2004-2014 | +--------------------------------------------------------------------+ @@ -32,7 +32,7 @@ require_once 'CiviTest/CiviSeleniumTestCase.php'; */ class WebTest_Financial_FinancialAccountTypeTest extends CiviSeleniumTestCase { - function testFinancialAccount() { + public function testFinancialAccount() { // To Add Financial Account // class attributes. @@ -79,18 +79,15 @@ class WebTest_Financial_FinancialAccountTypeTest extends CiviSeleniumTestCase { $this->click("xpath=//div[@id='ltype']/div/table/tbody/tr/td[2][text()='Banking Fees']/../td[7]/span/a[text()='Edit']"); $this->waitForElementPresent('_qf_FinancialTypeAccount_next'); $this->select('account_relationship', "value=select"); - // Because it tends to cause problems, all uses of sleep() must be justified in comments - // Sleep should never be used for wait for anything to load from the server - // Justification for this instance: FIXME - sleep(1); + $this->waitForElementPresent("xpath=//select[@id='account_relationship']/option[text()='- Select Financial Account Relationship -']"); $this->select('account_relationship', "label=Premiums Inventory Account is"); + $this->waitForElementPresent("xpath=//select[@id='financial_account_id']/option[3][text()='Deposit Bank Account']"); $this->select('financial_account_id', "label=Premiums inventory"); $this->click('_qf_FinancialTypeAccount_next'); $this->waitForElementPresent("xpath=//div[@id='ltype']/div/table/tbody/tr/td[2][text()='Premiums inventory']/../td[7]/span/a[text()='Edit']"); $this->verifyText("xpath=//div[@id='ltype']/div/table/tbody/tr/td[2][text()='Premiums inventory']/../td[1]", preg_quote('Premiums Inventory Account is')); $this->clickLink("xpath=//div[@id='ltype']/div/table/tbody/tr/td[2][text()='Premiums inventory']/../td[7]/span/a[text()='Delete']", '_qf_FinancialTypeAccount_next-botttom', FALSE); $this->click('_qf_FinancialTypeAccount_next-botttom'); - $this->waitForElementPresent("newfinancialTypeAccount"); $this->waitForText('crm-notification-container', 'Selected financial type account has been deleted.'); //edit financial type