Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
06a1bc01 | 4 | | CiviCRM version 4.5 | |
6a488035 | 5 | +--------------------------------------------------------------------+ |
06a1bc01 | 6 | | Copyright CiviCRM LLC (c) 2004-2014 | |
6a488035 TO |
7 | +--------------------------------------------------------------------+ |
8 | | This file is a part of CiviCRM. | | |
9 | | | | |
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. | | |
13 | | | | |
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. | | |
18 | | | | |
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 | +--------------------------------------------------------------------+ | |
25 | */ | |
26 | ||
6a488035 | 27 | require_once 'CiviTest/CiviSeleniumTestCase.php'; |
e9479dcf EM |
28 | |
29 | /** | |
30 | * Class WebTest_Contact_AddContactsToEventAdvancedSearchTest | |
31 | */ | |
6a488035 TO |
32 | class WebTest_Contact_AddContactsToEventAdvancedSearchTest extends CiviSeleniumTestCase { |
33 | ||
34 | protected function setUp() { | |
35 | parent::setUp(); | |
36 | } | |
37 | ||
38 | function testAddContactsToEventAdvanceSearch() { | |
6a488035 TO |
39 | $this->webtestLogin(); |
40 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
41 | ||
6a488035 | 42 | // Advanced Search |
79d6583c | 43 | $this->openCiviPage('contact/search/advanced', 'reset=1', '_qf_Advanced_refresh'); |
6a488035 TO |
44 | $this->click('_qf_Advanced_refresh'); |
45 | ||
46 | $this->waitForElementPresent('CIVICRM_QFID_ts_all_8'); | |
47 | $this->click('CIVICRM_QFID_ts_all_8'); | |
48 | ||
49 | $this->select('task', "label=Add Contacts to Event"); | |
50 | $this->click('Go'); | |
51 | ||
52 | // Select event. Based on label for now. | |
53 | $this->waitForElementPresent('event_id'); | |
b5e4fcd9 | 54 | $this->select2('event_id', "Rain-forest Cup Youth Soccer Tournament"); |
6a488035 TO |
55 | |
56 | // Select role | |
1d4d99e9 | 57 | $this->multiselect2('role_id', array('Volunteer')); |
6a488035 TO |
58 | |
59 | // Select participant status | |
60 | $this->select('status_id', 'value=1'); | |
61 | ||
62 | // Setting registration source | |
63 | $this->type('source', 'Event StandaloneAddTest Webtest'); | |
64 | ||
79d6583c | 65 | $this->assertElementContainsText('css=tr.crm-participant-form-block-source span.description', 'Source for this registration (if applicable).'); |
6a488035 | 66 | |
6a488035 TO |
67 | // Clicking save. |
68 | $this->click('_qf_Participant_upload-bottom'); | |
69 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
70 | } | |
71 | } | |
72 |