2013-05-25 01:35:57 +00:00
|
|
|
|
|
|
|
|
(function(g,$) {
|
|
|
|
|
|
|
|
|
|
describe("faderHelpers tests", function() {
|
|
|
|
|
|
|
|
|
|
beforeEach(function() {
|
2013-11-03 20:55:55 +00:00
|
|
|
JKTestUtils.loadFixtures('/app/views/clients/_faders.html.erb');
|
|
|
|
|
JKTestUtils.loadFixtures('/spec/javascripts/fixtures/faders.htm');
|
2013-05-25 01:35:57 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe("renderVU", function() {
|
|
|
|
|
|
|
|
|
|
describe("with defaults", function() {
|
|
|
|
|
it("should add vertical fader to selector", function() {
|
|
|
|
|
JK.FaderHelpers.renderFader('#fader', {faderId:'a'});
|
2015-07-15 15:04:45 +00:00
|
|
|
$fader = $('#fader div[data-control="fader"]');
|
2013-05-25 01:35:57 +00:00
|
|
|
orientation = $fader.attr('orientation');
|
|
|
|
|
expect($fader.length).toEqual(1);
|
|
|
|
|
expect(orientation).toEqual('vertical');
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe("horizontal", function() {
|
|
|
|
|
it("should add horizontal fader to selector", function() {
|
|
|
|
|
JK.FaderHelpers.renderFader('#fader', {faderId:'a',faderType: "horizontal"});
|
2015-07-15 15:04:45 +00:00
|
|
|
$fader = $('#fader div[data-control="fader"]');
|
2013-05-25 01:35:57 +00:00
|
|
|
orientation = $fader.attr('orientation');
|
|
|
|
|
expect($fader.length).toEqual(1);
|
|
|
|
|
expect(orientation).toEqual('horizontal');
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
})(window, jQuery);
|