mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2024-11-17 01:45:10 +00:00
[imp] change MenuCest to joomla-browser createMenuItem
This commit is contained in:
parent
5ed2f49ce1
commit
ccb40cb2f0
@ -29,30 +29,9 @@ class MenuCest
|
||||
$I->wantToTest('Frontend menu creation in /administrator/');
|
||||
|
||||
$I->doAdministratorLogin();
|
||||
$I->amGoingTo('Navigate to Menu Manager page in /administrator/');
|
||||
$I->amOnPage('administrator/index.php?option=com_menus&view=items&menutype=mainmenu');
|
||||
$I->waitForText('Menus: Items','30', ['css' => 'h1']);
|
||||
$I->expectTo('see menu menager items');
|
||||
$I->checkForPhpNoticesOrWarnings();
|
||||
$I->amGoingTo('try to save a category with a filled title');
|
||||
$I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('item.add')\"]"]);
|
||||
$I->waitForText('Menus: New Item','30', ['css' => 'h1']);
|
||||
$I->fillField(['id' => 'jform_title'], 'automated testing' . rand(1, 100));
|
||||
$I->click(['xpath' => "//a[@href=\"#menuTypeModal\"]"]);
|
||||
$I->waitForElement('.iframe','30');
|
||||
$I->comment('I switch to Menu Type iframe');
|
||||
$I->switchToIFrame("Menu Item Type");
|
||||
$I->waitForElementVisible(['link' => "Weblinks"],'30');
|
||||
$I->click(['link' => "Weblinks"]);
|
||||
$I->wait(1);
|
||||
$I->waitForElementVisible(['xpath' => "//a[contains(@title, 'Show all the web link categories within a category')]"], 60);
|
||||
$I->click(['xpath' => "//a[contains(@title, 'Show all the web link categories within a category')]"]);
|
||||
$I->wait(1);
|
||||
$I->switchToIFrame();
|
||||
$I->waitForElement(['xpath' => "//input[@value='List All Web Link Categories']"],'30');
|
||||
$I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('item.apply')\"]"]);
|
||||
$I->expectTo('see a success message after saving the category');
|
||||
$I->see('Menu item successfully saved', ['id' => 'system-message-container']);
|
||||
|
||||
$title = 'automated testing ' . uniqid();
|
||||
$I->createMenuItem($title, 'Weblinks', 'List All Web Link Categories');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -68,29 +47,8 @@ class MenuCest
|
||||
$I->wantToTest('Frontend category menu creation in /administrator/');
|
||||
|
||||
$I->doAdministratorLogin();
|
||||
$I->amGoingTo('Navigate to Menu Manager page in /administrator/');
|
||||
$I->amOnPage('administrator/index.php?option=com_menus&view=items&menutype=mainmenu');
|
||||
$I->waitForText('Menus: Items','30', ['css' => 'h1']);
|
||||
$I->expectTo('see menu menager items');
|
||||
$I->checkForPhpNoticesOrWarnings();
|
||||
$I->amGoingTo('try to save a category with a filled title');
|
||||
$I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('item.add')\"]"]);
|
||||
$I->waitForText('Menus: New Item','30', ['css' => 'h1']);
|
||||
$I->fillField(['id' => 'jform_title'], 'automated testing' . rand(1, 100));
|
||||
$I->click(['xpath' => "//a[@href=\"#menuTypeModal\"]"]);
|
||||
$I->waitForElement('.iframe','30');
|
||||
$I->comment('I switch to Menu Type iframe');
|
||||
$I->switchToIFrame("Menu Item Type");
|
||||
$I->waitForElementVisible(['link' => "Weblinks"],'30');
|
||||
$I->click(['link' => "Weblinks"]);
|
||||
$I->wait(1);
|
||||
$I->waitForElementVisible(['xpath' => "//a[contains(@title, 'Show all the web link categories within a category')]"], 60);
|
||||
$I->click(['xpath' => "//a[contains(@title, 'Displays a list of Web Links for a category')]"]);
|
||||
$I->wait(1);
|
||||
$I->switchToIFrame();
|
||||
$I->waitForElement(['xpath' => "//input[@value='List Web Links in a Category']"],'30');
|
||||
$I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('item.apply')\"]"]);
|
||||
$I->expectTo('see a success message after saving the menu item');
|
||||
$I->see('Menu item successfully saved', ['id' => 'system-message-container']);
|
||||
|
||||
$title = 'automated testing ' . uniqid();
|
||||
$I->createMenuItem($title, 'Weblinks', 'List Web Links in a Category');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user