X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FMember%2FOfflineMembershipRenewTest.php;h=d4eb1e7f1c61e65d793c0b14f49bee8e4d99e4eb;hb=5c80555fd8c24148ac1681ddf93a7fc1dbea6b45;hp=c4e56352ccb75a987bb5ab312d58fe98e3944de3;hpb=e8cca51aa6ed1feb98786bd980a1395d8a9a785a;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php b/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php index c4e56352cc..d4eb1e7f1c 100644 --- a/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php +++ b/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php @@ -1,7 +1,7 @@ webtestLogin(); // make sure period is correct for the membership type we testing for, @@ -93,14 +93,13 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase { // save the renewed membership $this->click('_qf_MembershipRenewal_upload-bottom'); - // page was loaded $this->waitForTextPresent($sourceText); - $this->waitForElementPresent("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']"); + $this->waitForElementPresent("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span/a[1][text()='View']"); // click through to the membership view screen - $this->click("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']"); + $this->click("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span/a[1][text()='View']"); $this->waitForElementPresent('_qf_MembershipView_cancel-bottom'); @@ -118,9 +117,9 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase { 'End date' => $endDate, ); $this->webtestVerifyTabularData($verifyMembershipRenewData); - } + } - function testOfflineMemberRenewOverride() { + public function testOfflineMemberRenewOverride() { $this->webtestLogin(); // add membership type @@ -196,14 +195,13 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase { // save the renewed membership $this->click('_qf_MembershipRenewal_upload-bottom'); - // page was loaded $this->waitForTextPresent($sourceText); - $this->waitForElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[9]/span[1]/a[1][text()='View']"); + $this->waitForElementPresent("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span[1]/a[1][text()='View']"); // click through to the membership view screen - $this->click("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[9]/span[1]/a[1][text()='View']"); + $this->click("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span/a[1][text()='View']"); $this->waitForElementPresent('_qf_MembershipView_cancel-bottom'); @@ -224,7 +222,7 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase { $this->webtestVerifyTabularData($verifyMembershipRenewOverrideData); } - function testOfflineMembershipRenewChangeType() { + public function testOfflineMembershipRenewChangeType() { $this->webtestLogin(); // make sure period is correct for the membership type we testing for, @@ -294,7 +292,6 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase { // save the renewed membership $this->click('_qf_MembershipRenewal_upload-bottom'); - // page was loaded $this->waitForTextPresent($sourceText); @@ -322,7 +319,7 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase { $this->webtestVerifyTabularData($verifyMembershipData); } - function testOfflineMembershipRenewMultipleTerms() { + public function testOfflineMembershipRenewMultipleTerms() { $this->webtestLogin(); // make sure period is correct for the membership type we testing for, @@ -358,8 +355,8 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase { // Record contribution $this->click('record_contribution'); - $this->waitForElementPresent( 'financial_type_id' ); - $this->select( 'financial_type_id', "label=Member Dues" ); + $this->waitForElementPresent('financial_type_id'); + $this->select('financial_type_id', "label=Member Dues"); $this->select('payment_instrument_id', "label=Check"); $this->waitForElementPresent('check_number'); $this->type('check_number', '1023'); @@ -381,7 +378,6 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase { $this->waitForText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added."); $this->waitForText('crm-notification-container', "A membership confirmation and receipt has been sent to {$firstName}@memberson.com."); - $this->waitForElementPresent("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']"); // click through to the Membership Renewal Link $this->click("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']"); @@ -411,7 +407,6 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase { // save the renewed membership $this->click('_qf_MembershipRenewal_upload-bottom'); - // page was loaded $this->waitForTextPresent($sourceText);