calabash_steps 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/steps.rb +36 -9
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50fcf6dda0a3b559f04c643aca003cde740e1329
|
4
|
+
data.tar.gz: 3c953f571df3431e13c3e9a250b6a0f9aa33cf83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbfcb5deb53e4b234356acd658babea147c3cad2473c869f781c04f34a9ec21f17bebe9ce8b8e89bae45838372a9d18da7f3c4bdf4c2b9e418cdba67a31a0d65
|
7
|
+
data.tar.gz: 6ff89209acbad20d18bb1cf9c3174c6ac4399407ac7b34216af604c3799afc4f7768cc06a1eea01ad02754ff9fa286143806faa1742bda1a572ae52ffc93cb09
|
data/lib/steps.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
class Steps
|
2
2
|
|
3
3
|
def scroll_to_element(label)
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
wait_poll({:timeout_message => "There's no '#{label}' on screen. Tired of scrolling. Will go drink some coffee'",
|
5
|
+
:until_exists => "label text:'#{label}'",
|
6
|
+
:timeout => 3}) do
|
7
|
+
scroll("tableView", :down)
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
@@ -15,13 +15,11 @@ class Steps
|
|
15
15
|
def swipe_with_no_delta(direction)
|
16
16
|
#up, down, left, right
|
17
17
|
swipe :"#{direction}", swipe_opt = {:'swipe-delta' => {} }
|
18
|
-
|
18
|
+
wait_for_none_animating
|
19
19
|
end
|
20
20
|
|
21
|
-
def check_ios_version
|
22
|
-
|
23
|
-
#your wonderful code here
|
24
|
-
end
|
21
|
+
def check_ios_version
|
22
|
+
server_version['iOS_version'].to_i
|
25
23
|
end
|
26
24
|
|
27
25
|
def is_disabled(button)
|
@@ -42,4 +40,33 @@ class Steps
|
|
42
40
|
screenshot_and_raise("Keyboard is not presented")
|
43
41
|
end
|
44
42
|
end
|
43
|
+
|
44
|
+
def hide_keyboard
|
45
|
+
query("view isFirstResponder:1", :resignFirstResponder)
|
46
|
+
end
|
47
|
+
|
48
|
+
def check_ui_element_label(ui_element, label)
|
49
|
+
query ("#{ui_element} marked:'#{label}'")
|
50
|
+
end
|
51
|
+
|
52
|
+
def touch_ui_element_text(ui_element, text)
|
53
|
+
touch ("#{ui_element} marked:'#{text}'")
|
54
|
+
end
|
55
|
+
|
56
|
+
def wait_for_ui_element_text(ui_element, text)
|
57
|
+
wait_for_element_exists ("#{ui_element} marked:'#{text}'")
|
58
|
+
end
|
59
|
+
|
60
|
+
def count_number_ui_elements(ui_element)
|
61
|
+
query("#{ui_element}").count
|
62
|
+
end
|
63
|
+
|
64
|
+
#workaround for situation when touching input field is required
|
65
|
+
def enter_text_to_field(text, field)
|
66
|
+
puts "I'm going to touch #{field} label"
|
67
|
+
field.to_s.start_with?("UI") ? touch("#{field}") : touch("* marked:'#{field}'")
|
68
|
+
wait_for_keyboard
|
69
|
+
keyboard_enter_text text
|
70
|
+
end
|
71
|
+
|
45
72
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calabash_steps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airness
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Custom Calabash Steps
|
14
14
|
email: airnes@me.com
|
@@ -27,12 +27,12 @@ require_paths:
|
|
27
27
|
- lib
|
28
28
|
required_ruby_version: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
30
|
-
- -
|
30
|
+
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '0'
|
33
33
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
34
|
requirements:
|
35
|
-
- -
|
35
|
+
- - ">="
|
36
36
|
- !ruby/object:Gem::Version
|
37
37
|
version: '0'
|
38
38
|
requirements: []
|