2015-04-14 22:08:32 +02:00
|
|
|
import MenuButton from '../../src/js/menu/menu-button.js';
|
2015-03-26 06:43:41 +02:00
|
|
|
import TestHelpers from './test-helpers.js';
|
|
|
|
|
|
|
|
q.module('MenuButton');
|
2014-03-26 10:40:14 +03:00
|
|
|
|
|
|
|
test('should place title list item into ul', function() {
|
|
|
|
var player, menuButton;
|
|
|
|
|
2015-03-26 06:43:41 +02:00
|
|
|
player = TestHelpers.makePlayer();
|
2014-03-26 10:40:14 +03:00
|
|
|
|
2015-03-26 06:43:41 +02:00
|
|
|
menuButton = new MenuButton(player, {
|
2014-04-04 09:35:15 +03:00
|
|
|
'title': 'testTitle'
|
2014-03-26 10:40:14 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
var menuContentElement = menuButton.el().getElementsByTagName('UL')[0];
|
|
|
|
var titleElement = menuContentElement.children[0];
|
|
|
|
|
|
|
|
ok(titleElement.innerHTML === 'TestTitle', 'title element placed in ul');
|
|
|
|
|
|
|
|
player.dispose();
|
|
|
|
});
|