Pressing Esc in left pane composer menu should go back

This commit is contained in:
Evan Hahn 2021-04-02 16:43:39 -05:00 committed by Josh Perez
parent 2d35fa8f57
commit f05d45ac9b
12 changed files with 168 additions and 5 deletions

View file

@ -2,6 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import * as sinon from 'sinon';
import { v4 as uuid } from 'uuid';
import { RowType } from '../../../components/ConversationList';
import { FindDirection } from '../../../components/leftPane/LeftPaneHelper';
@ -15,6 +16,15 @@ describe('LeftPaneArchiveHelper', () => {
type: 'direct' as const,
});
describe('getBackAction', () => {
it('returns the "show inbox" action', () => {
const showInbox = sinon.fake();
const helper = new LeftPaneArchiveHelper({ archivedConversations: [] });
assert.strictEqual(helper.getBackAction({ showInbox }), showInbox);
});
});
describe('getRowCount', () => {
it('returns the number of archived conversations', () => {
assert.strictEqual(