Sha256: f30c81c8ae428eebcb3109b50cedf55d47811caaec2c082704d36f858ab8808b
Contents?: true
Size: 1.02 KB
Versions: 24
Compression:
Stored size: 1.02 KB
Contents
module("PopupButtonView -- Showing menu"); test("Popping up the menu will set the preferMatrix", function() { SC.RunLoop.begin(); var popup = SC.PopupButtonView.create({ menu: SC.MenuPane.extend({ items: "1 2 3 4 5".w() }), menuPreferMatrix: [1, 2, 3] }); popup.showMenu(); SC.RunLoop.end(); same(popup.get('menu').get('preferMatrix'), [1, 2, 3], "Prefer Matrix is same."); popup.hideMenu(); }); test("Showing the menu activates the button.", function() { SC.RunLoop.begin(); var popup = SC.PopupButtonView.create({ menu: SC.MenuPane.extend({ items: "1 2 3 4 5".w() }), menuPreferMatrix: [1, 2, 3] }); SC.RunLoop.end(); equals(popup.get('isActive'), NO, "Is not active at startup."); SC.RunLoop.begin(); popup.showMenu(); SC.RunLoop.end(); equals(popup.get('isActive'), YES, "Is active when menu is open."); SC.RunLoop.begin(); popup.hideMenu(); SC.RunLoop.end(); equals(popup.get('isActive'), NO, "Is not active once menu closes."); });
Version data entries
24 entries across 24 versions & 1 rubygems