blob: bbcd6b1a9a73b6984f7523771fd050cf5617a36b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/* global Pixelated */
describeComponent('mail_view/ui/draft_save_status', function () {
'use strict';
beforeEach(setupComponent);
it('should be empty on initialization', function() {
expect(this.$node.text()).toBe('');
});
it('should display status when saving a draft', function() {
$(document).trigger(Pixelated.events.mail.saveDraft);
expect(this.$node.text()).toBe('Saving to Drafts...');
});
it('should display status when draft is saved', function() {
$(document).trigger(Pixelated.events.mail.draftSaved);
expect(this.$node.text()).toBe('Draft Saved.');
});
it('should reset status when mail is changed since last save', function() {
$(document).trigger(Pixelated.events.ui.mail.changedSinceLastSave);
expect(this.$node.text()).toBe('');
});
});
|