32
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-12-27 02:12:50 +00:00

Merge pull request #119 from puneet0191/TrashingCategory

Adding the test to Trash a Category.
This commit is contained in:
Viktor Vogel 2015-10-30 15:09:41 +01:00
commit b00a245253
3 changed files with 35 additions and 11 deletions

19
composer.lock generated
View File

@ -90,16 +90,16 @@
}, },
{ {
"name": "codegyre/robo", "name": "codegyre/robo",
"version": "0.5.4", "version": "0.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Codegyre/Robo.git", "url": "https://github.com/Codegyre/Robo.git",
"reference": "10aa223f6d1db182dc81d723bf1545dfc6ff380d" "reference": "d18185f0494c854d36aa5ee0ad931ee23bbef552"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Codegyre/Robo/zipball/10aa223f6d1db182dc81d723bf1545dfc6ff380d", "url": "https://api.github.com/repos/Codegyre/Robo/zipball/d18185f0494c854d36aa5ee0ad931ee23bbef552",
"reference": "10aa223f6d1db182dc81d723bf1545dfc6ff380d", "reference": "d18185f0494c854d36aa5ee0ad931ee23bbef552",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -113,6 +113,7 @@
"require-dev": { "require-dev": {
"codeception/aspect-mock": "0.5.*", "codeception/aspect-mock": "0.5.*",
"codeception/base": "~2.1", "codeception/base": "~2.1",
"codeception/codeception": "2.1",
"codeception/verify": "0.2.*", "codeception/verify": "0.2.*",
"natxet/cssmin": "~3.0", "natxet/cssmin": "~3.0",
"patchwork/jsqueeze": "~1.0" "patchwork/jsqueeze": "~1.0"
@ -137,7 +138,7 @@
} }
], ],
"description": "Modern task runner", "description": "Modern task runner",
"time": "2015-08-31 17:35:30" "time": "2015-10-30 11:29:52"
}, },
{ {
"name": "doctrine/instantiator", "name": "doctrine/instantiator",
@ -524,12 +525,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/joomla-projects/joomla-browser.git", "url": "https://github.com/joomla-projects/joomla-browser.git",
"reference": "0b43acdf38d9322efdfc4ee9730f7bd1cf96b2f9" "reference": "0999fe673c34fbcf252957b6bc96bbf48956d70e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/joomla-projects/joomla-browser/zipball/0b43acdf38d9322efdfc4ee9730f7bd1cf96b2f9", "url": "https://api.github.com/repos/joomla-projects/joomla-browser/zipball/0999fe673c34fbcf252957b6bc96bbf48956d70e",
"reference": "0b43acdf38d9322efdfc4ee9730f7bd1cf96b2f9", "reference": "0999fe673c34fbcf252957b6bc96bbf48956d70e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -567,7 +568,7 @@
"acceptance testing", "acceptance testing",
"joomla" "joomla"
], ],
"time": "2015-10-29 14:44:24" "time": "2015-10-30 13:37:14"
}, },
{ {
"name": "joomla-projects/robo", "name": "joomla-projects/robo",

View File

@ -45,9 +45,9 @@ class category extends \AcceptanceTester
} }
/** /**
* Function to Delete a Category in Joomla! * Function to Trash a Category in Joomla!
* *
* @param String $categoryName Name of the category which is to be deleted * @param String $categoryName Name of the category which is to be trashed
* *
* @return void * @return void
*/ */
@ -62,4 +62,24 @@ class category extends \AcceptanceTester
$I->clickToolbarButton("Trash"); $I->clickToolbarButton("Trash");
$I->see('category successfully trashed.', ['id' => 'system-message-container']); $I->see('category successfully trashed.', ['id' => 'system-message-container']);
} }
/**
* Function to Delete a Category in Joomla!
*
* @param String $categoryName Name of the category which is to be deleted
*
* @return void
*/
public function deleteCategory($categoryName)
{
$I = $this;
$I->amOnPage('administrator/index.php?option=com_categories&extension=com_weblinks');
$I->waitForText('Weblinks: Categories', '30', ['css' => 'h1']);
$I->setFilter('select status', 'Trashed');
$I->searchForItem($categoryName);
$I->amGoingTo('Select the weblink result');
$I->checkAllResults();
$I->clickToolbarButton("empty trash");
$I->see('category successfully deleted.', ['id' => 'system-message-container']);
}
} }

View File

@ -21,6 +21,7 @@ class AdministratorCategoriesCest
$I->createCategory($categoryName); $I->createCategory($categoryName);
$I->amGoingTo('Delete the Category which was created'); $I->amGoingTo('Delete the Category which was created');
$I->trashCategory($categoryName); $I->trashCategory($categoryName);
$I->deleteCategory($categoryName);
} }
public function administratorCreateCategoryWithoutTitleFails(AcceptanceTester $I) public function administratorCreateCategoryWithoutTitleFails(AcceptanceTester $I)
@ -68,6 +69,7 @@ class AdministratorCategoriesCest
$I->amGoingTo('Delete the Category which was created'); $I->amGoingTo('Delete the Category which was created');
$I->trashCategory($categoryName); $I->trashCategory($categoryName);
$I->deleteCategory($categoryName);
} }
public function administratorUnpublishCategory(\Step\Acceptance\category $I) public function administratorUnpublishCategory(\Step\Acceptance\category $I)
@ -107,5 +109,6 @@ class AdministratorCategoriesCest
//delete the category //delete the category
$I->amGoingTo('Delete the Category which was created'); $I->amGoingTo('Delete the Category which was created');
$I->trashCategory($categoryName); $I->trashCategory($categoryName);
$I->deleteCategory($categoryName);
} }
} }