Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
39
gaia/apps/camera/test/unit/views/timer_test.js
Executable file
39
gaia/apps/camera/test/unit/views/timer_test.js
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
suite('views/countdown', function() {
|
||||
'use strict';
|
||||
|
||||
suiteSetup(function(done) {
|
||||
var self = this;
|
||||
requirejs(['views/countdown'], function(CountdownView) {
|
||||
self.CountdownView = CountdownView;
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
setup(function() {
|
||||
this.countdown = new this.CountdownView();
|
||||
this.countdown.emit = sinon.spy();
|
||||
});
|
||||
|
||||
suite('CountdownView#set()', function() {
|
||||
test('Should update the text content of the counter', function() {
|
||||
this.countdown.set(1000);
|
||||
assert.ok(this.countdown.el.innerHTML.indexOf(1000) > -1);
|
||||
});
|
||||
});
|
||||
|
||||
suite('CountdownView#reset()', function() {
|
||||
test('Should clear the countdown text', function() {
|
||||
this.countdown.set(1000);
|
||||
assert.isTrue(this.countdown.el.innerHTML.indexOf('1000') > -1);
|
||||
this.countdown.reset();
|
||||
assert.isFalse(this.countdown.el.innerHTML.indexOf('1000') > -1);
|
||||
});
|
||||
|
||||
test('Should remove `immanent` class', function() {
|
||||
this.countdown.setImmanent(true);
|
||||
assert.isTrue(this.countdown.el.classList.contains('immanent'));
|
||||
this.countdown.reset();
|
||||
assert.isFalse(this.countdown.el.classList.contains('immanent'));
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue