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']); + } }