$this->waitForPageToLoad($this->getTimeoutMsec());
//the civicrm messages should indicate the username is taken
- $this->assertElementContainsText("css=#crm-notification-container", "already taken", "CiviCRM Message does not indicate the username is in user");
+ $this->assertElementContainsText("xpath=//span[@class = 'crm-error']", "already taken", "CiviCRM Message does not indicate the username is in user");
//check the uf match table that no contact has been created
$results = $this->webtest_civicrm_api("UFMatch", "get", array('contact_id' => $cid));
$this->assertTrue($results['count'] == 0);
$this->waitForPageToLoad($this->getTimeoutMsec());
//check that that there is a password mismatch text
- $this->assertElementContainsText("css=#crm-notification-container", "Password mismatch", "No form error given on password missmatch");
+ $this->assertElementContainsText("xpath=//table[@class='form-layout-compressed']/tbody/tr[3]/td/span[@class='crm-error']", "Password mismatch", "No form error given on password missmatch");
//check that no user was created;
$results = $this->webtest_civicrm_api("UFMatch", "get", array('contact_id' => $cid));
$this->waitForPageToLoad($this->getTimeoutMsec());
//the civicrm messages section should not indicate that a user has been created
- $this->assertElementNotContainsText("css=#crm-notification-container", "User has been added", "CiviCRM messages say that a user was created when username left blank");
+ $this->assertElementNotContainsText("xpath=//span[@class='crm-error']", "User has been added", "CiviCRM messages say that a user was created when username left blank");
//the civicrm message should say username is required
- $this->assertElementContainsText("css=#crm-notification-container", "Username is required", "The CiviCRM messae does not indicate that the username is required");
+ $this->assertElementContainsText("xpath=//span[@class='crm-error']", "Username is required", "The CiviCRM messae does not indicate that the username is required");
//the civicrm message should say password is required
- $this->assertElementContainsText("css=#crm-notification-container", "Password is required", "The CiviCRM messae does not indicate that the password is required");
+ $this->assertElementContainsText("xpath=//table[@class='form-layout-compressed']/tbody/tr[3]/td/span[@class='crm-error']", "Password is required", "The CiviCRM messae does not indicate that the password is required");
//check that no user was created;
$results = $this->webtest_civicrm_api("UFMatch", "get", array('contact_id' => $cid));
$this->type('title', $params['name']);
$this->click('_qf_Search_refresh');
$this->waitForVisible('crm-group-selector_processing');
- $this->waitForElementPresent("xpath=//table[@id='crm-group-selector']/tbody/tr/td[contains(text(), '{$params['name']}')]");
+ $this->waitForElementPresent("xpath=//table[@id='crm-group-selector']/tbody/tr/td[contains(., '{$params['name']}')]");
$createdBy = $this->getText("xpath=//table[@id='crm-group-selector']/tbody/tr/td[3]/a");
$this->click("xpath=//table[@id='crm-group-selector']/tbody/tr/td[7]/span/a[2]");
$this->waitForElementPresent("xpath=//form[@id='Edit']/div[2]/div/table[2]/tbody/tr/td[2]/select");
$this->select("xpath=//select[@name='crm-group-selector_length']", '100');
$this->waitForVisible('crm-group-selector_processing');
- $this->waitForElementPresent("xpath=//table[@id='crm-group-selector']/tbody//tr/td[contains(text(), '{$params['name']}')]");
- $this->assertTrue($this->isElementPresent("xpath=//table[@id='crm-group-selector']/tbody//tr/td[1][text()='{$params['name']}']/following-sibling::td[2]/a[text()='{$createdBy}']"));
+ $this->waitForElementPresent("xpath=//table[@id='crm-group-selector']/tbody/tr/td[contains(., '{$params['name']}')]");
+ $this->assertTrue($this->isElementPresent("xpath=//table[@id='crm-group-selector']/tbody/tr/td[contains(., '{$params['name']}')]/following-sibling::td[2]/a[text()='{$createdBy}']"));
//check link of the contact who created the group
- $this->click("xpath=//table[@id='crm-group-selector']/tbody//tr/td[1][text()='{$params['name']}']/following-sibling::td[2]/a");
+ $this->click("xpath=//table[@id='crm-group-selector']/tbody//tr/td[1][contains(.,'{$params['name']}')]/following-sibling::td[2]/a");
$this->waitForPageToLoad($this->getTimeoutMsec());
$name = explode(',', $createdBy);
$name1 = isset($name[1]) ? trim($name[1]) : NULL;
//Name of profile
$profileTitle = 'profile_' . substr(sha1(rand()), 0, 7);
$this->type('title', $profileTitle);
+ $this->click('uf_group_type_Profile');
//Drupal user account registration option
$this->click('CIVICRM_QFID_0_8');
$this->click('_qf_Edit_next');
- $this->waitForPageToLoad($this->getTimeoutMsec());
// assert for subscription message
- $this->assertElementContainsText('css=div.messages', "Your subscription request has been submitted for",
- "Subscription message is not shown");
+ $this->isTextPresent("Your subscription request has been submitted for");
//check if profile is saved
- $this->assertElementContainsText('css=span.msg-text', 'Your information has been saved.', 'Profile is not saved');
+ $this->waitForText('crm-notification-container','Your information has been saved.');
// delete the profile
$this->openCiviPage('admin/uf/group', 'reset=1');