<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
*/
-
require_once 'WebTest/Import/ImportCiviSeleniumTestCase.php';
class WebTest_Import_ParticipantTest extends ImportCiviSeleniumTestCase {
* Test participant import for Individuals.
*/
function testParticipantImportIndividual() {
- // This is the path where our testing install resides.
- // The rest of URL is defined in CiviSeleniumTestCase base class, in
- // class attributes.
- $this->open($this->sboxPath);
-
// Log in using webtestLogin() method
$this->webtestLogin();
// Get sample import data.
list($headers, $rows) = $this->_participantIndividualCSVData();
-
+
// Create and import csv from provided data and check imported data.
$fieldMapper = array(
'mapper[0][0]' => 'email',
* Test participant import for Organizations.
*/
function testParticipantImportOrganization() {
- // This is the path where our testing install resides.
- // The rest of URL is defined in CiviSeleniumTestCase base class, in
- // class attributes.
- $this->open($this->sboxPath);
-
// Log in using webtestLogin() method
$this->webtestLogin();
* Test participant import for Households.
*/
function testParticipantImportHousehold() {
- // This is the path where our testing install resides.
- // The rest of URL is defined in CiviSeleniumTestCase base class, in
- // class attributes.
- $this->open($this->sboxPath);
-
// Log in using webtestLogin() method
$this->webtestLogin();
$this->openCiviPage('event/add', 'reset=1&action=add', '_qf_EventInfo_upload-bottom');
- // Let's start filling the form with values.
$this->select("event_type_id", "value={$params['event_type_id']}");
// Attendee role s/b selected now.
// verify event input on info page
// start at Manage Events listing
$this->openCiviPage('event/manage', 'reset=1');
- $this->click("link=" . $params['title']);
-
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("link=" . $params['title'], NULL);
- $matches = array();
- preg_match('/id=([0-9]+)/', $this->getLocation(), $matches);
- $params['event_id'] = $matches[1];
+ $params['event_id'] = $this->urlArg('id');;
return $params;
}