Enabled Item
Disabled Item
Cut
Copy
Paste
Enabled Submenu
Submenu Item One
Submenu Item Two
Deeper Submenu
Sub-sub-menu Item One
Sub-sub-menu Item Two
Disabled Submenu
Submenu Item One
Submenu Item Two
Different popup
Left Click Menu
Enabled Item
Disabled Item
Cut
Copy
Paste
Enabled Submenu
Submenu Item One
Submenu Item Two
Deeper Submenu
Sub-sub-menu Item One
Sub-sub-menu Item Two
Disabled Submenu
Submenu Item One
Submenu Item Two
Different popup

# Dijit Menu System Test

### Form

left click to open the menu for this input:
Note: because of the window contextMenu, make sure you get
the right menu by verifying the left
click one starts with "Left Click Menu"
at the very top.

hello there!

(this space intentionally left blank to aid testing with controls at the bottom of the browser window)

See also: form/test_Button (PopupMenu is used with DropDownButton and ComboButton)

### Mouse opening tests

- Right click on the client area of the page (ctrl-click for Macintosh). Menu should open.
- Right click on each of the form controls above. Menu should open.
- Right click near the righthand window border. Menu should open to the left of the pointer.
- Right click near the bottom window border. Menu should open above the pointer.

### Mouse hover tests

- Hover over the first item with the pointer. Item should highlight and get focus.
- Hover over the second (disabled) item. Item should highlight and get focus.
- Seperator items should not highlight on hover - no items should highlight in this case.

### Mouse click tests

- Click on the first menu item. Alert should open with the message "Hello world". The menu should dissapear.
- Click on the second menu item (disabled). Should not do anything - focus should remain on the disabled item.
- Click anywhere outside the menu. Menu should close. Focus will be set by the browser based on where the user clicks.

### Mouse submenu tests

- Hover over the "Enabled Submenu" item. Item should highlight and then pop open a submenu after a short (500ms) delay.
- Hover over any of the other menu items. Submenu should close immediately and deselect the submenu parent item. The newly hovered item should become selected.
- Hover over the "Disabled Submenu" item. Item should highlight, but no submenu should appear.
- Clicking on the "Enabled Submenu" item before the submenu has opened (you'll have to be quick!) should immediatley open the submenu.
- Clicking on the "Enabled Submenu" item after the submenu has opened should have no effect - the item is still selected and the submenu still open.
- Hover over submenu item 1. Should select it - the parent menu item should stay selected also.
- Hover over submenu item 2. Should select it - the parent menu item should stay selected also.

### Keyboard opening tests

- On Windows: press shift-f10 with focus on any of the form controls. Should open the menu.
- On Windows: press the context menu key (located on the right of the space bar on North American keyboards) with focus on any of the form controls. Should open the menu.
- On Firefox on the Mac: press ctrl-space with focus on any of the form controls. Should open the menu.

### Keyboard closing tests

- Open the menu.
- Press tab. Should close the menu and return focus to where it was before the menu was opened.
- Open the menu.
- Press escape. Should close the menu and return focus to where it was before the menu was opened.

### Keyboard navigation tests

- Open the menu.
- Pressing up or down arrow should cycle focus through the items in that menu.
- Pressing enter or space should invoke the menu item.
- Disabled items receive focus but no action is taken upon pressing enter or space.

### Keyboard submenu tests

- Open the menu.
- The first item should become selected.
- Press the right arrow key. Nothing should happen.
- Press the left arrow key. Nothing should happen.
- Press the down arrow until "Enabled Submenu" is selected. The submenu should not appear.
- Press enter. The submenu should appear with the first item selected.
- Press escape. The submenu should vanish - "Enabled Submenu" should remain selected.
- Press the right arrow key. The submenu should appear with the first item selected.
- Press the right arrow key. Nothing should happen.
- Press the left arrow key. The submenu should close - "Enabled Submenu" should remain selected.
- Press the left arrow key. The menu should not close and "Enabled Submenu" should remain selected.
- Press escape. The menu should close and focus should be returned to where it was before the menu was opened.