Ext Js Pathfinder progress report #6

Ext JS has plenty of components. There are main categories, quite familiar to many people like buttons and less-expected descendants such as split buttons. Split button is a creature that hides a menu – when user clicks an “arrow part” of split button, the menu is revealed. To handle such things, I provided two handy methods: hideMenu and showMenu. Their names are taken from ExtJS’ splitbutton API.

Exemplary usage:

var menu = pathfinderObj.find('splitbutton menu')[0];  // 1

pathfinderObj.assert.assertNotVisible(menu);  // 2

pathfinderObj.showMenu(firstButton);  // 3

pathfinderObj.hideMenu(firstButton);  // 4
  1. Getting menu under splitbutton is quite straightforward, there is nothing surprising here
  2. Initially, menu should be hidden
  3. After showing menu it becomes visible
  4. Hiding menu results in it being no longer visible, but its items (xtpye: menuitem) are still visible according to isVisible predicate! Surprising… feature of Ext JS.

Commit with changes: here


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.