X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FMember%2FUpdateMembershipScriptTest.php;h=dc96ea47220e113c94643fc2ac721411f5ad72dd;hb=0d0919c531fa34f2e66c0e8c48ebeb733dfa43df;hp=8575ca6165d7782435f13a7680a6eecdcc3acec7;hpb=6317df5c58090a09c81043bc82cf081eb0b1b4dd;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Member/UpdateMembershipScriptTest.php b/tests/phpunit/WebTest/Member/UpdateMembershipScriptTest.php index 8575ca6165..dc96ea4722 100644 --- a/tests/phpunit/WebTest/Member/UpdateMembershipScriptTest.php +++ b/tests/phpunit/WebTest/Member/UpdateMembershipScriptTest.php @@ -1,9 +1,9 @@ open($this->sboxPath); - // Log in using webtestLogin() method $this->webtestLogin(); @@ -66,12 +60,9 @@ class WebTest_Member_UpdateMembershipScriptTest extends CiviSeleniumTestCase { // Clicking save. $this->click('_qf_Membership_upload'); - $this->waitForPageToLoad($this->getTimeoutMsec()); // Is status message correct? - $this->assertElementContainsText('crm-notification-container', "{$memTypeParams['membership_type']} membership for $firstName Anderson has been added.", - "Status message didn't show up after saving!" - ); + $this->waitForText('crm-notification-container', "{$memTypeParams['membership_type']} membership for $firstName Anderson has been added."); // click through to the membership view screen $this->waitForElementPresent("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]"); @@ -109,10 +100,7 @@ class WebTest_Member_UpdateMembershipScriptTest extends CiviSeleniumTestCase { // New membership type $this->type('name', $memTypeParams['membership_type']); - $this->type('member_of_contact', $membershipTitle); - $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', $membershipTitle); // Membership fees $this->type('minimum_fee', '100'); @@ -123,14 +111,14 @@ class WebTest_Member_UpdateMembershipScriptTest extends CiviSeleniumTestCase { $this->select('duration_unit', "label=year"); // Membership period type - $this->select('period_type', "label=rolling"); + $this->select('period_type', "value=rolling"); $this->click('relationship_type_id', "value={$memTypeParams['relationship_type']}"); // Clicking save $this->click('_qf_MembershipType_upload-bottom'); $this->waitForElementPresent('link=Add Membership Type'); - $this->assertElementContainsText('crm-notification-container', "The membership type '$title' has been saved."); + $this->waitForText('crm-notification-container', "The membership type '$title' has been saved."); return $memTypeParams; } -} \ No newline at end of file +}