|
@@ -43,21 +43,6 @@ describe('inspector/index', () => {
|
|
|
const widget = new InspectorPanel();
|
|
|
expect(widget.hasClass('jp-Inspector')).to.equal(true);
|
|
|
});
|
|
|
-
|
|
|
- it('should hide its tab bar if there are less than two items', () => {
|
|
|
- const widget = new InspectorPanel();
|
|
|
- widget.add({ name: 'Foo', rank: 20, type: 'foo' });
|
|
|
- expect(widget).to.be.an.instanceof(InspectorPanel);
|
|
|
- expect(widget.tabBar.isHidden).to.equal(true);
|
|
|
- });
|
|
|
-
|
|
|
- it('should show its tab bar if there is more than one item', () => {
|
|
|
- const widget = new InspectorPanel();
|
|
|
- widget.add({ name: 'Foo', rank: 20, type: 'foo' });
|
|
|
- widget.add({ name: 'Boo', rank: 30, type: 'bar' });
|
|
|
- expect(widget).to.be.an.instanceof(InspectorPanel);
|
|
|
- expect(widget.tabBar.isHidden).to.equal(false);
|
|
|
- });
|
|
|
});
|
|
|
|
|
|
describe('#source', () => {
|
|
@@ -79,28 +64,6 @@ describe('inspector/index', () => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('#add()', () => {
|
|
|
- it('should add inspector child items', () => {
|
|
|
- const panel = new InspectorPanel();
|
|
|
- const original = panel.widgets.length;
|
|
|
-
|
|
|
- panel.add({ name: 'Foo', rank: 20, type: 'foo' });
|
|
|
- panel.add({ name: 'Boo', rank: 30, type: 'bar' });
|
|
|
-
|
|
|
- expect(panel.widgets.length).to.equal(original + 2);
|
|
|
- });
|
|
|
-
|
|
|
- it('should return disposables to remove child items', () => {
|
|
|
- const panel = new InspectorPanel();
|
|
|
- const original = panel.widgets.length;
|
|
|
- const disposable = panel.add({ name: 'Boo', rank: 30, type: 'bar' });
|
|
|
-
|
|
|
- expect(panel.widgets.length).to.equal(original + 1);
|
|
|
- disposable.dispose();
|
|
|
- expect(panel.widgets.length).to.equal(original);
|
|
|
- });
|
|
|
- });
|
|
|
-
|
|
|
describe('#dispose()', () => {
|
|
|
it('should dispose of the resources used by the inspector', () => {
|
|
|
const widget = new InspectorPanel();
|