From 15887b9bf0504c836cafbf49b91df2c5b19006fe Mon Sep 17 00:00:00 2001 From: puneet0191 Date: Fri, 30 Oct 2015 17:35:54 +0530 Subject: [PATCH 1/4] Adding a function to delete a category --- tests/_support/Step/Acceptance/category.php | 24 +++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/tests/_support/Step/Acceptance/category.php b/tests/_support/Step/Acceptance/category.php index 2e7c44d..5025925 100644 --- a/tests/_support/Step/Acceptance/category.php +++ b/tests/_support/Step/Acceptance/category.php @@ -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 */ @@ -62,4 +62,24 @@ class category extends \AcceptanceTester $I->clickToolbarButton("Trash"); $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']); + } } From 7acb192136d7828b2c7fd99f5a16ca7e72c28ddb Mon Sep 17 00:00:00 2001 From: puneet0191 Date: Fri, 30 Oct 2015 17:36:28 +0530 Subject: [PATCH 2/4] Adding Delete Category in Test --- tests/acceptance/administrator/AdministratorCategoriesCest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/acceptance/administrator/AdministratorCategoriesCest.php b/tests/acceptance/administrator/AdministratorCategoriesCest.php index 6bd8b7f..9ef2dda 100644 --- a/tests/acceptance/administrator/AdministratorCategoriesCest.php +++ b/tests/acceptance/administrator/AdministratorCategoriesCest.php @@ -21,6 +21,7 @@ class AdministratorCategoriesCest $I->createCategory($categoryName); $I->amGoingTo('Delete the Category which was created'); $I->trashCategory($categoryName); + $I->deleteCategory($categoryName); } public function administratorCreateCategoryWithoutTitleFails(AcceptanceTester $I) @@ -68,6 +69,7 @@ class AdministratorCategoriesCest $I->amGoingTo('Delete the Category which was created'); $I->trashCategory($categoryName); + $I->deleteCategory($categoryName); } public function administratorUnpublishCategory(\Step\Acceptance\category $I) @@ -107,5 +109,6 @@ class AdministratorCategoriesCest //delete the category $I->amGoingTo('Delete the Category which was created'); $I->trashCategory($categoryName); + $I->deleteCategory($categoryName); } } \ No newline at end of file From d41d5c7935bfb3c03db9eeb2bc218838e75b925b Mon Sep 17 00:00:00 2001 From: puneet0191 Date: Fri, 30 Oct 2015 19:10:16 +0530 Subject: [PATCH 3/4] Updating Composer to load latest Joomla! Browser --- composer.lock | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/composer.lock b/composer.lock index f444dc6..f7fbb90 100644 --- a/composer.lock +++ b/composer.lock @@ -90,16 +90,16 @@ }, { "name": "codegyre/robo", - "version": "0.5.4", + "version": "0.6.0", "source": { "type": "git", "url": "https://github.com/Codegyre/Robo.git", - "reference": "10aa223f6d1db182dc81d723bf1545dfc6ff380d" + "reference": "d18185f0494c854d36aa5ee0ad931ee23bbef552" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codegyre/Robo/zipball/10aa223f6d1db182dc81d723bf1545dfc6ff380d", - "reference": "10aa223f6d1db182dc81d723bf1545dfc6ff380d", + "url": "https://api.github.com/repos/Codegyre/Robo/zipball/d18185f0494c854d36aa5ee0ad931ee23bbef552", + "reference": "d18185f0494c854d36aa5ee0ad931ee23bbef552", "shasum": "" }, "require": { @@ -113,6 +113,7 @@ "require-dev": { "codeception/aspect-mock": "0.5.*", "codeception/base": "~2.1", + "codeception/codeception": "2.1", "codeception/verify": "0.2.*", "natxet/cssmin": "~3.0", "patchwork/jsqueeze": "~1.0" @@ -137,7 +138,7 @@ } ], "description": "Modern task runner", - "time": "2015-08-31 17:35:30" + "time": "2015-10-30 11:29:52" }, { "name": "doctrine/instantiator", @@ -524,12 +525,12 @@ "source": { "type": "git", "url": "https://github.com/joomla-projects/joomla-browser.git", - "reference": "0b43acdf38d9322efdfc4ee9730f7bd1cf96b2f9" + "reference": "0999fe673c34fbcf252957b6bc96bbf48956d70e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-projects/joomla-browser/zipball/0b43acdf38d9322efdfc4ee9730f7bd1cf96b2f9", - "reference": "0b43acdf38d9322efdfc4ee9730f7bd1cf96b2f9", + "url": "https://api.github.com/repos/joomla-projects/joomla-browser/zipball/0999fe673c34fbcf252957b6bc96bbf48956d70e", + "reference": "0999fe673c34fbcf252957b6bc96bbf48956d70e", "shasum": "" }, "require": { @@ -567,7 +568,7 @@ "acceptance testing", "joomla" ], - "time": "2015-10-29 14:44:24" + "time": "2015-10-30 13:37:14" }, { "name": "joomla-projects/robo", From f5ee9e9cc70c397cd30b8b7bb4694cec0fa28e97 Mon Sep 17 00:00:00 2001 From: puneet0191 Date: Fri, 30 Oct 2015 19:10:25 +0530 Subject: [PATCH 4/4] Updating the comment --- tests/_support/Step/Acceptance/category.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/_support/Step/Acceptance/category.php b/tests/_support/Step/Acceptance/category.php index 5025925..ffc872c 100644 --- a/tests/_support/Step/Acceptance/category.php +++ b/tests/_support/Step/Acceptance/category.php @@ -47,7 +47,7 @@ class category extends \AcceptanceTester /** * Function to Trash a Category in Joomla! * - * @param String $categoryName Name of the category which is to be Trashed + * @param String $categoryName Name of the category which is to be trashed * * @return void */