Sha256: 591288ecdbee043e0c96bdb4dfbb2a26fddcd9d0ad460403500ccfa56280a4b9

Contents?: true

Size: 955 Bytes

Versions: 24

Compression:

Stored size: 955 Bytes

Contents

module("PopupButtonView -- Menu Setup");


test("Setting up menu without background task queue", function() {
  SC.RunLoop.begin();
  var popup = SC.PopupButtonView.create({
    menu: SC.MenuPane.extend({
      items: "1 2 3 4 5".w()
    })
  });
  SC.RunLoop.end();

  equals(popup.get('menu').isClass, YES, "Menu not yet instantiated");

  SC.RunLoop.begin();
  popup.setupMenu();
  SC.RunLoop.end();

  equals(popup.get('menu').isClass, undefined, "Menu now instantiated");

});

test("Setting up in background task queue", function() {
  SC.RunLoop.begin();
  var popup = SC.PopupButtonView.create({
    shouldLoadInBackground: YES,
    menu: SC.MenuPane.extend({
      items: "1 2 3 4 5".w()
    })
  });
  SC.RunLoop.end();

  equals(popup.get('menu').isClass, YES, "Menu not yet instantiated");

  SC.RunLoop.begin();
  SC.backgroundTaskQueue.run();
  SC.RunLoop.end();

  equals(popup.get('menu').isClass, undefined, "Menu now instantiated");
});

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
sproutcore-1.11.0 lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.11.0.rc3 lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.11.0.rc2 lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.11.0.rc1 lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.10.3.1 lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.10.2 lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.10.1 lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.10.0 lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.10.0.rc.3 lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.10.0.rc.2 lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.10.0.rc.1 lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.9.2 lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.9.1 lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.9.0 lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.8.2.1 lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.8.1 lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.8.0 lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.7.1.beta-java lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.7.1.beta lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js
sproutcore-1.6.0.1-java lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js