Commit 7474fc1c authored by Eduardo Sanz García's avatar Eduardo Sanz García Committed by Eduardo

Remove unused 'sidebarOpened' event emitter

There is both an 'sidebarOpened' event emitter and RPC events. The RPC
event is used, while the event emitter is not.
parent d4b65960
......@@ -503,7 +503,6 @@ export default class Sidebar {
open() {
this._sidebarRPC.call('sidebarOpened');
this._emitter.publish('sidebarOpened');
if (this.iframeContainer) {
const width = this.iframeContainer.getBoundingClientRect().width;
......
......@@ -783,15 +783,14 @@ describe('Sidebar', () => {
'sidebarLayoutChanged',
sinon.match.any
);
assert.calledWith(sidebar._emitter.publish, 'sidebarOpened');
assert.calledTwice(sidebar._emitter.publish);
assert.calledOnce(sidebar._emitter.publish);
assertLayoutValues(layoutChangeHandlerSpy.lastCall.args[0], {
expanded: true,
});
sidebar.close();
assert.calledTwice(layoutChangeHandlerSpy);
assert.calledThrice(sidebar._emitter.publish);
assert.calledTwice(sidebar._emitter.publish);
assertLayoutValues(layoutChangeHandlerSpy.lastCall.args[0], {
expanded: false,
width: fakeToolbar.getWidth(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment