signal-desktop/test/fixtures_test.js

38 lines
1 KiB
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-android'));
2018-04-27 21:25:04 +00:00
var view = new Whisper.InboxView({ window: window });
view.$el.removeClass('android').addClass('ios');
view.onEmpty();
view.$el.prependTo($('#render-ios'));
2018-04-27 21:25:04 +00:00
var view = new Whisper.InboxView({ window: window });
view.$el.removeClass('android').addClass('android-dark');
view.onEmpty();
view.$el.prependTo($('#render-android-dark'));
})
.then(done, done);
});
});