88use SeleniumClient \WebElement ;
99
1010/**
11- * Class for the back-end control panel screen.
11+ * @package Joomla.Test
12+ * @subpackage Webdriver
1213 *
14+ * @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
15+ * @license GNU General Public License version 2 or later; see LICENSE
16+ */
17+
18+ /**
19+ * Page class for the back-end menu items manager screen.
20+ *
21+ * @package Joomla.Test
22+ * @subpackage Webdriver
23+ * @since 3.0
1324 */
1425class MenuItemsManagerPage extends AdminManagerPage
1526{
27+ /**
28+ * XPath string used to uniquely identify this page
29+ *
30+ * @var string
31+ * @since 3.0
32+ */
1633 protected $ waitForXpath = "//ul/li/a[@href='index.php?option=com_menus&view=items'] " ;
34+
35+ /**
36+ * URL used to uniquely identify this page
37+ *
38+ * @var string
39+ * @since 3.0
40+ */
1741 protected $ url = 'administrator/index.php?option=com_menus&view=items ' ;
1842
43+ /**
44+ * Array of filter id values for this page
45+ *
46+ * @var array
47+ * @since 3.0
48+ */
1949 public $ filters = array (
2050 'Menu ' => 'menutype ' ,
2151 'Max Levels ' => 'filter_level ' ,
@@ -24,6 +54,12 @@ class MenuItemsManagerPage extends AdminManagerPage
2454 'Language ' => 'filter_language ' ,
2555 );
2656
57+ /**
58+ * Array of toolbar id values for this page
59+ *
60+ * @var array
61+ * @since 3.0
62+ */
2763 public $ toolbar = array (
2864 'New ' => 'toolbar-new ' ,
2965 'Edit ' => 'toolbar-edit ' ,
@@ -38,23 +74,29 @@ class MenuItemsManagerPage extends AdminManagerPage
3874 'Help ' => 'toolbar-help ' ,
3975 );
4076
77+ /**
78+ * Array of submenu links used for this page
79+ *
80+ * @var array
81+ * @since 3.0
82+ */
4183 public $ submenu = array (
4284 'option=com_menus&view=menus ' ,
4385 );
4486
4587 /**
4688 * Add a new menu item in the Menu Manager: Menu Items screen.
4789 *
48- * @param string $menuItemType One of the allowed Menu Item Types (Single Article, Featured Contacts, etc.)
4990 * @param string $title Menu Title field
91+ * @param string $menuItemType One of the allowed Menu Item Types (Single Article, Featured Contacts, etc.)
5092 * @param string $menuLocation Menu Location field
5193 * @param array $otherFields associative array of other fields in the form label => value.
5294 *
5395 * Note that there a special field types for the request variable (e.g., article name or category name) which is required by some menu types.
5496 * This can be designated in the $otherFields with any of the following labels: 'request', 'category', 'article', 'contact', 'newsfeed', 'weblink'.
5597 * For example: array('article' => 'Australian Parks').
5698 *
57- * @return MenuItmesManagerPage
99+ * @return MenuItemsManagerPage
58100 */
59101 public function addMenuItem ($ title ='Test Menu Item ' , $ menuItemType ='List All Categories ' , $ menuLocation = 'Main Menu ' , array $ otherFields = array ())
60102 {
@@ -75,7 +117,14 @@ public function addMenuItem($title='Test Menu Item', $menuItemType='List All Cat
75117 return $ this ->test ->getPageObject ('MenuItemsManagerPage ' );
76118 }
77119
78-
120+ /**
121+ * Edit a menu item in the Menu Manager: Menu Items screen.
122+ *
123+ * @param string $title Menu Title field
124+ * @param array $fields associative array of fields in the form label => value.
125+ *
126+ * @return void
127+ */
79128 public function editMenuItem ($ title , $ fields )
80129 {
81130 $ this ->clickItem ($ title );
0 commit comments