projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #4749 from atif-shaikh/CRM-15729
[civicrm-core.git]
/
tests
/
phpunit
/
WebTest
/
Member
/
UpdateMembershipScriptTest.php
diff --git
a/tests/phpunit/WebTest/Member/UpdateMembershipScriptTest.php
b/tests/phpunit/WebTest/Member/UpdateMembershipScriptTest.php
index ff50a9723a6944c1431b6ac230d8cbc33fe1bc96..c901b37efd1764f32ae62abcb94f9d23ed4c64d2 100644
(file)
--- a/
tests/phpunit/WebTest/Member/UpdateMembershipScriptTest.php
+++ b/
tests/phpunit/WebTest/Member/UpdateMembershipScriptTest.php
@@
-1,9
+1,9
@@
<?php
/*
+--------------------------------------------------------------------+
<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.
3
|
+ | CiviCRM version 4.
5
|
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
3
|
+ | Copyright CiviCRM LLC (c) 2004-201
4
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-25,6
+25,10
@@
*/
require_once 'CiviTest/CiviSeleniumTestCase.php';
*/
require_once 'CiviTest/CiviSeleniumTestCase.php';
+
+/**
+ * Class WebTest_Member_UpdateMembershipScriptTest
+ */
class WebTest_Member_UpdateMembershipScriptTest extends CiviSeleniumTestCase {
protected function setUp() {
class WebTest_Member_UpdateMembershipScriptTest extends CiviSeleniumTestCase {
protected function setUp() {
@@
-60,7
+64,6
@@
class WebTest_Member_UpdateMembershipScriptTest extends CiviSeleniumTestCase {
// Clicking save.
$this->click('_qf_Membership_upload');
// Clicking save.
$this->click('_qf_Membership_upload');
- $this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct?
$this->waitForText('crm-notification-container', "{$memTypeParams['membership_type']} membership for $firstName Anderson has been added.");
// Is status message correct?
$this->waitForText('crm-notification-container', "{$memTypeParams['membership_type']} membership for $firstName Anderson has been added.");
@@
-81,6
+84,9
@@
class WebTest_Member_UpdateMembershipScriptTest extends CiviSeleniumTestCase {
);
}
);
}
+ /**
+ * @return array
+ */
function addMembershipType() {
$membershipTitle = substr(sha1(rand()), 0, 7);
$membershipOrg = $membershipTitle . ' memorg';
function addMembershipType() {
$membershipTitle = substr(sha1(rand()), 0, 7);
$membershipOrg = $membershipTitle . ' memorg';
@@
-101,10
+107,7
@@
class WebTest_Member_UpdateMembershipScriptTest extends CiviSeleniumTestCase {
// New membership type
$this->type('name', $memTypeParams['membership_type']);
// 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');
// Membership fees
$this->type('minimum_fee', '100');
@@
-115,7
+118,7
@@
class WebTest_Member_UpdateMembershipScriptTest extends CiviSeleniumTestCase {
$this->select('duration_unit', "label=year");
// Membership period type
$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('relationship_type_id', "value={$memTypeParams['relationship_type']}");
// Clicking save