awetestlib 0.1.13-x86-mingw32 → 0.1.14-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,10 @@
1
1
  module Awetestlib
2
2
  module Regression
3
+ # Methods for moving and resizing elements, manipulating the mouse, and checking for relative positioning of elements,
4
+ # including overlap, overlay, etc.
5
+ # @note Still experimental. Works with IE but not fully tested with Firefox or Chrome in Windows.
6
+ # Not compatible with Mac
7
+ # Rdoc is work in progress
3
8
  module DragAndDrop
4
9
 
5
10
  def verify_element_inside(inner_element, outer_element, desc = '')
@@ -373,6 +378,16 @@ module Awetestlib
373
378
  alias validate_move verify_resize
374
379
  alias validate_resize verify_resize
375
380
 
381
+ def validate_drag_drop(err, tol, exp, act)
382
+ ary = [false, "failed, expected: #{exp}, actual: #{act}, err: #{err}"]
383
+ if err == 0
384
+ ary = [true, 'succeeded ']
385
+ elsif err.abs <= tol
386
+ ary = [true, "within tolerance (+-#{tol}px) "]
387
+ end
388
+ ary
389
+ end
390
+
376
391
  end
377
392
  end
378
393
  end