Conversation: store lastMessage/lastMessageStatus in memory only
parent
f39a96bc76
commit
61f7b8360b
@ -1,32 +1,26 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
describe('Fixtures', function() {
|
describe('Fixtures', function() {
|
||||||
before(function(done) {
|
before(function() {
|
||||||
// NetworkStatusView checks this method every five seconds while showing
|
// NetworkStatusView checks this method every five seconds while showing
|
||||||
window.getSocketStatus = function() {
|
window.getSocketStatus = function() {
|
||||||
return WebSocket.OPEN;
|
return WebSocket.OPEN;
|
||||||
};
|
};
|
||||||
|
|
||||||
Whisper.Fixtures()
|
|
||||||
.saveAll()
|
|
||||||
.then(function() {
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('renders', function(done) {
|
it('renders', async () => {
|
||||||
|
await Whisper.Fixtures().saveAll();
|
||||||
|
|
||||||
ConversationController.reset();
|
ConversationController.reset();
|
||||||
ConversationController.load()
|
await ConversationController.load();
|
||||||
.then(function() {
|
|
||||||
var view = new Whisper.InboxView({ window: window });
|
var view = new Whisper.InboxView({ window: window });
|
||||||
view.onEmpty();
|
view.onEmpty();
|
||||||
view.$el.prependTo($('#render-light-theme'));
|
view.$el.prependTo($('#render-light-theme'));
|
||||||
|
|
||||||
var view = new Whisper.InboxView({ window: window });
|
var view = new Whisper.InboxView({ window: window });
|
||||||
view.$el.removeClass('light-theme').addClass('dark-theme');
|
view.$el.removeClass('light-theme').addClass('dark-theme');
|
||||||
view.onEmpty();
|
view.onEmpty();
|
||||||
view.$el.prependTo($('#render-dark-theme'));
|
view.$el.prependTo($('#render-dark-theme'));
|
||||||
})
|
|
||||||
.then(done, done);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue