Skip to content

Commit

Permalink
Release 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
isocra committed Jan 14, 2018
1 parent 58eb558 commit 80300e9
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 1 deletion.
Empty file added .scannerwork/.sonar_lock
Empty file.
7 changes: 7 additions & 0 deletions .scannerwork/report-task.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
organization=isocra
projectKey=TableDnD
serverUrl=https://sonarcloud.io
serverVersion=7.0.0.35052
dashboardUrl=https://sonarcloud.io/dashboard/index/TableDnD
ceTaskId=AWCoUo8vzhfPH6zNRdlG
ceTaskUrl=https://sonarcloud.io/api/ce/task?id=AWCoUo8vzhfPH6zNRdlG
30 changes: 30 additions & 0 deletions __tests__/test.jquery.tablednd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const $ = require('jquery')
window.jQuery = $;
const tableDnD = require('../js/jquery.tablednd');

beforeEach(function() {
document.body.innerHTML =
'<table id="table1">' +
' <thead>' +
' <tr><th>Col1</th></tr>' +
' </thead>' +
' <tbody>' +
' <tr id="row1"><td>Row1</td></tr>' +
' <tr id="row2"><td>Row2</td></tr>' +
' <tr id="row3"><td>Row3</td></tr>' +
'</tbody>';
});

test('Creates a TableDnD table', function() {
var $table = $('#table1');
var table = $table.tableDnD();
expect(table).not.toBeUndefined();
});

test('Simulate drag and drop', function() {
var $table = $('#table1');
var table = $table.tableDnD();
var $row = $('#row1');
TestUtils.Simulate.dragStart($row, {dataTransfer: null});

});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tablednd",
"version": "1.0.2",
"version": "1.0.3",
"description": "JQuery plugin for dragging and droping rows in a table",
"main": "Gruntfile.js",
"dependencies": {},
Expand Down
Empty file added test/test.jquery.tablednd.js
Empty file.

0 comments on commit 80300e9

Please sign in to comment.