testcentricity_web 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d6db7e6ae06547cf4a4548a70c2014c4014460b
4
- data.tar.gz: 2f438c31fc9b50e24c8bafa66eb227317b8c3a72
3
+ metadata.gz: 2219b33acd3c154a1ab761cd6735edec4ab85cb7
4
+ data.tar.gz: 386e29513ad6dc179e43be044fa046e948a5c76e
5
5
  SHA512:
6
- metadata.gz: 19dcf80c2f4db319d20bf2941969065d524929fe33588b6c2e274834dc091166f46a20ac57c8bff62523139976ca2a81ed76f5e2732bf9b662e798dbeac02aea
7
- data.tar.gz: 917233a35773eb150d59f45bcd84e9d0a30b88560bae9ca813578be701a3935e07b0874b74f32bf65c06141bb46984d3791778d2d94aad9da4a4ee079ad05589
6
+ metadata.gz: 5ea2b77ec93411a8ede2b00152241964e51a083f0443730af7767acf6aa994e4ea1bd1e8b11ddd4057b6ae3d2d8c7b17ae18482fcfe35c1522ddf2b6f937ef99
7
+ data.tar.gz: 9ea523e83de287bbbebe41c9f6ba0b9a0cb2f15684b6164431ab512be58a68698c3eb2e788c9d05f7d1246f7dfae424cf7c42e6de595fb00acdc7fa6f7ad8726
@@ -78,7 +78,18 @@ module TestCentricity
78
78
  def double_click
79
79
  obj, _ = find_element
80
80
  object_not_found_exception(obj, nil)
81
- page.driver.browser.mouse.double_click(obj.native)
81
+ page.driver.browser.action.double_click(obj.native).perform
82
+ end
83
+
84
+ # Right-click on an object
85
+ #
86
+ # @example
87
+ # basket_item_image.right_click
88
+ #
89
+ def right_click
90
+ obj, _ = find_element
91
+ object_not_found_exception(obj, nil)
92
+ page.driver.browser.action.context_click(obj.native).perform
82
93
  end
83
94
 
84
95
  # Click at a specific location within an object
@@ -289,6 +300,15 @@ module TestCentricity
289
300
  obj.drag_by(right_offset, down_offset)
290
301
  end
291
302
 
303
+ def drag_and_drop(target, right_offset = nil, down_offset = nil)
304
+ source, _ = find_element
305
+ object_not_found_exception(source, nil)
306
+ page.driver.browser.action.click_and_hold(source.native).perform
307
+ sleep(0.5)
308
+ target_drop, _ = target.find_element
309
+ page.driver.browser.action.move_to(target_drop.native, right_offset.to_i, down_offset.to_i).release.perform
310
+ end
311
+
292
312
  def get_attribute(attrib)
293
313
  obj, _ = find_element
294
314
  object_not_found_exception(obj, nil)
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - A.J. Mrozinski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-12 00:00:00.000000000 Z
11
+ date: 2016-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler