Permalink
Browse files

Update: Unit test updated for the mData name change from mDataProp. N…

…ote that a number of tests to test the backwards compability of mDataProp!
  • Loading branch information...
1 parent d155f7a commit f03c670cf92c469779b99a7622d14e68e28c5447 @DataTables committed Jun 29, 2012
Showing with 1,770 additions and 820 deletions.
  1. +103 −0 media/unit_testing/tests_onhold/1_dom/5396-fnUpdate-arrays-mData.js
  2. +5 −5 media/unit_testing/tests_onhold/5_ajax_objects/_zero_config.js
  3. +3 −3 media/unit_testing/tests_onhold/5_ajax_objects/_zero_config_arrays_subobjects.js
  4. +5 −5 media/unit_testing/tests_onhold/5_ajax_objects/_zero_config_deep.js
  5. +847 −0 media/unit_testing/tests_onhold/5_ajax_objects/_zero_config_mDataProp.js
  6. +1 −1 media/unit_testing/tests_onhold/5_ajax_objects/_zero_config_null_source.js
  7. +5 −5 media/unit_testing/tests_onhold/5_ajax_objects/_zero_config_objects.js
  8. +5 −5 media/unit_testing/tests_onhold/5_ajax_objects/_zero_config_objects_subarrays.js
  9. +70 −70 media/unit_testing/tests_onhold/5_ajax_objects/aaSorting.js
  10. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/aaSortingFixed.js
  11. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bSearchable.js
  12. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bSortable.js
  13. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bUseRendered.js
  14. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bVisible.js
  15. +31 −31 media/unit_testing/tests_onhold/5_ajax_objects/aoColumns.fnRender.js
  16. +10 −10 media/unit_testing/tests_onhold/5_ajax_objects/aoColumns.iDataSort.js
  17. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sClass.js
  18. +5 −5 media/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sName.js
  19. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sTitle.js
  20. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sWidth.js
  21. +30 −30 media/unit_testing/tests_onhold/5_ajax_objects/aoSearchCols.js
  22. +20 −20 media/unit_testing/tests_onhold/5_ajax_objects/asStripClasses.js
  23. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/bAutoWidth.js
  24. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/bFilter.js
  25. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/bInfo.js
  26. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/bLengthChange.js
  27. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/bPaginate.js
  28. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/bProcessing.js
  29. +5 −5 media/unit_testing/tests_onhold/5_ajax_objects/bServerSide.js
  30. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/bSort.js
  31. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/bSortClasses.js
  32. +20 −20 media/unit_testing/tests_onhold/5_ajax_objects/fnDrawCallback.js
  33. +45 −45 media/unit_testing/tests_onhold/5_ajax_objects/fnHeaderCallback.js
  34. +25 −25 media/unit_testing/tests_onhold/5_ajax_objects/fnInitComplete.js
  35. +30 −30 media/unit_testing/tests_onhold/5_ajax_objects/fnRowCallback.js
  36. +20 −20 media/unit_testing/tests_onhold/5_ajax_objects/fnServerData.js
  37. +20 −20 media/unit_testing/tests_onhold/5_ajax_objects/iDisplayLength.js
  38. +10 −10 media/unit_testing/tests_onhold/5_ajax_objects/oLanguage.oPaginate.js
  39. +35 −35 media/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sInfo.js
  40. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sInfoEmpty.js
  41. +20 −20 media/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sInfoPostFix.js
  42. +20 −20 media/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sLengthMenu.js
  43. +10 −10 media/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sProcessing.js
  44. +15 −15 media/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sSearch.js
  45. +10 −10 media/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sUrl.js
  46. +10 −10 media/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sZeroRecords.js
  47. +30 −30 media/unit_testing/tests_onhold/5_ajax_objects/oSearch.js
  48. +5 −5 media/unit_testing/tests_onhold/5_ajax_objects/sAjaxSource.js
  49. +35 −35 media/unit_testing/tests_onhold/5_ajax_objects/sDom.js
  50. +10 −10 media/unit_testing/tests_onhold/5_ajax_objects/sPaginationType.js
@@ -0,0 +1,103 @@
+// DATA_TEMPLATE: empty_table
+oTest.fnStart( "5396 - fnUpdate with 2D arrays for a single row" );
+
+$(document).ready( function () {
+ $('#example thead tr').append( '<th>6</th>' );
+ $('#example thead tr').append( '<th>7</th>' );
+ $('#example thead tr').append( '<th>8</th>' );
+ $('#example thead tr').append( '<th>9</th>' );
+ $('#example thead tr').append( '<th>10</th>' );
+
+ var aDataSet = [
+ [
+ "1",
+ "홍길동",
+ "1154315",
+ "etc1",
+ [
+ [ "test1@daum.net", "2011-03-04" ],
+ [ "test1@naver.com", "2009-07-06" ],
+ [ "test4@naver.com", ",hide" ],
+ [ "test5?@naver.com", "" ]
+ ],
+ "2011-03-04",
+ "show"
+ ],
+ [
+ "2",
+ "홍길순",
+ "2154315",
+ "etc2",
+ [
+ [ "test2@daum.net", "2009-09-26" ],
+ [ "test2@naver.com", "2009-05-21,hide" ],
+ [ "lsb@naver.com", "2010-03-05" ],
+ [ "lsb3@naver.com", ",hide" ],
+ [ "sooboklee9@daum.net", "2010-03-05" ]
+ ],
+ "2010-03-05",
+ "show"
+ ]
+]
+
+ var oTable = $('#example').dataTable({
+ "aaData": aDataSet,
+ "aoColumns": [
+ { "mData": "0"},
+ { "mData": "1"},
+ { "mData": "2"},
+ { "mData": "3"},
+ { "mData": "4.0.0"},
+ { "mData": "4.0.1"},
+ { "mData": "4.1.0"},
+ { "mData": "4.1.1"},
+ { "mData": "5"},
+ { "mData": "6"}
+ ]
+ });
+
+
+ oTest.fnTest(
+ "Initialisation",
+ null,
+ function () {
+ return $('#example tbody tr:eq(0) td:eq(0)').html() == '1';
+ }
+ );
+
+ oTest.fnTest(
+ "Update row",
+ function () {
+ $('#example').dataTable().fnUpdate( [
+ "0",
+ "홍길순",
+ "2154315",
+ "etc2",
+ [
+ [ "test2@daum.net", "2009-09-26" ],
+ [ "test2@naver.com", "2009-05-21,hide" ],
+ [ "lsb@naver.com", "2010-03-05" ],
+ [ "lsb3@naver.com", ",hide" ],
+ [ "sooboklee9@daum.net", "2010-03-05" ]
+ ],
+ "2010-03-05",
+ "show"
+ ], 1 );
+ },
+ function () {
+ return $('#example tbody tr:eq(0) td:eq(0)').html() == '0';
+ }
+ );
+
+ oTest.fnTest(
+ "Original row preserved",
+ null,
+ function () {
+ return $('#example tbody tr:eq(1) td:eq(0)').html() == '1';
+ }
+ );
+
+
+
+ oTest.fnComplete();
+} );
@@ -22,11 +22,11 @@ oTest.fnTest(
$(document).ready( function () {
var oInit = {
"aoColumns": [
- { "mDataProp": "engine" },
- { "mDataProp": "browser" },
- { "mDataProp": "platform" },
- { "mDataProp": "version" },
- { "mDataProp": "grade" }
+ { "mData": "engine" },
+ { "mData": "browser" },
+ { "mData": "platform" },
+ { "mData": "version" },
+ { "mData": "grade" }
],
"aaData": [
{
@@ -24,9 +24,9 @@ $(document).ready( function () {
"aoColumns": [
null,
null,
- { "mDataProp": 2 },
- { "mDataProp": "3.version" },
- { "mDataProp": "3.grade" }
+ { "mData": 2 },
+ { "mData": "3.version" },
+ { "mData": "3.grade" }
],
"aaData": [
[
@@ -22,11 +22,11 @@ oTest.fnTest(
$(document).ready( function () {
var oInit = {
"aoColumns": [
- { "mDataProp": "engine" },
- { "mDataProp": "browser" },
- { "mDataProp": "platform.inner" },
- { "mDataProp": "platform.details.0" },
- { "mDataProp": "platform.details.1" }
+ { "mData": "engine" },
+ { "mData": "browser" },
+ { "mData": "platform.inner" },
+ { "mData": "platform.details.0" },
+ { "mData": "platform.details.1" }
],
"aaData": [
{
Oops, something went wrong.

0 comments on commit f03c670

Please sign in to comment.