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:
17
test/fixtures_test.js
Normal file
17
test/fixtures_test.js
Normal 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);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user