mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-11 19:00:00 +01:00
Setup UI testing (#720)
* default sequencer ui test * default step ui test suite * intermediate step ui test * preview ui test suite * url methods test suite * add set url params method test suite * argument call tests * test directory refactor * travis fix
This commit is contained in:
committed by
Jeffrey Warren
parent
8880a580dd
commit
0cd3156c06
22
test/core/modules/brightness.js
Normal file
22
test/core/modules/brightness.js
Normal file
@@ -0,0 +1,22 @@
|
||||
var test = require('tape');
|
||||
require('../../../src/ImageSequencer.js');
|
||||
|
||||
var sequencer1 = ImageSequencer({ ui: false });
|
||||
var options = {brightness : 50};
|
||||
var red = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAAQABADASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAf/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFQEBAQAAAAAAAAAAAAAAAAAABgj/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCdABykX//Z";
|
||||
|
||||
// Test 1 to check brightness module is getting loaded
|
||||
test('Load brightness module', function(t) {
|
||||
sequencer1.loadImages('image1', red);
|
||||
sequencer1.addSteps('brightness', options);
|
||||
t.equal(sequencer1.images.image1.steps[1].options.name, "brightness", "Brightness module is getting loaded.");
|
||||
t.end();
|
||||
});
|
||||
|
||||
// Test 2 to check options are correct
|
||||
test('Check Options', function(t) {
|
||||
sequencer1.loadImages('image1', red);
|
||||
sequencer1.addSteps('brightness', options);
|
||||
t.equal(sequencer1.images.image1.steps[1].options.brightness, 50, "Options are correct");
|
||||
t.end();
|
||||
});
|
||||
Reference in New Issue
Block a user