X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FMember%2FOnlineMembershipRenewTest.php;h=cdb31afe5ed9271268796052ff49dceb3efb83a3;hb=1789c269b1c68178c1f3de38d751a4e37f94db4c;hp=2e3a16379e71884378391c80b04346b92527d5b1;hpb=53128a92d19ec8f0526b48a4a0c044bb0d671d84;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php b/tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php index 2e3a16379e..cdb31afe5e 100644 --- a/tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php +++ b/tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php @@ -1,9 +1,9 @@ waitForElementPresent('custom_pre_id'); - $this->select('custom_pre_id', 'value=1'); + $this->select('css=tr.crm-contribution-contributionpage-custom-form-block-custom_pre_id span.crm-profile-selector-select select', 'value=1'); // save $this->click('_qf_Custom_upload_done'); @@ -103,6 +107,7 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase { $this->type("first_name", $firstName); $this->type("last_name", $lastName); $this->type("email-5", $email); + $this->select("state_province-1", "value=1001"); //Credit Card Info $this->select("credit_card_type", "value=Visa"); @@ -160,6 +165,7 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase { $this->type("first_name", $firstName); $this->type("last_name", $lastName); $this->type("email-5", $email); + $this->select("state_province-1", "value=1001"); //Credit Card Info $this->select("credit_card_type", "value=Visa"); @@ -255,7 +261,7 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase { // fill in Profiles $this->waitForElementPresent('custom_pre_id'); - $this->select('custom_pre_id', 'value=1'); + $this->select('css=tr.crm-contribution-contributionpage-custom-form-block-custom_pre_id span.crm-profile-selector-select select', 'value=1'); // save $this->click('_qf_Custom_upload_done'); @@ -271,6 +277,7 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase { $this->type("first_name", $firstName); $this->type("last_name", $lastName); + $this->select("state_province-1", "value=1001"); //Credit Card Info $this->select("credit_card_type", "value=Visa"); $this->select("credit_card_type", "label=Visa"); @@ -388,16 +395,13 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase { $membershipTypeTitle = "Membership Type $title"; $this->type('name', "Membership Type $title"); - $this->type('member_of_contact', $title); - $this->click('member_of_contact'); - $this->waitForElementPresent("css=div.ac_results-inner li"); - $this->click("css=div.ac_results-inner li"); + $this->select2('member_of_contact_id', $title); $this->type('minimum_fee', '100'); $this->select( 'financial_type_id', 'value=2' ); $this->type('duration_interval', 1); $this->select('duration_unit', 'label=year'); - $this->select('period_type', 'label=rolling'); + $this->select('period_type', 'value=rolling'); $this->removeSelection('relationship_type_id', 'label=- select -'); $this->addSelection('relationship_type_id', 'label=Employer of'); @@ -406,7 +410,7 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase { $this->waitForElementPresent('link=Add Membership Type'); $this->waitForText('crm-notification-container', "The membership type 'Membership Type $title' has been saved."); - $url = $this->getAttribute("xpath=//div[@id='membership_type']//div[@class='dataTables_wrapper']//table/tbody//tr/td[1][text()='{$membershipTypeTitle}']/../td[12]/span/a[3][text()='Delete']/@href"); + $url = $this->getAttribute("xpath=//div[@id='membership_type']//div[@id='option11_wrapper']//table/tbody//tr/td[1][text()='{$membershipTypeTitle}']/../td[12]/span/a[3][text()='Delete']/@href"); $matches = array(); preg_match('/id=([0-9]+)/', $url, $matches); @@ -459,7 +463,7 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase { $this->click('link=Title'); $this->waitForElementPresent('_qf_Settings_cancel-bottom'); $this->click('is_organization'); - $this->select('onbehalf_profile_id', "value=9"); + $this->select("xpath=//input[@id='onbehalf_profile_id']/parent::td/div/div/span/select", "value=9"); $this->type('for_organization', "On behalf $hash"); $this->click('_qf_Settings_next-bottom'); $this->waitForPageToLoad($this->getTimeoutMsec()); @@ -499,6 +503,7 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase { $this->type('first_name', $firstName); $this->type('last_name', $lastName); + $this->select("state_province-1", "value=1001"); //Credit Card Info $this->select("credit_card_type", "value=Visa"); @@ -587,6 +592,7 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase { $this->type('first_name', $firstName); $this->type('last_name', $lastName); + $this->select("state_province-1", "value=1001"); //Credit Card Info $this->select("credit_card_type", "value=Visa");