mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2025-01-12 16:01:40 +00:00
Adding a function to delete a category
This commit is contained in:
parent
d42948bd48
commit
15887b9bf0
@ -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']);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user