Permalink
Browse files

Change echo statements to jEcho for selective logging

  • Loading branch information...
1 parent ff339c2 commit f1f1c5c382a1fc5849c8f59bee66eacd26348006 @dextercowley dextercowley committed Nov 10, 2012
Showing with 710 additions and 699 deletions.
  1. +3 −0 tests/CHANGELOG
  2. +72 −64 tests/system/SeleniumJoomlaTestCase.php
  3. +6 −6 tests/system/suite/acl/acl0001Test.php
  4. +5 −5 tests/system/suite/acl/acl0003Test.php
  5. +4 −4 tests/system/suite/acl/acl0004Test.php
  6. +4 −4 tests/system/suite/acl/acl0005Test.php
  7. +17 −17 tests/system/suite/acl/acl0006Test.php
  8. +17 −17 tests/system/suite/articles/article0001Test.php
  9. +15 −15 tests/system/suite/articles/article0002Test.php
  10. +90 −90 tests/system/suite/articles/article0003Test.php
  11. +31 −31 tests/system/suite/articles/article0004Test.php
  12. +12 −12 tests/system/suite/articles/featured0001Test.php
  13. +11 −11 tests/system/suite/articles/featured0002Test.php
  14. +65 −65 tests/system/suite/cache/cache0001Test.php
  15. +2 −2 tests/system/suite/com_users/group0001Test.php
  16. +4 −4 tests/system/suite/com_users/group0003Test.php
  17. +9 −9 tests/system/suite/com_users/user0001Test.php
  18. +9 −9 tests/system/suite/com_users/user0002Test.php
  19. +10 −10 tests/system/suite/control_panel/control_panel0001Test.php
  20. +33 −33 tests/system/suite/control_panel/control_panel0002Test.php
  21. +14 −14 tests/system/suite/control_panel/control_panel0003Test.php
  22. +63 −63 tests/system/suite/control_panel/control_panel0004Test.php
  23. +9 −9 tests/system/suite/control_panel/control_panel0005Test.php
  24. +11 −11 tests/system/suite/doInstall.php
  25. +93 −93 tests/system/suite/language/language0001Test.php
  26. +11 −11 tests/system/suite/language/language0002Test.php
  27. +24 −24 tests/system/suite/menus/menu0001Test.php
  28. +19 −19 tests/system/suite/menus/menu0002Test.php
  29. +10 −10 tests/system/suite/modules/module0001Test.php
  30. +5 −5 tests/system/suite/modules/module0002Test.php
  31. +11 −11 tests/system/suite/redirect/redirect0001Test.php
  32. +16 −16 tests/system/suite/sample_data/sample_data0001Test.php
  33. +5 −5 tests/system/suite/security/security0001Test.php
View
@@ -26,6 +26,9 @@ $ -> Language fix or change
- -> Removed
! -> Note
+09-Nov-2012 Mark Dexter
+ ^ Change echo statements to jEcho for selective logging
+
05-Nov-2012 Mark Dexter
# Fix failing system tests (from HTML output changes)
^ Remove some asserts from try/catch blocks (makes it easier to trace failures)

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -14,7 +14,7 @@ function testAclGroupCreation()
$this->setUp();
$this->gotoAdmin();
$this->doAdminLogin();
- echo "Check starting condition as Super Admin user\n";
+ $this->jPrint ("Check starting condition as Super Admin user\n");
$this->assertTrue($this->isElementPresent("//ul[@id='menu-com-users-users']"), 'User manager should be visible');
@@ -46,14 +46,14 @@ function testAclGroupCreation()
$this->createGroup($groupName, $groupParent);
$levelName = 'Special';
$this->changeAccessLevel($levelName,$groupName);
- echo "Change " . $groupName . " article permissions.\n";
- echo "Grant allow for all actions in article manager\n";
+ $this->jPrint ("Change " . $groupName . " article permissions.\n");
+ $this->jPrint ("Grant allow for all actions in article manager\n");
$actions = array('Configure', 'Access Component', 'Create', 'Delete', 'Edit', 'Edit State');
$permissions = array('Allowed', 'Allowed', 'Allowed', 'Allowed', 'Allowed', 'Allowed');
$this->setPermissions('Article Manager', $groupName, $actions, $permissions);
sleep(3); // Needed for google chrome
- echo "Allow " . $groupName . " back end access, deny admin access\n";
+ $this->jPrint ("Allow " . $groupName . " back end access, deny admin access\n");
$actions = array('Site Login', 'Admin Login', 'Configure', 'Access Component', 'Create', 'Delete', 'Edit', 'Edit State');
$permissions = array('Inherited', 'Allowed', 'Denied', 'Inherited', 'Inherited', 'Inherited', 'Inherited', 'Inherited');
$this->setPermissions('Global Configuration', $groupName, $actions, $permissions);
@@ -67,9 +67,9 @@ function testAclGroupCreation()
$this->doAdminLogout();
sleep(3);
- echo("Log in to back end as " . $username . ".\n");
+ $this->jPrint("Log in to back end as " . $username . ".\n");
$this->doAdminLogin($login, 'password');
- echo("Testing " . $username . " access.\n");
+ $this->jPrint("Testing " . $username . " access.\n");
$this->assertFalse($this->isElementPresent("//ul[@id='menu-com-users-users']"), 'Users menu should not be visible');
$this->assertFalse($this->isElementPresent("//ul[@id='menu-com-users-groups']"), 'Groups should not be visible');
@@ -27,7 +27,7 @@ function testRestrictedGroupAccess()
$group = $groupName;
$this->createUser($username, $login, 'password', $email, $group);
- echo "Set Weblinks access permissions for ". $groupName.".\n";
+ $this->jPrint ("Set Weblinks access permissions for ". $groupName.".\n");
$this->click("link=Control Panel");
$this->waitForPageToLoad("30000");
$component = 'Weblinks';
@@ -37,12 +37,12 @@ function testRestrictedGroupAccess()
$this->doAdminLogout();
//Test access for Test User beloning to Restricted Manager Group
- echo "Testng access of ". $login.".\n";
+ $this->jPrint ("Testng access of ". $login.".\n");
$this->gotoAdmin();
- echo "Log in as ". $login.".\n";
+ $this->jPrint ("Log in as ". $login.".\n");
$this->doAdminLogin($login, 'password');
$this->jClick('Weblinks');
- echo "Check that user cannot edit, publish, unpublish, or trash weblinks.\n";
+ $this->jPrint ("Check that user cannot edit, publish, unpublish, or trash weblinks.\n");
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-edit']/button"));
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-publish']/button"));
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-unpublish']/button"));
@@ -56,7 +56,7 @@ function testRestrictedGroupAccess()
$this->deleteGroup($groupName);
$this->doAdminLogout();
$this->deleteAllVisibleCookies();
- echo "Finished acl0003Test\n";
+ $this->jPrint ("Finished acl0003Test\n");
}
}
@@ -27,13 +27,13 @@ function testSiteLoginPermissions()
$login = 'acltestuser' . $salt;
$email = $login . '@test.com';
$group = 'Public';
- echo "Create $username and add to $group group.\n";
+ $this->jPrint ("Create $username and add to $group group.\n");
$this->createUser($username, $login, $password, $email, $group);
- echo "Removing $username from Registered group.\n";
+ $this->jPrint ("Removing $username from Registered group.\n");
$this->changeAssignedGroup($username,$group="Registered");
- echo "Setting all roles to inherit for $username.\n";
+ $this->jPrint ("Setting all roles to inherit for $username.\n");
$actions = array('Site Login', 'Admin Login', 'Configure', 'Access Component', 'Create', 'Delete', 'Edit', 'Edit State');
$permissions = array('Inherited', 'Inherited', 'Inherited', 'Inherited', 'Inherited', 'Inherited', 'Inherited', 'Inherited');
$this->setPermissions('Global Configuration', $group, $actions, $permissions);
@@ -160,7 +160,7 @@ function testSiteLoginPermissions()
$this->setPermissions('Global Configuration', $group, $action, $permission);
$this->gotoSite();
- echo "Logging in to front end.\n";
+ $this->jPrint ("Logging in to front end.\n");
$this->doFrontEndLogin($login,$password);
try {
$this->assertTrue($this->isElementPresent("//form[@id='login-form'][contains(., '$username')]"));
@@ -27,13 +27,13 @@ function testAdminLoginPermissions()
$login = 'acltestuser' . $salt;
$email = $login . '@test.com';
$group = 'Public';
- echo "Create $username and add to $group group.\n";
+ $this->jPrint ("Create $username and add to $group group.\n");
$this->createUser($username, $login, $password, $email, $group);
- echo "Removing $username from Registered group.\n";
+ $this->jPrint ("Removing $username from Registered group.\n");
$this->changeAssignedGroup($username,$group="Registered");
- echo "Setting all roles to inherit.\n";
+ $this->jPrint ("Setting all roles to inherit.\n");
$actions = array('Site Login', 'Admin Login', 'Configure', 'Access Component', 'Create', 'Delete', 'Edit', 'Edit State');
$permissions = array('Inherited', 'Inherited', 'Inherited', 'Inherited', 'Inherited', 'Inherited', 'Inherited', 'Inherited');
$this->setPermissions('Global Configuration', $group, $actions, $permissions);
@@ -167,7 +167,7 @@ function testAdminLoginPermissions()
$this->setPermissions('Global Configuration', $group, $action, $permission);
$this->doAdminLogout();
- echo "Logging in to front end.\n";
+ $this->jPrint ("Logging in to front end.\n");
$this->doAdminLogin($login,$password);
$this->doAdminLogin($login,$password);
try {
@@ -34,16 +34,16 @@ function testManagePermissions()
$group = $groupName;
$this->createUser($username, $login, 'password', $email, $group);
- echo "Set global permissions for ". $groupName." to allowed\n";
+ $this->jPrint ("Set global permissions for ". $groupName." to allowed\n");
$actions = array('Site Login', 'Admin Login', 'Configure', 'Access Component', 'Create', 'Delete', 'Edit', 'Edit State', 'Edit Own');
$permissions = array('Inherited', 'Allowed', 'Denied', 'Allowed', 'Allowed', 'Allowed', 'Allowed', 'Allowed', 'Allowed');
$this->setPermissions('Global Configuration', $group, $actions, $permissions);
$this->doAdminLogout();
$this->doAdminLogin($login, 'password');
- echo "Testng access of ". $login.".\n";
+ $this->jPrint ("Testng access of ". $login.".\n");
- echo "Testng Banners access of ". $login.".\n";
+ $this->jPrint ("Testng Banners access of ". $login.".\n");
$this->click("link=Banners");
$this->waitForPageToLoad("30000");
$this->assertTrue($this->isElementPresent("//div[@id='toolbar-new']"));
@@ -55,7 +55,7 @@ function testManagePermissions()
$this->assertTrue($this->isElementPresent("//div[@id='toolbar-trash']"));
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-options']"));
- echo "Testng Contacts access of ". $login.".\n";
+ $this->jPrint ("Testng Contacts access of ". $login.".\n");
$this->click("link=Control Panel");
$this->waitForPageToLoad("30000");
$this->click("link=Contacts");
@@ -69,7 +69,7 @@ function testManagePermissions()
$this->assertTrue($this->isElementPresent("//div[@id='toolbar-trash']"));
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-options']"));
- echo "Testng Messaging access of ". $login.".\n";
+ $this->jPrint ("Testng Messaging access of ". $login.".\n");
$this->click("link=Control Panel");
$this->waitForPageToLoad("30000");
$this->click("link=Messaging");
@@ -81,7 +81,7 @@ function testManagePermissions()
$this->assertTrue($this->isElementPresent("//div[@id='toolbar-config']"));
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-options']"));
- echo "Testng Newsfeeds access of ". $login.".\n";
+ $this->jPrint ("Testng Newsfeeds access of ". $login.".\n");
$this->click("link=Control Panel");
$this->waitForPageToLoad("30000");
$this->click("link=Newsfeeds");
@@ -95,7 +95,7 @@ function testManagePermissions()
$this->assertTrue($this->isElementPresent("//div[@id='toolbar-batch']"));
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-options']"));
- echo "Testng Redirect access of ". $login.".\n";
+ $this->jPrint ("Testng Redirect access of ". $login.".\n");
$this->click("link=Control Panel");
$this->waitForPageToLoad("30000");
$this->click("link=Redirect");
@@ -108,7 +108,7 @@ function testManagePermissions()
$this->assertTrue($this->isElementPresent("//div[@id='toolbar-trash']"));
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-options']"));
- echo "Testng weblinks access of ". $login.".\n";
+ $this->jPrint ("Testng weblinks access of ". $login.".\n");
$this->click("link=Control Panel");
$this->waitForPageToLoad("30000");
$this->jClick('Weblinks');
@@ -125,16 +125,16 @@ function testManagePermissions()
$this->doAdminLogout();
$this->doAdminLogin();
- echo "Set global permissions for ". $groupName.".\n";
+ $this->jPrint ("Set global permissions for ". $groupName.".\n");
$actions = array('Site Login', 'Admin Login', 'Configure', 'Access Component', 'Create', 'Delete', 'Edit', 'Edit State', 'Edit Own');
$permissions = array('Inherited', 'Allowed', 'Denied', 'Allowed', 'Denied', 'Denied', 'Denied', 'Denied', 'Denied');
$this->setPermissions('Global Configuration', $group, $actions, $permissions);
$this->doAdminLogout();
$this->doAdminLogin($login, 'password');
- echo "Testng access of ". $login.".\n";
+ $this->jPrint ("Testng access of ". $login.".\n");
- echo "Testng Banners access of ". $login.".\n";
+ $this->jPrint ("Testng Banners access of ". $login.".\n");
$this->click("link=Banners");
$this->waitForPageToLoad("30000");
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-new']"));
@@ -146,7 +146,7 @@ function testManagePermissions()
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-trash']"));
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-options']"));
- echo "Testng Contacts access of ". $login.".\n";
+ $this->jPrint ("Testng Contacts access of ". $login.".\n");
$this->click("link=Control Panel");
$this->waitForPageToLoad("30000");
$this->click("link=Contacts");
@@ -160,7 +160,7 @@ function testManagePermissions()
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-trash']"));
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-options']"));
- echo "Testng Messaging access of ". $login.".\n";
+ $this->jPrint ("Testng Messaging access of ". $login.".\n");
$this->click("link=Control Panel");
$this->waitForPageToLoad("30000");
$this->click("link=Messaging");
@@ -172,7 +172,7 @@ function testManagePermissions()
$this->assertTrue($this->isElementPresent("//div[@id='toolbar-config']"));
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-options']"));
- echo "Testng Newsfeeds access of ". $login.".\n";
+ $this->jPrint ("Testng Newsfeeds access of ". $login.".\n");
$this->click("link=Control Panel");
$this->waitForPageToLoad("30000");
$this->click("link=Newsfeeds");
@@ -185,7 +185,7 @@ function testManagePermissions()
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-trash']"));
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-options']"));
- echo "Testng Redirect access of ". $login.".\n";
+ $this->jPrint ("Testng Redirect access of ". $login.".\n");
$this->click("link=Control Panel");
$this->waitForPageToLoad("30000");
$this->click("link=Redirect");
@@ -198,7 +198,7 @@ function testManagePermissions()
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-trash']"));
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-options']"));
- echo "Testng weblinks access of ". $login.".\n";
+ $this->jPrint ("Testng weblinks access of ". $login.".\n");
$this->click("link=Control Panel");
$this->waitForPageToLoad("30000");
$this->jClick('Weblinks');
@@ -212,7 +212,7 @@ function testManagePermissions()
$this->assertFalse($this->isElementPresent("//div[@id='toolbar-options']"));
$this->gotoAdmin();
- echo "Log back in as admin and delete user and group\n";
+ $this->jPrint ("Log back in as admin and delete user and group\n");
$this->doAdminLogout();
$this->doAdminLogin();
@@ -16,15 +16,15 @@ class Article0001 extends SeleniumJoomlaTestCase
function testUnpublishArticle()
{
$this->setUp();
- echo "Starting testUnpublishArticle.\n";
+ $this->jPrint ("Starting testUnpublishArticle.\n");
$this->gotoAdmin();
$this->doAdminLogin();
- echo "Go to front end and check that Professionals is shown" . "\n";
+ $this->jPrint ("Go to front end and check that Professionals is shown" . "\n");
$this->gotoSite();
$this->assertTrue($this->isTextPresent("Professionals"));
- echo "Go to back end and unpublish" . "\n";
+ $this->jPrint ("Go to back end and unpublish" . "\n");
$this->gotoAdmin();
$this->click("link=Article Manager");
$this->waitForPageToLoad("30000");
@@ -36,11 +36,11 @@ function testUnpublishArticle()
$this->click("//div[@id='toolbar-unpublish']/button");
$this->waitForPageToLoad("30000");
- echo "Go to front end and check that Professionals is not shown" . "\n";
+ $this->jPrint ("Go to front end and check that Professionals is not shown" . "\n");
$this->gotoSite();
$this->assertFalse($this->isTextPresent("Professionals"));
- echo "Go to back end and publish Professionals" . "\n";
+ $this->jPrint ("Go to back end and publish Professionals" . "\n");
$this->gotoAdmin();
$this->click("link=Article Manager");
$this->waitForPageToLoad("30000");
@@ -62,11 +62,11 @@ function testUnpublishArticle()
function testPublishArticle()
{
$this->setUp();
- echo "Starting testPublishArticle.\n";
+ $this->jPrint ("Starting testPublishArticle.\n");
$this->gotoAdmin();
$this->doAdminLogin();
- echo "Go to back end and unpublish Professionals" . "\n";
+ $this->jPrint ("Go to back end and unpublish Professionals" . "\n");
$this->gotoAdmin();
$this->click("link=Article Manager");
$this->waitForPageToLoad("30000");
@@ -79,11 +79,11 @@ function testPublishArticle()
$this->click("//div[@id='toolbar-unpublish']/button");
$this->waitForPageToLoad("30000");
- echo "Go to front end and check that Professionals is not shown" . "\n";
+ $this->jPrint ("Go to front end and check that Professionals is not shown" . "\n");
$this->gotoSite();
$this->assertFalse($this->isTextPresent("Professionals"));
- echo "Go to back end and publish Professionals" . "\n";
+ $this->jPrint ("Go to back end and publish Professionals" . "\n");
$this->gotoAdmin();
$this->click("link=Article Manager");
$this->waitForPageToLoad("30000");
@@ -96,7 +96,7 @@ function testPublishArticle()
$this->click("//div[@id='toolbar-publish']/button");
$this->waitForPageToLoad("30000");
- echo "Go to front end and check that Professionals is shown" . "\n";
+ $this->jPrint ("Go to front end and check that Professionals is shown" . "\n");
$this->gotoSite();
$this->assertTrue($this->isTextPresent("Professionals"));
$this->gotoAdmin();
@@ -106,29 +106,29 @@ function testPublishArticle()
function testEditPermission()
{
- echo "Starting testEditPermission" . "\n";
- echo "Go to front end and login as admin" . "\n";
+ $this->jPrint ("Starting testEditPermission" . "\n");
+ $this->jPrint ("Go to front end and login as admin" . "\n");
$this->gotoSite();
$this->doFrontEndLogin();
- echo "Go to Home and check that edit icon is visible" . "\n";
+ $this->jPrint ("Go to Home and check that edit icon is visible" . "\n");
$this->click("link=Home");
$this->waitForPageToLoad("30000");
$this->assertTrue($this->isElementPresent("//i[contains(@class, 'icon-edit')]"));
- echo "Drill to Sample Data article and check that edit icon is visible" . "\n";
+ $this->jPrint ("Drill to Sample Data article and check that edit icon is visible" . "\n");
$this->click("link=Home");
$this->waitForPageToLoad("30000");
$this->click("link=Sample Sites");
$this->waitForPageToLoad("30000");
$this->assertTrue($this->isElementPresent("//i[contains(@class, 'icon-edit')]"));
$this->click("link=Home");
$this->waitForPageToLoad("30000");
- echo "Logout of front end." . "\n";
+ $this->jPrint ("Logout of front end." . "\n");
$this->doFrontEndLogout();
- echo "Go to home and check that edit icon is not visible." . "\n";
+ $this->jPrint ("Go to home and check that edit icon is not visible." . "\n");
$this->click("link=Home");
$this->waitForPageToLoad("30000");
$this->assertFalse($this->isElementPresent("//i[contains(@class, 'icon-edit')]"));
- echo "Drill to Sample Data article and check that edit icon is not visible." . "\n";
+ $this->jPrint ("Drill to Sample Data article and check that edit icon is not visible." . "\n");
$this->click("link=Sample Sites");
$this->waitForPageToLoad("30000");
$this->assertFalse($this->isElementPresent("//i[contains(@class, 'icon-edit')]"));
Oops, something went wrong.

0 comments on commit f1f1c5c

Please sign in to comment.