Add test fixtures

Test page loads fixtures and renders the inbox view. This may be useful
for smoke testing style changes or generating screenshots with
pseudo-realistic data.

Includes a couple small changes to get rendering working outside the
app.
This commit is contained in:
lilia 2016-09-22 16:37:12 -07:00
parent 89cd40c1f5
commit b0c59233f3
5 changed files with 3150 additions and 90 deletions

17
test/fixtures_test.js Normal file
View file

@ -0,0 +1,17 @@
'use strict';
describe("Fixtures", function() {
before(function(done) {
Whisper.Fixtures.saveAll().then(done);
});
it('renders', function(done) {
ConversationController.updateInbox().then(function() {
var view = new Whisper.InboxView({appWindow: {contentWindow: window}});
view.$el.prependTo($('#render-android'));
var view = new Whisper.InboxView({appWindow: {contentWindow: window}});
view.$el.removeClass('android').addClass('ios');
view.$el.prependTo($('#render-ios'));
}).then(done,done);
});
});