<commit_before>steal('funcunit',function(){

module("dragtable", { 
	setup: function(){
		S.open("demo.htm");
	}
});

test("dragtable test", function(){
	/*
	 * drag col change
	 */
	S('#one th[data-header=first_name]').drag('+100 +0', function(){
		ok( S('#one th[data-header=last_name]').next().attr('data-header') == 'first_name', 'order changed')
	})
	//reverse
	S('#one th[data-header=first_name]').drag('-150 +0', function(){
		ok( S('#one th[data-header=first_name]').next().attr('data-header') == 'last_name', ' reverse order changed')
	})
	
	/*
	 * check table boundary
	 */
	S('#one th[data-header=color]').drag('-500 +0', function(){
		ok( S('#one th:first').attr('data-header') == 'id', 'cant be dragged past boundary')
		
		ok( S('#one th:first').next().attr('data-header') == 'color', 'tried to drag past boundary, is next to it')
	})
	
	
	/*
	 * handle
	 */
	S('#one th[data-header=phone_number] .dragtable-drag-handle').drag('-500 +0', function(){
		ok( S('#one th:first').attr('data-header') == 'id', 'cant be dragged past boundary')
		
		ok( S('#one th:first').next().attr('data-header') == 'phone_number', 'tried to drag past boundary, is next to it')
	})
	
	
	/*
	 * parent offset scroll
	 */
	
	
});


});<commit_msg>added test for notdraggable<commit_after>steal('funcunit',function(){

module("dragtable", { 
	setup: function(){
		S.open("demo.htm");
	}
});

test("dragtable test", function(){
	/*
	 * drag col change
	 */
	S('#one th[data-header=first_name]').drag('+100 +0', function(){
		ok( S('#one th[data-header=last_name]').next().attr('data-header') == 'first_name', 'order changed')
	})
	//reverse
	S('#one th[data-header=first_name]').drag('-150 +0', function(){
		ok( S('#one th[data-header=first_name]').next().attr('data-header') == 'last_name', ' reverse order changed')
	})
	
	/*
	 * check table boundary
	 */
	S('#one th[data-header=color]').drag('-500 +0', function(){
		ok( S('#one th:first').attr('data-header') == 'id', 'cant be dragged past boundary')
		
		ok( S('#one th:first').next().attr('data-header') == 'color', 'tried to drag past boundary, is next to it')
	})
	
	
	/*
	 * handle
	 */
	S('#one th[data-header=phone_number] .dragtable-drag-handle').drag('-500 +0', function(){
		ok( S('#one th:first').attr('data-header') == 'id', 'cant be dragged past boundary')
		
		ok( S('#one th:first').next().attr('data-header') == 'phone_number', 'tried to drag past boundary, is next to it')
	})
	/*
	 * cant be dragged 
	 * notdraggable
	 */
	var notdraggablePrevHeader = 'last_name';
	S('#one th[data-header=salary]').drag('-500 +0', function(){
		ok( S('#one th[data-header=salary]').prev().attr('data-header') == 'last_name', 'notdraggable cant be dragged')
		
		
	})
	
	/*
	 * parent offset scroll
	 */
	
	
});


});
{'fraction_non_alphanumeric': 0.2366136034732272, 'fraction_numerical': 0.013024602026049204, 'mean_word_length': 4.276717557251908, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7345093', 'n_tokens_mistral': 1056, 'n_tokens_neox': 961, 'n_words': 208}