define(["require", "exports", "react", "react-dom", "react-addons-test-utils", "./CommandBar"], function (require, exports, React, ReactDOM, ReactTestUtils, CommandBar_1) {
    "use strict";
    var expect = chai.expect;
    describe('CommandBar', function () {
        afterEach(function () {
            for (var i = 0; i < document.body.children.length; i++) {
                if (document.body.children[i].tagName === 'DIV') {
                    document.body.removeChild(document.body.children[i]);
                    i--;
                }
            }
        });
        it('opens a menu with deprecated IContextualMenuItem.items property', function () {
            var items = [
                {
                    name: 'TestText 1',
                    key: 'TestKey1',
                    items: [
                        {
                            name: 'SubmenuText 1',
                            key: 'SubmenuKey1',
                            className: 'SubMenuClass'
                        }
                    ]
                },
            ];
            var renderedContent = ReactTestUtils.renderIntoDocument(React.createElement(CommandBar_1.CommandBar, { items: items }));
            document.body.appendChild(ReactDOM.findDOMNode(renderedContent));
            var menuItem = ReactDOM.findDOMNode(renderedContent).querySelector('button');
            ReactTestUtils.Simulate.click(menuItem);
            expect(document.querySelector('.SubMenuClass')).to.exist;
        });
        it('opens a menu with IContextualMenuItem.subMenuProps.items property', function () {
            var items = [
                {
                    name: 'TestText 1',
                    key: 'TestKey1',
                    subMenuProps: {
                        items: [
                            {
                                name: 'SubmenuText 1',
                                key: 'SubmenuKey1',
                                className: 'SubMenuClass'
                            }
                        ]
                    }
                },
            ];
            var renderedContent = ReactTestUtils.renderIntoDocument(React.createElement(CommandBar_1.CommandBar, { items: items }));
            document.body.appendChild(ReactDOM.findDOMNode(renderedContent));
            var menuItem = ReactDOM.findDOMNode(renderedContent).querySelector('button');
            ReactTestUtils.Simulate.click(menuItem);
            expect(document.querySelector('.SubMenuClass')).to.exist;
        });
    });
});

//# sourceMappingURL=CommandBar.test.js.map
