File: issues.js

package info (click to toggle)
libjs-jquery-colorpicker 1.2.8-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 648 kB
  • sloc: makefile: 2
file content (24 lines) | stat: -rw-r--r-- 665 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
module('issues');

test('#94: Clicking black swatch on empty input does not change input', function() {
	expect(4);

	var $input = $('<input type="text" value=""/>').appendTo("#qunit-fixture");
	var jqcp = $input.colorpicker({
		parts: ['swatches']
	});
	
	equal($input.val(), '', 'Starts empty');
	
	jqcp.colorpicker('open');
	equal($input.val(), '', 'Still empty on open');
	
	$('.ui-colorpicker-swatch[title="white"]').click();
	equal($input.val(), 'ffffff', 'Clicking white, input white');
	
	$input.val('');
	$('.ui-colorpicker-swatch[title="black"]').click();
	equal($input.val(), '000000', 'Clicking black, input black (remains empty in issue #94).');
});