Sha256: a34929f95f1ca176954df117ebd17e20c604e1933b7fdcec79ae8a946747cb59

Contents?: true

Size: 1.57 KB

Versions: 28

Compression:

Stored size: 1.57 KB

Contents

// DATA_TEMPLATE: js_data
oTest.fnStart( "iDisplayLength" );

$(document).ready( function () {
	/* Check the default */
	$('#example').dataTable( {
		"aaData": gaaData
	} );
	
	oTest.fnTest( 
		"Default length is ten",
		null,
		function () { return $('#example tbody tr').length == 10; }
	);
	
	oTest.fnTest( 
		"Select menu shows 10",
		null,
		function () { return $('#example_length select').val() == 10; }
	);
	
	
	oTest.fnTest( 
		"Set initial length to 25",
		function () {
			oSession.fnRestore();
			$('#example').dataTable( {
				"aaData": gaaData,
				"iDisplayLength": 25
			} );
		},
		function () { return $('#example tbody tr').length == 25; }
	);
	
	oTest.fnTest( 
		"Select menu shows 25",
		null,
		function () { return $('#example_length select').val() == 25; }
	);
	
	
	oTest.fnTest( 
		"Set initial length to 100",
		function () {
			oSession.fnRestore();
			$('#example').dataTable( {
				"aaData": gaaData,
				"iDisplayLength": 100
			} );
		},
		function () { return $('#example tbody tr').length == 57; }
	);
	
	oTest.fnTest( 
		"Select menu shows 25",
		null,
		function () { return $('#example_length select').val() == 100; }
	);
	
	
	oTest.fnTest( 
		"Set initial length to 23 (unknown select menu length)",
		function () {
			oSession.fnRestore();
			$('#example').dataTable( {
				"aaData": gaaData,
				"iDisplayLength": 23
			} );
		},
		function () { return $('#example tbody tr').length == 23; }
	);
	
	oTest.fnTest( 
		"Select menu shows 10 (since 23 is unknow)",
		null,
		function () { return $('#example_length select').val() == 10; }
	);
	
	
	oTest.fnComplete();
} );

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
classiccms-0.7.5 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.7.4 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.7.3 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.7.2 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.7.1 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.7.0 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.6.9 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.6.8 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.6.7 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.6.6 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.6.5 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.6.4 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.6.3 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.6.2 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.6.1 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.6.0 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.5.17 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.5.16 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.5.15 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js
classiccms-0.5.14 lib/classiccms/public/admin/datatables/unit_testing/tests_onhold/2_js/iDisplayLength.js