test-harness 0.4.11 → 0.4.12
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.
- data/VERSION +1 -1
- data/lib/configuration.rb +1 -1
- data/lib/ui_component_helper.rb +12 -0
- data/test-harness.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.12
|
data/lib/configuration.rb
CHANGED
data/lib/ui_component_helper.rb
CHANGED
@@ -40,6 +40,14 @@ class TestHarness
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
+
def wait_for_ajax
|
44
|
+
start_time = Time.now
|
45
|
+
until page.evaluate_script('jQuery.isReady&&jQuery.active==0') or (start_time + ajax_timeout) < Time.now do
|
46
|
+
sleep 1
|
47
|
+
end
|
48
|
+
yield if block_given?
|
49
|
+
end
|
50
|
+
|
43
51
|
# Since Kernel#select is defined, we have to override it specifically here.
|
44
52
|
def select(*args, &block)
|
45
53
|
browser.within(component.within) do
|
@@ -109,5 +117,9 @@ class TestHarness
|
|
109
117
|
def server_host
|
110
118
|
configuration.server_host || Capybara.default_host || 'http://example.com'
|
111
119
|
end
|
120
|
+
|
121
|
+
def ajax_timeout
|
122
|
+
(configuration.ajax_timeout || 5).to_i.seconds
|
123
|
+
end
|
112
124
|
end
|
113
125
|
end
|
data/test-harness.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "test-harness"
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.12"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Maher Hawash"]
|
12
|
-
s.date = "2013-04-
|
12
|
+
s.date = "2013-04-25"
|
13
13
|
s.description = "A test harness for rspec and cucumber which allows for separating responsibility between setting up the context and interacting with the browser, and cleaning up the step definition files."
|
14
14
|
s.email = "gmhawash@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test-harness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -146,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
146
146
|
version: '0'
|
147
147
|
segments:
|
148
148
|
- 0
|
149
|
-
hash: -
|
149
|
+
hash: -164941201530053683
|
150
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
151
|
none: false
|
152
152
|
requirements:
|