2016-09-22 23:37:12 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
describe("Fixtures", function() {
|
|
|
|
before(function(done) {
|
2017-05-18 17:42:20 +00:00
|
|
|
// NetworkStatusView checks this method every five seconds while showing
|
|
|
|
window.getSocketStatus = function() { return WebSocket.OPEN; };
|
|
|
|
|
2016-09-24 03:15:47 +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-09-07 01:18:46 +00:00
|
|
|
ConversationController.loadPromise().then(function() {
|
2017-05-18 18:10:25 +00:00
|
|
|
var view = new Whisper.InboxView({window: window});
|
2017-07-25 01:43:35 +00:00
|
|
|
view.onEmpty();
|
2016-09-22 23:37:12 +00:00
|
|
|
view.$el.prependTo($('#render-android'));
|
|
|
|
|
2017-05-18 18:10:25 +00:00
|
|
|
var view = new Whisper.InboxView({window: window});
|
2016-09-22 23:37:12 +00:00
|
|
|
view.$el.removeClass('android').addClass('ios');
|
2017-07-25 01:43:35 +00:00
|
|
|
view.onEmpty();
|
2016-09-22 23:37:12 +00:00
|
|
|
view.$el.prependTo($('#render-ios'));
|
2016-11-17 16:21:03 +00:00
|
|
|
|
2017-05-18 18:10:25 +00:00
|
|
|
var view = new Whisper.InboxView({window: window});
|
2016-11-17 16:21:03 +00:00
|
|
|
view.$el.removeClass('android').addClass('android-dark');
|
2017-07-25 01:43:35 +00:00
|
|
|
view.onEmpty();
|
2016-11-17 16:21:03 +00:00
|
|
|
view.$el.prependTo($('#render-android-dark'));
|
2017-05-18 17:42:20 +00:00
|
|
|
}).then(done, done);
|
2016-09-22 23:37:12 +00:00
|
|
|
});
|
|
|
|
});
|