signal-desktop/test/fixtures_test.js

39 lines
983 B
JavaScript
Raw Normal View History

2018-11-02 18:02:53 +00:00
/* global $, ConversationController, textsecure, Whisper */
'use strict';
2018-11-02 18:02:53 +00:00
describe('Fixtures', () => {
before(async () => {
// NetworkStatusView checks this method every five seconds while showing
2018-11-02 18:02:53 +00:00
window.getSocketStatus = () => WebSocket.OPEN;
2018-09-21 01:47:19 +00:00
await clearDatabase();
await textsecure.storage.user.setNumberAndDeviceId(
'+17015552000',
2,
'testDevice'
);
await ConversationController.getOrCreateAndWait(
textsecure.storage.user.getNumber(),
'private'
);
});
it('renders', async () => {
await Whisper.Fixtures().saveAll();
ConversationController.reset();
await ConversationController.load();
2018-11-02 18:02:53 +00:00
let view = new Whisper.InboxView({ window });
view.onEmpty();
view.$el.prependTo($('#render-light-theme'));
2018-11-02 18:02:53 +00:00
view = new Whisper.InboxView({ window });
view.$el.removeClass('light-theme').addClass('dark-theme');
view.onEmpty();
view.$el.prependTo($('#render-dark-theme'));
});
});