<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
parent::setUp();
}
- function testRelationshipAddTest() {
+ public function testRelationshipAddTest() {
$this->webtestLogin();
//create a relationship type between different contact types
//fill in the individual
$this->select2('related_contact_id', $sortName, TRUE);
-
//fill in the relationship start date
$this->webtestFillDate('start_date', '-2 year');
$this->webtestFillDate('end_date', '+1 year');
//save the relationship
//$this->click("_qf_Relationship_upload");
$this->click('_qf_Relationship_upload-bottom');
- $this->waitForElementPresent("crm-contact-relationship-selector-current_wrapper");
//check the status message
$this->waitForText('crm-notification-container', 'Relationship created.');
- $this->waitForElementPresent("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a[text()='View']");
- $this->click("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[9]/span/a[1][text()='View']");
+ $this->click("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[9]/span/a[1][text()='View']");
$this->webtestVerifyTabularData(
array(
//fill in the individual
$this->select2('related_contact_id', $sortName, TRUE);
-
//fill in the relationship start date
$this->webtestFillDate('start_date', '-2 year');
$this->webtestFillDate('end_date', '+1 year');
//save the relationship
$this->click('_qf_Relationship_upload-bottom');
- $this->waitForElementPresent("crm-contact-relationship-selector-current_wrapper");
- $this->waitForElementPresent("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a[text()='View']");
- $this->click("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[9]/span/a[1][text()='View']");
+ $this->click("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[9]/span/a[1][text()='View']");
$this->webtestVerifyTabularData(
array(
//test for individual contact and household subtype contact
//relationship
- $typeb = "Household__". $householdSubtypeName;
+ $typeb = "Household__" . $householdSubtypeName;
//create a relationship type between different contact types
$params = array(
//save the relationship
$this->click('_qf_Relationship_upload-bottom');
- $this->waitForElementPresent("crm-contact-relationship-selector-current_wrapper");
- $this->waitForElementPresent("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a[text()='View']");
- $this->click("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[9]/span/a[1][text()='View']");
+ $this->click("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[9]/span/a[1][text()='View']");
$this->webtestVerifyTabularData(
array(
$this->assertTrue($this->isTextPresent($params['label_b_a']));
}
- function testRelationshipAddNewIndividualTest() {
+ public function testRelationshipAddNewIndividualTest() {
$this->webtestLogin();
//create a relationship type between different contact types
$this->type('organization_name', $orgName);
$this->type('email-Primary', "info@" . $orgName . ".com");
$this->click('_qf_Edit_next');
- $this->waitForText("xpath=//div[@id='s2id_related_contact_id']","$orgName");
+ $this->waitForText("xpath=//div[@id='s2id_related_contact_id']", "$orgName");
//fill in the relationship start date
$this->webtestFillDate('start_date', '-2 year');
//save the relationship
//$this->click("_qf_Relationship_upload");
$this->click("_qf_Relationship_upload-bottom");
- $this->waitForElementPresent("crm-contact-relationship-selector-current_wrapper");
//check the status message
$this->waitForText('crm-notification-container', 'Relationship created.');
- $this->waitForElementPresent("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a[text()='View']");
- $this->click("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//table[@id='DataTables_Table_2']/tbody/tr/td[9]/span/a[1][text()='View']");
+ $this->click("xpath=//table[@id='DataTables_Table_2']/tbody/tr[1]/td[9]/span/a[1][text()='View']");
$this->webtestVerifyTabularData(
array(
$this->assertTrue($this->isTextPresent($params['label_a_b']));
}
- function testAjaxCustomGroupLoad() {
+ public function testAjaxCustomGroupLoad() {
$this->webtestLogin();
//create a New Individual
$triggerElement = array('name' => 'relationship_type_id', 'type' => 'select');
$customSets = array(
array('entity' => 'Relationship', 'subEntity' => 'Partner of', 'triggerElement' => $triggerElement),
- array('entity' => 'Relationship', 'subEntity' => 'Spouse of', 'triggerElement' => $triggerElement)
+ array('entity' => 'Relationship', 'subEntity' => 'Spouse of', 'triggerElement' => $triggerElement),
);
$pageUrl = array('url' => 'contact/view/rel', 'args' => "cid={$contactId[1]}&action=add&reset=1");
$this->customFieldSetLoadOnTheFlyCheck($customSets, $pageUrl);
}
- function testRelationshipAddCurrentEmployerTest() {
+ public function testRelationshipAddCurrentEmployerTest() {
$this->webtestLogin();
//create a New Individual
$this->type('organization_name', $orgName);
$this->type('email-Primary', "info@" . $orgName . ".com");
$this->click('_qf_Edit_next');
- $this->waitForText("xpath=//div[@id='s2id_related_contact_id']","$orgName");
+ $this->waitForText("xpath=//div[@id='s2id_related_contact_id']", "$orgName");
//fill in the relationship start date
$this->webtestFillDate('start_date', '-2 year');
$description = "Current employee test.";
$this->type("description", $description);
-
//save the relationship
//$this->click("_qf_Relationship_upload");
$this->click('_qf_Relationship_upload-bottom');
- $this->waitForElementPresent("crm-contact-relationship-selector-current_wrapper");
//check the status message
$this->waitForText('crm-notification-container', 'Relationship created.');
- $this->waitForElementPresent("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a[text()='View']");
- $this->click("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[9]/span/a[1][text()='View']");
+ $this->click("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[9]/span/a[1][text()='View']");
$this->webtestVerifyTabularData(
array(
'Status' => 'Enabled',
)
);
- $this->assertTrue($this->isTextPresent("Employee of"),"Employee of relationship type not visible on View Relationship page.");
+ $this->assertTrue($this->isTextPresent("Employee of"), "Employee of relationship type not visible on View Relationship page.");
}
}