2016-09-22 23:37:12 +00:00
|
|
|
'use strict';
|
|
|
|
|
2018-04-27 21:25:04 +00:00
|
|
|
describe('Fixtures', function() {
|
2016-09-22 23:37:12 +00:00
|
|
|
before(function(done) {
|
2017-05-18 17:42:20 +00:00
|
|
|
// NetworkStatusView checks this method every five seconds while showing
|
2018-04-27 21:25:04 +00:00
|
|
|
window.getSocketStatus = function() {
|
|
|
|
return WebSocket.OPEN;
|
|
|
|
};
|
2017-05-18 17:42:20 +00:00
|
|
|
|
2018-04-27 21:25:04 +00:00
|
|
|
Whisper.Fixtures()
|
|
|
|
.saveAll()
|
|
|
|
.then(function() {
|
|
|
|
done();
|
|
|
|
});
|
2016-09-22 23:37:12 +00:00
|
|
|
});
|
2017-05-18 17:42:20 +00:00
|
|
|
|
2016-09-22 23:37:12 +00:00
|
|
|
it('renders', function(done) {
|
2017-10-13 23:48:50 +00:00
|
|
|
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'));
|
2016-09-22 23:37:12 +00:00
|
|
|
|
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'));
|
2016-11-17 16:21:03 +00:00
|
|
|
|
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);
|
2016-09-22 23:37:12 +00:00
|
|
|
});
|
|
|
|
});
|