EXPERIMENTAL: dojo.robot -- APIs subject to change without notice.
EXPERIMENTAL: dojo.robotx -- APIs subject to change without notice.
EXPERIMENTAL: dijit.robotx -- APIs subject to change without notice.
3 tests to run in 1 groups
------------------------------------------------------------
GROUP "test_dnd_acceptance" has 3 tests to run
Error: robot not available; skipping test.
ERROR IN: function(){ // Tries to drag and drop an item between two dnd // area : // - Item's type : 1 // - Drop area accept types : 1 & 2 // -> In this case, drop is accepted var d = new doh.Deferred(); var areaType1 = dojo.query('.dndArea[accept=type1]')[0]; var areaTypeAll = dojo.query('.dndArea[accept*=type1][accept*=type2]')[0]; var itemType1 = dojo.query('.dndItem[dndType=type1] > .dragHandle')[0]; var itemTypeAll = dojo.query('.dndItem[dndType*=type1][dndType*=type2] > .dragHandle')[0]; var sizeA = areaType1.childNodes.length; var sizeB = areaTypeAll.childNodes.length; doh.robot.mouseMoveAt(itemType1,200); doh.robot.mousePress({left:true}, 200); doh.robot.mouseMoveAt(areaTypeAll,200); doh.robot.mouseRelease({left:true}, 200); doh.robot.sequence(function(){ try{ doh.assertEqual(areaTypeAll.childNodes.length, sizeB + 1, "An item should be drop on third area."); doh.assertEqual(areaType1.childNodes.length, sizeA - 1, "An item should be remove from first area"); d.callback(true); } catch(e){ d.errback(e); } }, 200); return d; }
FAILED test: dropAccepted 3 ms
Error: robot not available; skipping test.
ERROR IN: function(){ // Tries to drag and drop an item between two dnd area. // - Item's type : 1 & 2 // - Drop area accept type : 2 // -> In this case, drop is accepted var d = new doh.Deferred(); var areaType2 = dojo.query('.dndArea[accept=type2]')[0]; var areaTypeAll = dojo.query('.dndArea[accept*=type1][accept*=type2]')[0]; var itemTypeAll = dojo.query('.dndItem[dndType*=type1][dndType*=type2] > .dragHandle')[0]; var sizeA = areaTypeAll.childNodes.length; var sizeB = areaType2.childNodes.length; doh.robot.mouseMoveAt(itemTypeAll, 200); doh.robot.mousePress({left:true}, 200); doh.robot.mouseMoveAt(areaType2, 200); doh.robot.mouseRelease({left:true}, 200); doh.robot.sequence(function(){ try{ doh.assertEqual(areaType2.childNodes.length, sizeB + 1, "An item should be drop on second area."); doh.assertEqual(areaTypeAll.childNodes.length, sizeA - 1, "An item should be remove from third area."); d.callback(true); }catch(e){ d.errback(e); } }, 200); return d; }
FAILED test: dropAccepted2 1 ms
Error: robot not available; skipping test.
ERROR IN: function(){ // Tries to drag and drop an item between two dnd area. // - Item's type : 1 // - Drop area accept type : 2 // -> In this case, drop is refused var d = new doh.Deferred(); var areaType2 = dojo.query('.dndArea[accept=type2]')[0]; var areaTypeAll = dojo.query('.dndArea[accept*=type1][accept*=type2]')[0]; var itemType1 = dojo.query('.dndItem[dndType=type1] > .dragHandle')[0]; var sizeA = areaType2.childNodes.length; var sizeB = areaTypeAll.childNodes.length; doh.robot.mouseMoveAt(itemType1, 200); doh.robot.mousePress({left:true}, 200); doh.robot.mouseMoveAt(areaType2, 200); doh.robot.mouseRelease({left:true}, 200); doh.robot.sequence(function(){ try{ doh.assertEqual(areaType2.childNodes.length, sizeA, "No change !"); doh.assertEqual(areaTypeAll.childNodes.length, sizeB, "No change !"); d.callback(true); }catch(e){ d.errback(e); } }, 200); return d; }
FAILED test: refused 1 ms
Total time for GROUP " test_dnd_acceptance " is 5ms
Total time for GROUP " test_dnd_acceptance " is 5ms
WOOHOO!!
------------------------------------------------------------
| TEST SUMMARY:
------------------------------------------------------------
3 tests in 1 groups
3 errors
0 failures