Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding test to check if category got archived #105

Merged
merged 4 commits into from
Oct 31, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion tests/acceptance/administrator/AdministratorCategoriesCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,23 @@ public function administratorUnpublishCategory(\Step\Acceptance\category $I)
$I->trashCategory($categoryName);
$I->deleteCategory($categoryName);
}
}
public function administratorArchiveCategory(\Step\Acceptance\category $I)
{
$I->am('Administrator');
$I->wantToTest('Archiving Category in /administrator/');
$I->doAdministratorLogin();
$salt = rand(1,100);
$I->createCategory('automated testing arch'.$salt);
$I->amGoingTo('Search for automated testing');
$I->fillField(['xpath' => "//input[@id=\"filter_search\"]"], "automated testing arch".$salt. "\n");
$I->waitForText('Weblinks: Categories', '30', ['css' => 'h1']);
$I->amGoingTo('Select the first weblink');
$I->click(['xpath' => "//input[@id=\"cb0\"]"]);
$I->amGoingTo('try to archive a weblink category');
$I->click(['xpath' => "//button[@onclick=\"if (document.adminForm.boxchecked.value==0){alert('Please first make a selection from the list.');}else{ Joomla.submitbutton('categories.archive')}\"]"]);
$I->waitForText('Weblinks: Categories', '30', ['css' => 'h1']);
$I->expectTo('see a success message after Archiving the category');$I->see('1 category successfully archived.', ['id' => 'system-message-container']);
$I->setFilter('select status','Archived');
$I->trashCategory('automated testing arch'.$salt);
}
}