signal-desktop/test/fixtures_test.js

39 lines
979 B
JavaScript
Raw Normal View History

'use strict';
2018-04-27 21:25:04 +00:00
describe('Fixtures', function() {
2018-09-21 01:47:19 +00:00
before(async function() {
// NetworkStatusView checks this method every five seconds while showing
2018-04-27 21:25:04 +00:00
window.getSocketStatus = function() {
return 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();
var view = new Whisper.InboxView({ window: window });
view.onEmpty();
view.$el.prependTo($('#render-light-theme'));
var view = new Whisper.InboxView({ window: window });
view.$el.removeClass('light-theme').addClass('dark-theme');
view.onEmpty();
view.$el.prependTo($('#render-dark-theme'));
});
});