From d340a0e88fcbceaf31e4f0d4cc3eafca3195504d Mon Sep 17 00:00:00 2001 From: Atif Shaikh Date: Tue, 6 May 2014 19:47:42 +0530 Subject: [PATCH] WebTestFix --- tests/phpunit/CiviTest/CiviSeleniumTestCase.php | 2 +- .../WebTest/Contribute/ContributionPageAddTest.php | 13 ++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php index 890153e1ee..289cd936fa 100644 --- a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php +++ b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php @@ -849,7 +849,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { if ($onBehalf) { $this->click('is_organization'); - $this->select('onbehalf_profile_id', 'label=On Behalf Of Organization'); + $this->select("xpath=//*[@class='crm-contribution-onbehalf_profile_id']//span[@class='crm-profile-selector-select']//select", 'label=On Behalf Of Organization'); $this->type('for_organization', "On behalf $hash"); if ($onBehalf == 'required') { diff --git a/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php b/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php index b88561758d..aea39215bb 100644 --- a/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php +++ b/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php @@ -59,9 +59,6 @@ class WebTest_Contribute_ContributionPageAddTest extends CiviSeleniumTestCase { 'Organization Details', 'Other Amount', 'I pledge to contribute this amount every', - "Honoree Section Title $hash", - "Honoree Introductory Message $hash", - 'In Honor of', 'Name and Address', 'Summary Overlay', ); @@ -69,7 +66,7 @@ class WebTest_Contribute_ContributionPageAddTest extends CiviSeleniumTestCase { $this->assertTrue($this->isTextPresent($text), 'Missing text: ' . $text); } } - + // CRM-12510 Test copy contribution page function testContributionPageCopy() { // open browser, login @@ -117,9 +114,6 @@ class WebTest_Contribute_ContributionPageAddTest extends CiviSeleniumTestCase { 'Organization Details', 'Other Amount', 'I pledge to contribute this amount every', - "Honoree Section Title $hash", - "Honoree Introductory Message $hash", - 'In Honor of', 'Name and Address', 'Summary Overlay', ); @@ -165,9 +159,6 @@ class WebTest_Contribute_ContributionPageAddTest extends CiviSeleniumTestCase { 'Organization Details', 'Other Amount', 'I pledge to contribute this amount every', - "Honoree Section Title $hash", - "Honoree Introductory Message $hash", - 'In Honor of', 'Name and Address', 'Summary Overlay', ); @@ -301,7 +292,7 @@ class WebTest_Contribute_ContributionPageAddTest extends CiviSeleniumTestCase { $this->select('financial_type_id', "label=Donation"); $this->click('is_organization'); - $this->select('onbehalf_profile_id', 'label=On Behalf Of Organization'); + $this->select("xpath=//*[@class='crm-contribution-onbehalf_profile_id']//span[@class='crm-profile-selector-select']//select", 'label=On Behalf Of Organization'); $this->type('for_organization', "On behalf $hash"); // make onBehalf optional $this->click('CIVICRM_QFID_1_2'); -- 2.25.1