3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2015 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License along with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
27 require_once 'CiviTest/CiviSeleniumTestCase.php';
30 * Class WebTest_Contact_AddContactsToEventAdvancedSearchTest
32 class WebTest_Contact_AddContactsToEventAdvancedSearchTest
extends CiviSeleniumTestCase
{
34 protected function setUp() {
38 public function testAddContactsToEventAdvanceSearch() {
39 $this->webtestLogin();
40 $this->waitForPageToLoad($this->getTimeoutMsec());
43 $this->openCiviPage('contact/search/advanced', 'reset=1', '_qf_Advanced_refresh');
44 $this->click('_qf_Advanced_refresh');
46 $this->waitForElementPresent("xpath=//div[@id='search-status']/table/tbody/tr[2]/td[2]/input[1]");
47 $this->click("xpath=//div[@id='search-status']/table/tbody/tr[2]/td[2]/input[1]");
49 $this->select('task', "label=Add Contacts to Event");
51 // Select event. Based on label for now.
52 $this->waitForElementPresent('event_id');
53 $this->select2('event_id', "Rain-forest Cup Youth Soccer Tournament");
56 $this->multiselect2('role_id', array('Volunteer'));
58 // Select participant status
59 $this->select('status_id', 'value=1');
61 // Setting registration source
62 $this->type('source', 'Event StandaloneAddTest Webtest');
64 $this->assertElementContainsText('css=tr.crm-participant-form-block-source span.description', 'Source for this registration (if applicable).');
67 $this->click('_qf_Participant_upload-bottom');
68 $this->waitForPageToLoad($this->getTimeoutMsec());