From 15e9e899566ca5e05bafaf78acf37a6446528c93 Mon Sep 17 00:00:00 2001 From: Pratik Joshi Date: Thu, 2 May 2013 15:35:48 +0530 Subject: [PATCH] this webtest fix is WRT https://github.com/agh1/civicrm-core/commit/4dfcb7f8 this commit --- .../WebTest/Financial/FinancialAccountTypeTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/phpunit/WebTest/Financial/FinancialAccountTypeTest.php b/tests/phpunit/WebTest/Financial/FinancialAccountTypeTest.php index d7af5d4854..f1f8ff7ca1 100644 --- a/tests/phpunit/WebTest/Financial/FinancialAccountTypeTest.php +++ b/tests/phpunit/WebTest/Financial/FinancialAccountTypeTest.php @@ -129,13 +129,13 @@ class WebTest_Financial_FinancialAccountTypeTest extends CiviSeleniumTestCase { $this->waitForText('crm-notification-container', $text); foreach ($expected as $value => $label) { - $this->verifyText("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='$label[financial_account]']/../td[2]", preg_quote($label['account_relationship'])); + $this->verifyText("xpath=id('ltype')/div/table/tbody/tr/td[2][text()='$label[financial_account]']/../td[1]", preg_quote($label['account_relationship'])); } $this->openCiviPage('admin/financial/financialType', 'reset=1', 'newFinancialType'); $this->verifyText("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='$financialType[name]']/../td[3]", $financialAccountTitle. ',Banking Fees'); $this->click("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='$financialType[name]']/../td[7]/span/a[text()='Accounts']"); $this->waitForElementPresent('newfinancialTypeAccount'); - $this->click("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='Banking Fees']/../td[7]/span/a[text()='Edit']"); + $this->click("xpath=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 @@ -145,9 +145,9 @@ class WebTest_Financial_FinancialAccountTypeTest extends CiviSeleniumTestCase { $this->select('account_relationship', "label=Accounts Receivable Account is"); $this->select('financial_account_id', "label=Accounts Receivable"); $this->click('_qf_FinancialTypeAccount_next'); - $this->waitForElementPresent("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='Accounts Receivable']/../td[7]/span/a[text()='Edit']"); - $this->verifyText("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='Accounts Receivable']/../td[2]", preg_quote('Accounts Receivable Account is')); - $this->clickLink("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='Accounts Receivable']/../td[7]/span/a[text()='Delete']", '_qf_FinancialTypeAccount_next-botttom'); + $this->waitForElementPresent("xpath=id('ltype')/div/table/tbody/tr/td[2][text()='Accounts Receivable']/../td[7]/span/a[text()='Edit']"); + $this->verifyText("xpath=id('ltype')/div/table/tbody/tr/td[2][text()='Accounts Receivable']/../td[1]", preg_quote('Accounts Receivable Account is')); + $this->clickLink("xpath=id('ltype')/div/table/tbody/tr/td[2][text()='Accounts Receivable']/../td[7]/span/a[text()='Delete']", '_qf_FinancialTypeAccount_next-botttom'); $this->click('_qf_FinancialTypeAccount_next-botttom'); $this->waitForPageToLoad($this->getTimeoutMsec()); $this->waitForText('crm-notification-container', 'Selected financial type account has been deleted.'); @@ -161,4 +161,4 @@ class WebTest_Financial_FinancialAccountTypeTest extends CiviSeleniumTestCase { //delete financialtype $this->addeditFinancialType($financialType , 'Delete'); } -} +} \ No newline at end of file -- 2.25.1