$this->select("other_activity", "label=Meeting");
$this->waitForElementPresent("_qf_Activity_upload-bottom");
+ $this->waitForElementPresent("s2id_target_contact_id");
$this->assertTrue($this->isTextPresent("Anderson, " . $firstName2), "Contact not found in line " . __LINE__);
// Typing contact's name into the field (using typeKeys(), not type()!)...
- $this->click("css=tr.crm-activity-form-block-assignee_contact_id input#token-input-assignee_contact_id");
- $this->type("css=tr.crm-activity-form-block-assignee_contact_id input#token-input-assignee_contact_id", $firstName1);
- $this->typeKeys("css=tr.crm-activity-form-block-assignee_contact_id input#token-input-assignee_contact_id", $firstName1);
-
- // ...waiting for drop down with results to show up...
- $this->waitForElementPresent("css=div.token-input-dropdown-facebook");
- $this->waitForElementPresent("css=li.token-input-input-token-facebook");
-
- //.need to use mouseDown on first result (which is a li element), click does not work
- // Note that if you are using firebug this appears at the bottom of the html source, before the closing </body> tag, not where the <li> referred to above is, which is a different <li>.
- $this->waitForElementPresent("css=div.token-input-dropdown-facebook li");
- $this->mouseDown("css=div.token-input-dropdown-facebook li");
-
- // ...again, waiting for the box with contact name to show up...
- $this->waitForElementPresent("css=tr.crm-activity-form-block-assignee_contact_id td ul li span.token-input-delete-token-facebook");
+ $this->select2("assignee_contact_id", $firstName1, TRUE);
// ...and verifying if the page contains properly formatted display name for chosen contact.
$this->assertTrue($this->isTextPresent("Summerson, " . $firstName1), "Contact not found in line " . __LINE__);
// Clicking save.
$this->click("_qf_Activity_upload-bottom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->waitForElementPresent("xpath=//div[@id='crm-notification-container']");
// Is status message correct?
- $this->assertTrue($this->isTextPresent("Activity '$subject' has been saved."), "Status message didn't show up after saving!");
+ $this->waitForText('crm-notification-container', "Activity '$subject' has been saved.");
- $this->waitForElementPresent("xpath=//div[@id='Activities']//table/tbody/tr[2]/td[8]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//div[@id='contact-activity-selector-activity_wrapper']//table/tbody/tr[2]/td[8]/span/a[text()='View']");
// click through to the Activity view screen
- $this->click("xpath=//div[@id='Activities']//table/tbody/tr[2]/td[8]/span/a[text()='View']");
+ $this->click("xpath=//div[@id='contact-activity-selector-activity_wrapper']//table/tbody/tr[2]/td[8]/span/a[text()='View']");
$this->waitForElementPresent('_qf_Activity_cancel-bottom');
// parse URL to grab the activity id
$this->select2('event_id', "Rain-forest Cup Youth Soccer Tournament");
// Select role
- $this->click('role_id[2]');
+ //$this->click('role_id[2]');
+ $this->select('role_id', "value=2");
// Choose Registration Date.
// Using helper webtestFillDate function.
$this->webtestVerifyTabularData(
array(
'Event' => 'Rain-forest Cup Youth Soccer Tournament',
- 'Participant Role' => 'Attendee',
+ 'Participant Role' => 'Volunteer',
'Status' => 'Partially paid',
'Event Source' => 'Event Partially Paid Webtest',
)
$this->assertElementPresent("xpath=id('Search')/table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span[2]/ul/li[2]/a[text()='Record Payment']");
$this->click("xpath=id('Search')/table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='View']");
$this->waitForElementPresent("xpath=id('ParticipantView')");
+ //$this->assertElementPresent("xpath=id('ParticipantView')//td[@id='payment-info']//a/span[contains(text(), 'Record Payment')]");
$this->assertElementPresent("xpath=id('ParticipantView')//td[@id='payment-info']/a/span[contains(text(), 'Record Payment')]");
$this->click("xpath=id('ParticipantView')//div[@class='action-link']/div/a/span[contains(text(), 'Edit')]");
$this->waitForElementPresent("xpath=id('Participant')");
- $this->assertElementPresent("xpath=id('Participant')//td[@id='payment-info']/a/span[contains(text(), 'Record Payment')]");
+ $this->assertElementPresent("xpath=id('Participant')//td[@id='payment-info']//a/span[contains(text(), 'Record Payment')]");
$location = $this->getAttribute("xpath=id('Participant')//td[@id='payment-info']/a/span[contains(text(), 'Record Payment')]/../@href");
$this->open($location);
$this->assertElementContainsText("xpath=id('AdditionalPayment')/h3", 'New Event Payment');
// input data
- $this->select('financial_type_id', 'label=Donation');
+ //$this->select('financial_type_id', 'label=Donation');
// verify balance
- $text = $this->getText("xpath=id('AdditionalPayment')/div[2]/table/tbody/tr[4]/td[2]");
+ $text = $this->getText("xpath=id('AdditionalPayment')/div[2]//table/tbody/tr[3]/td[2]");
$this->assertTrue((bool)preg_match("/{$balance}/", $text));
// check form rule error
$this->webtestVerifyTabularData(
array(
'Event' => 'Rain-forest Cup Youth Soccer Tournament',
- 'Participant Role' => 'Attendee',
+ 'Participant Role' => 'Volunteer',
'Status' => 'Registered',
'Event Source' => 'Event Partially Paid Webtest',
)
$this->_checkPaymentInfoTable(800.00, 800.00);
// check for not apprence of record payment button
- $this->assertFalse($this->isElementPresent("xpath=id('ParticipantView')//td[@id='payment-info']/a/span[contains(text(), 'Record Payment')]"));
+ $this->assertFalse($this->isElementPresent("xpath=id('ParticipantView')//td[@id='payment-info']//a/span[contains(text(), 'Record Payment')]"));
$this->click("xpath=id('ParticipantView')/div[2]/table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='View']");
$this->waitForElementPresent('_qf_ContributionView_cancel-bottom');
$this->assertElementContainsText("xpath=//td[@id='payment-info']/table[@id='info']/tbody/tr[2]/td", "$ {$feeAmt}", 'Missing text: appropriate fee amount');
$this->assertElementContainsText("xpath=//td[@id='payment-info']/table[@id='info']/tbody/tr[2]/td[2]", "$ {$amtPaid}", 'Missing text: appropriate fee amount');
}
-}
\ No newline at end of file
+}
$this->waitForElementPresent("css=li#widget-2 a.fullscreen-icon");
$this->click("css=li#widget-2 a.fullscreen-icon");
$this->waitForElementPresent("ui-id-1");
- $this->assertTrue($this->isTextPresent($widgetTitle));
+ $this->waitForTextPresent("$widgetTitle");
// 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(5);
- $this->click("link=close");
+ $this->click("xpath=//*[@class='ui-button-text'][contains(text(), 'close')]");
}
function _testRemoveDashboardElement($widgetConfigureID, $widgetEnabledSelector) {