32
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-12-25 01:45:59 +00:00

Test to validate the Tabs on edit view

For more information see this issue:
This commit is contained in:
puneet0191 2015-10-31 12:44:29 +01:00 committed by javier gomez
parent b9d54a1b0a
commit 75c309e843
3 changed files with 35 additions and 7 deletions

8
composer.lock generated
View File

@ -525,12 +525,12 @@
"source": {
"type": "git",
"url": "https://github.com/joomla-projects/joomla-browser.git",
"reference": "0999fe673c34fbcf252957b6bc96bbf48956d70e"
"reference": "b0056ff0018c529cc2a143f6d78004bce8f9d5b0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/joomla-projects/joomla-browser/zipball/0999fe673c34fbcf252957b6bc96bbf48956d70e",
"reference": "0999fe673c34fbcf252957b6bc96bbf48956d70e",
"url": "https://api.github.com/repos/joomla-projects/joomla-browser/zipball/b0056ff0018c529cc2a143f6d78004bce8f9d5b0",
"reference": "b0056ff0018c529cc2a143f6d78004bce8f9d5b0",
"shasum": ""
},
"require": {
@ -568,7 +568,7 @@
"acceptance testing",
"joomla"
],
"time": "2015-10-30 13:37:14"
"time": "2015-10-31 11:00:18"
},
{
"name": "joomla-projects/robo",

View File

@ -9,6 +9,20 @@
*/
class AdministratorCategoriesCest
{
public function administratorVerifyAvailableTabs(\Step\Acceptance\category $I)
{
$I->am('Administrator');
$I->wantToTest('Category Edit View Tabs');
$I->doAdministratorLogin();
$I->amGoingTo('Navigate to Categories page in /administrator/ and verify the Tabs');
$I->amOnPage('administrator/index.php?option=com_categories&extension=com_weblinks');
$I->clickToolbarButton('New');
$I->waitForText('Weblinks: New Category', '30', ['css' => 'h1']);
$I->verifyAvailableTabs(['Category', 'Publishing', 'Permissions', 'Options']);
}
public function administratorCreateCategory(\Step\Acceptance\category $I)
{
$I->am('Administrator');

View File

@ -16,6 +16,20 @@ class AdministratorWeblinksCest
$this->url = $this->faker->url();
}
public function administratorVerifyAvailableTabs(\Step\Acceptance\weblink $I)
{
$I->am('Administrator');
$I->wantToTest('Weblinks Edit View Tabs');
$I->doAdministratorLogin();
$I->amGoingTo('Navigate to Weblinks page in /administrator/ and verify the Tabs');
$I->amOnPage('administrator/index.php?option=com_weblinks&view=weblinks');
$I->clickToolbarButton('New');
$I->waitForText('Web Link: New', '30', ['css' => 'h1']);
$I->verifyAvailableTabs(['New Web Link', 'Images', 'Publishing', 'Options', 'Metadata']);
}
public function administratorCreateWeblink(\Step\Acceptance\weblink $I)
{
$I->am('Administrator');
@ -31,11 +45,11 @@ class AdministratorWeblinksCest
$I->checkForPhpNoticesOrWarnings();
$I->amGoingTo('try to save a weblink with a filled title and URL');
$I->click('New');
$I->clickToolbarButton('New');
$I->waitForText('Web Link: New', '30', ['css' => 'h1']);
$I->fillField(['id' => 'jform_title'], $this->title);
$I->fillField(['id' => 'jform_url'], $this->url);
$I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('weblink.save')\"]"]);
$I->clickToolbarButton('Save & Close');
$I->waitForText('Web Links', '30', ['css' => 'h1']);
$I->expectTo('see a success message and the weblink added after saving the weblink');
$I->see('Web link successfully saved', ['id' => 'system-message-container']);
@ -63,7 +77,7 @@ class AdministratorWeblinksCest
$I->amGoingTo('Delete the just saved weblink');
$I->checkAllResults();
$I->click(['xpath'=> "//button[@onclick=\"if (document.adminForm.boxchecked.value==0){alert('Please first make a selection from the list.');}else{ Joomla.submitbutton('weblinks.trash')}\"]"]);
$I->clickToolbarButton('Trash');
$I->waitForText('Web Links','30',['css' => 'h1']);
$I->expectTo('see a success message and the weblink removed from the list');
$I->see('Web link successfully trashed',['id' => 'system-message-container']);