Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-- webtests cleanup #19

Merged
merged 1 commit into from
Mar 4, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions tests/phpunit/WebTest/Event/EventListingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ function testEventListing() {

//go to manage event and check for presence of ongoing and
//upcomming events
$this->open($this->sboxPath . "civicrm/event/manage?reset=1");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->openCiviPage("event/manage", "reset=1");
$this->type("xpath=//div[@class='crm-block crm-form-block crm-event-searchevent-form-block']/table/tbody/tr/td/input",$eventTitle1);
$this->click("_qf_SearchEvent_refresh");
$this->waitForPageToLoad($this->getTimeoutMsec());
Expand Down Expand Up @@ -76,8 +75,7 @@ function testEventListing() {
$this->assertFalse($this->isTextPresent("{$eventTitle5}"));

//go to ical and check for presence of ongoing and upcomming events
$this->open($this->sboxPath . "civicrm/event/ical?reset=1&page=1&html=1");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->openCiviPage("event/ical", "reset=1&page=1&html=1");
$this->assertFalse($this->isTextPresent("{$eventTitle1}"));
$this->assertFalse($this->isTextPresent("{$eventTitle2}"));
$this->assertTrue($this->isTextPresent("{$eventTitle3}"));
Expand All @@ -86,8 +84,7 @@ function testEventListing() {

//go to block listing to enable Upcomming Events Block
// you need to be admin user for below operation
$this->open($this->sboxPath . "civicrm/logout?reset=1");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->openCiviPage("logout", "reset=1");
$this->webtestLogin(TRUE);

$this->open($this->sboxPath . 'admin/structure/block/manage/civicrm/6/configure');
Expand All @@ -102,7 +99,7 @@ function testEventListing() {
$this->waitForTextPresent("The block settings have been updated.");

//go to civicrm home and check for presence of upcomming events
$this->open($this->sboxPath . "civicrm/dashboard?reset=1");
$this->openCiviPage("dashboard", "reset=1");
$this->assertFalse($this->isTextPresent("{$eventTitle1}"));
$this->assertFalse($this->isTextPresent("{$eventTitle2}"));
$this->assertFalse($this->isTextPresent("{$eventTitle3}"));
Expand All @@ -119,7 +116,7 @@ function testEventListing() {

function _testCreateEvent($eventTitle, $startdate, $enddate) {
// Go directly to the URL of the screen that you will be testing (New Event).
$this->open($this->sboxPath . "civicrm/event/add?reset=1&action=add");
$this->openCiviPage("event/add", "reset=1&action=add");

// $eventTitle = 'My Conference - '.substr(sha1(rand()), 0, 7);
$eventDescription = "Here is a description for this conference.";
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/WebTest/Export/ContactTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ function testContactExport() {

// Visit contact search page.
$this->openCiviPage("contact/search", "reset=1");
$this->waitForPageToLoad($this->getTimeoutMsec());

// Select contact type as Indiividual.
$this->select("contact_type", "value=Individual");
Expand Down
3 changes: 1 addition & 2 deletions tests/phpunit/WebTest/Mailing/SpoolTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ function testSpooledMailing() {
$this->assertNotEmpty( $cid, 'Could not find cid after adding contact' );

// Send an email to the added contact
$this->open( $this->sboxPath . 'civicrm/activity/email/add?action=add&reset=1&cid=' . $cid . '&selectedChild=activity&atype=3' );
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->openCiviPage("activity/email/add", "action=add&reset=1&cid={$cid}&selectedChild=activity&atype=3");
$this->type( 'subject', 'test spool' );
$this->fillRichTextField( 'html_message', 'Unit tests keep children safe.' );
$this->click( "_qf_Email_upload" );
Expand Down