signal-desktop/test/fixtures_test.js

33 lines
849 B
JavaScript
Raw Normal View History

'use strict';
2018-04-27 21:25:04 +00:00
describe('Fixtures', function() {
before(function(done) {
// NetworkStatusView checks this method every five seconds while showing
2018-04-27 21:25:04 +00:00
window.getSocketStatus = function() {
return WebSocket.OPEN;
};
2018-04-27 21:25:04 +00:00
Whisper.Fixtures()
.saveAll()
.then(function() {
done();
});
});
it('renders', function(done) {
ConversationController.reset();
2018-04-27 21:25:04 +00:00
ConversationController.load()
.then(function() {
var view = new Whisper.InboxView({ window: window });
view.onEmpty();
view.$el.prependTo($('#render-light-theme'));
2018-04-27 21:25:04 +00:00
var view = new Whisper.InboxView({ window: window });
view.$el.removeClass('light-theme').addClass('dark-theme');
2018-04-27 21:25:04 +00:00
view.onEmpty();
view.$el.prependTo($('#render-dark-theme'));
2018-04-27 21:25:04 +00:00
})
.then(done, done);
});
});