}
function testInheritedMembership() {
- // This is the path where our testing install resides.
- // The rest of URL is defined in CiviSeleniumTestCase base class, in
- // class attributes.
- $this->open($this->sboxPath);
-
// Log in using webtestLogin() method
$this->webtestLogin();
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->assertElementContainsText('crm-notification-container', "Organization {$title} has been created.");
- // Go directly to the URL
$this->openCiviPage('admin/member/membershipType', 'reset=1&action=browse');
$this->click('link=Add Membership Type');
$this->getConfirmation()
));
$this->chooseOkOnNextConfirmation();
+ // Because it tends to cause problems, all uses of sleep() must be justified in comments
+ // Sleep should never be used for wait for anything to load from the server
+ // Justification for this instance: FIXME
sleep(10);
//verify inherited membership has been removed
$this->getConfirmation()
));
$this->chooseOkOnNextConfirmation();
- sleep(10);
+ $this->waitForPageToLoad($this->getTimeoutMsec());
//verify membership
$this->click('css=li#tab_member a');