mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2025-01-12 07:55:53 +00:00
Merge pull request #137 from javigomez/puneettabschecker
Test to validate the Tabs on edit view
This commit is contained in:
commit
da61ac9fe3
@ -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');
|
||||
|
@ -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']);
|
||||
|
Loading…
Reference in New Issue
Block a user