spreewald 1.2.6 → 1.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/lib/spreewald/web_steps.rb +3 -3
- data/lib/spreewald_support/custom_matchers.rb +4 -5
- data/lib/spreewald_support/mail_finder.rb +13 -1
- data/lib/spreewald_support/version.rb +1 -1
- data/lib/spreewald_support/web_steps_helpers.rb +3 -3
- data/tests/rails-3.2/capybara-1/Gemfile.lock +1 -1
- data/tests/rails-3.2/capybara-2/Gemfile.lock +1 -1
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
OWM1NTg2MGU1NzllN2RjOTg4NzM1ZDFiMzNmMTJjM2NkYTg4MmQ4Zg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MGZkNWIxMTQ4ZTI3ZjRhOTdhYjVmMjIxZDdjMDU3ZDY2MTY2NTgwOQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MDM1OTQ2NjgxOWI3MTY4ZmNkZGZmZTQyNTFiOWE2NWVjN2ExOWIzMTYxMGRh
|
10
|
+
MmU3NmY3M2UzMDEzZDE3NGJmMDI5OTIzMmUzMjBhZjQzMTc0MjdkMTIzMDdl
|
11
|
+
M2Q2MGFjNzBiMjY0ZDBkZmMyZDVhMjdkYzAyOThjOGFmYzRmYjM=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
Y2ZlYmFjZmIxZTBiODc1MjE0YTEyMGIzYzNkYWIzNzY2Y2M4Y2ZjMTcyMzhl
|
14
|
+
ODQ3YjZiZmNhMTA0MTdjNmYzYjU1MzFmYmVkMDA4YjRmNTExN2E0OTIzMGFm
|
15
|
+
Nzc0NDE0OGYyZmMwZDg3MGFlZTQyMDg2YzQ1NDUwMTEwMGY1YzI=
|
data/lib/spreewald/web_steps.rb
CHANGED
@@ -581,7 +581,7 @@ Then /^the "([^\"]*)" field should( not)? be visible$/ do |label, hidden|
|
|
581
581
|
return(field.is(':visible'));
|
582
582
|
})();
|
583
583
|
].gsub(/\n/, ' ')
|
584
|
-
page.
|
584
|
+
page.execute_script(visibility_detecting_javascript).should == !hidden
|
585
585
|
end
|
586
586
|
else
|
587
587
|
expectation = hidden ? :should_not : :should
|
@@ -596,7 +596,7 @@ When /^I wait for the page to load$/ do
|
|
596
596
|
if [:selenium, :webkit, :poltergeist].include?(Capybara.current_driver)
|
597
597
|
patiently do
|
598
598
|
# when no jQuery is loaded, we assume there are no pending AJAX requests
|
599
|
-
page.
|
599
|
+
page.execute_script("return typeof jQuery === 'undefined' || $.active == 0;").should == true
|
600
600
|
end
|
601
601
|
end
|
602
602
|
page.has_content? ''
|
@@ -625,7 +625,7 @@ end
|
|
625
625
|
When /^I go back$/ do
|
626
626
|
case Capybara::current_driver
|
627
627
|
when :selenium, :webkit
|
628
|
-
page.
|
628
|
+
page.execute_script('window.history.back()')
|
629
629
|
else
|
630
630
|
if page.driver.respond_to?(:browser)
|
631
631
|
visit page.driver.browser.last_request.env['HTTP_REFERER']
|
@@ -20,11 +20,10 @@ module CustomMatchers
|
|
20
20
|
end
|
21
21
|
|
22
22
|
rspec::Matchers.define :be_sorted do
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
match do |array|
|
24
|
+
sort_method = defined?(array.natural_sort) ? :natural_sort : :sort
|
25
|
+
array == array.send(sort_method)
|
26
|
+
end
|
27
27
|
end
|
28
|
-
end
|
29
28
|
|
30
29
|
end
|
@@ -45,7 +45,19 @@ class MailFinder
|
|
45
45
|
|
46
46
|
def email_text_body(mail)
|
47
47
|
if mail.parts.any?
|
48
|
-
mail.parts.
|
48
|
+
mail_body = mail.parts.map { |part|
|
49
|
+
if part.header.to_s.include?('Quoted-printable')
|
50
|
+
if Rails.version.starts_with?('2.3')
|
51
|
+
part.body.to_s
|
52
|
+
else
|
53
|
+
part.decoded
|
54
|
+
end
|
55
|
+
else
|
56
|
+
part.decoded
|
57
|
+
end
|
58
|
+
}
|
59
|
+
mail_body
|
60
|
+
|
49
61
|
elsif mail.body.respond_to? :raw_source
|
50
62
|
mail.body.raw_source
|
51
63
|
else
|
@@ -29,7 +29,7 @@ module WebStepsHelpers
|
|
29
29
|
end
|
30
30
|
|
31
31
|
visibility_detecting_javascript = %[
|
32
|
-
(function() {
|
32
|
+
return (function() {
|
33
33
|
var selector = #{selector_javascript};
|
34
34
|
var jqueryLoaded = (typeof jQuery != 'undefined');
|
35
35
|
|
@@ -76,9 +76,9 @@ module WebStepsHelpers
|
|
76
76
|
|
77
77
|
visibility_detecting_javascript.gsub!(/\n/, ' ')
|
78
78
|
if options[:expectation] == :visible
|
79
|
-
page.
|
79
|
+
page.execute_script(visibility_detecting_javascript).should == true
|
80
80
|
else
|
81
|
-
page.
|
81
|
+
page.execute_script(visibility_detecting_javascript).should == false
|
82
82
|
end
|
83
83
|
end
|
84
84
|
end
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spreewald
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Kraze
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber-rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ! '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: cucumber
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: capybara
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
description: A collection of cucumber steps we use in our projects, including steps
|
@@ -61,7 +61,7 @@ executables:
|
|
61
61
|
extensions: []
|
62
62
|
extra_rdoc_files: []
|
63
63
|
files:
|
64
|
-
-
|
64
|
+
- .gitignore
|
65
65
|
- LICENSE
|
66
66
|
- README.md
|
67
67
|
- Rakefile
|
@@ -167,12 +167,12 @@ require_paths:
|
|
167
167
|
- lib
|
168
168
|
required_ruby_version: !ruby/object:Gem::Requirement
|
169
169
|
requirements:
|
170
|
-
- -
|
170
|
+
- - ! '>='
|
171
171
|
- !ruby/object:Gem::Version
|
172
172
|
version: '0'
|
173
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
174
|
requirements:
|
175
|
-
- -
|
175
|
+
- - ! '>='
|
176
176
|
- !ruby/object:Gem::Version
|
177
177
|
version: '0'
|
178
178
|
requirements: []
|
@@ -253,3 +253,4 @@ test_files:
|
|
253
253
|
- tests/shared/features/support/paths.rb
|
254
254
|
- tests/shared/public/favicon.ico
|
255
255
|
- tests/shared/public/javascripts/jquery-1.7.2.min.js
|
256
|
+
has_rdoc:
|