test_utils 0.2.2 → 0.2.3
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/test_utils/browser_tests/web_helper.rb +5 -5
- data/lib/test_utils/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7aca064a3ec4029aaf3499c6bba2d63eee99719
|
4
|
+
data.tar.gz: c2f4ab39f1d20187826c3d375b12efbe8ffc180f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13944305e121c9b994b84ea4cb24d224f20f8580ff703a638b5058589125dfe63311506e144cb0a3c319ebff2edef18aa1e872fbc3a9c4e9e91b626a0d1390b8
|
7
|
+
data.tar.gz: 22b18eac3dc6ef9f530a626baf6a1dee0da1f07ebdecb83cac507976de89145f6758f494ac2f23f7bfd4a7f603276270c839082a0c436e310c839297502f7e93
|
@@ -78,7 +78,7 @@ module WebHelper
|
|
78
78
|
# Wait until an element is visible
|
79
79
|
# Waits for presence and then waits for visibility
|
80
80
|
# Note: Use on watir elements
|
81
|
-
def wait_until_visible(element, timeout
|
81
|
+
def wait_until_visible(element, timeout: 15)
|
82
82
|
begin
|
83
83
|
element.wait_until_present(timeout)
|
84
84
|
rescue Watir::Wait::TimeoutError
|
@@ -94,7 +94,7 @@ module WebHelper
|
|
94
94
|
# Clicks when an element is visible
|
95
95
|
# Waits for visibility (wait_until_visible) and then clicks on element
|
96
96
|
# Note: Use on watir elements
|
97
|
-
def click_when_visible(element, timeout
|
97
|
+
def click_when_visible(element, timeout: 15)
|
98
98
|
wait_until_visible(element, timeout)
|
99
99
|
element.click
|
100
100
|
end
|
@@ -102,7 +102,7 @@ module WebHelper
|
|
102
102
|
# Wait until an element is visible
|
103
103
|
# Waits for visibility
|
104
104
|
# Note: Use on page object elements
|
105
|
-
def wait_until_visible_po(element, timeout
|
105
|
+
def wait_until_visible_po(element, timeout: 15)
|
106
106
|
begin
|
107
107
|
Watir::Wait.until(timeout) {element.visible?}
|
108
108
|
rescue Watir::Wait::TimeoutError
|
@@ -113,7 +113,7 @@ module WebHelper
|
|
113
113
|
# Wait until an element is NOT visible
|
114
114
|
# Waits for !visibility
|
115
115
|
# Note: Use on page object elements
|
116
|
-
def wait_until_not_visible_po(element, timeout
|
116
|
+
def wait_until_not_visible_po(element, timeout: 15)
|
117
117
|
begin
|
118
118
|
Watir::Wait.until(timeout) {!element.visible?}
|
119
119
|
rescue Watir::Wait::TimeoutError
|
@@ -124,7 +124,7 @@ module WebHelper
|
|
124
124
|
# Clicks when an element is visible
|
125
125
|
# Waits for visibility (wait_until_visible_po) and then clicks on element
|
126
126
|
# Note: Use on page object elements
|
127
|
-
def click_when_visible_po(element, timeout
|
127
|
+
def click_when_visible_po(element, timeout: 15)
|
128
128
|
element.when_visible(timeout).click
|
129
129
|
end
|
130
130
|
|
data/lib/test_utils/version.rb
CHANGED