spreewald 2.0.0 → 2.1.0
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/CHANGELOG.md +3 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +3 -3
- data/Gemfile.ruby218.lock +2 -2
- data/README.md +1 -1
- data/features/binary.feature +2 -2
- data/lib/spreewald/web_steps.rb +8 -2
- data/lib/spreewald_support/version.rb +1 -1
- data/tests/rails-3_capybara-1/Gemfile +2 -1
- data/tests/rails-3_capybara-1/Gemfile.lock +24 -12
- data/tests/rails-3_capybara-1/app +1 -0
- data/tests/rails-3_capybara-1/config/cucumber.yml +1 -0
- data/tests/rails-3_capybara-1/config/database.yml +1 -0
- data/tests/rails-3_capybara-1/db +1 -0
- data/tests/rails-3_capybara-1/features/shared +1 -0
- data/tests/rails-3_capybara-1/features/support/paths.rb +1 -0
- data/tests/rails-3_capybara-1/features/support/selectors.rb +1 -0
- data/tests/rails-3_capybara-1/public +1 -0
- data/tests/rails-3_capybara-2/Gemfile +1 -1
- data/tests/rails-3_capybara-2/Gemfile.lock +18 -12
- data/tests/rails-3_capybara-2/Rakefile +1 -0
- data/tests/rails-3_capybara-2/app +1 -0
- data/tests/rails-3_capybara-2/config +1 -0
- data/tests/rails-3_capybara-2/db +1 -0
- data/tests/rails-3_capybara-2/features +1 -0
- data/tests/rails-3_capybara-2/public +1 -0
- data/tests/rails-4_capybara-3/Gemfile +2 -0
- data/tests/rails-4_capybara-3/Gemfile.lock +12 -0
- data/tests/rails-4_capybara-3/app +1 -0
- data/tests/rails-4_capybara-3/db +1 -0
- data/tests/rails-4_capybara-3/features/development_steps.feature +1 -0
- data/tests/rails-4_capybara-3/features/email_steps.feature +1 -0
- data/tests/rails-4_capybara-3/features/overriding.feature +1 -0
- data/tests/rails-4_capybara-3/features/step_definitions/overriding_steps.rb +1 -0
- data/tests/rails-4_capybara-3/features/step_definitions/test_steps.rb +1 -0
- data/tests/rails-4_capybara-3/features/support/paths.rb +1 -0
- data/tests/rails-4_capybara-3/features/support/selectors.rb +1 -0
- data/tests/rails-4_capybara-3/features/table_steps.feature +1 -0
- data/tests/rails-4_capybara-3/features/web_steps.feature +1 -0
- data/tests/shared/features/shared/step_definitions/test_steps.rb +13 -0
- data/tests/shared/features/shared/web_steps.feature +6 -0
- metadata +24 -2
- data/tests/rails-3_capybara-1/config/cucumber.yml +0 -2
- data/tests/rails-3_capybara-1/config/database.yml +0 -7
- data/tests/rails-3_capybara-1/features/support/paths.rb +0 -16
- data/tests/rails-3_capybara-1/features/support/selectors.rb +0 -52
- data/tests/rails-3_capybara-2/Rakefile +0 -18
- data/tests/rails-4_capybara-3/features/development_steps.feature +0 -8
- data/tests/rails-4_capybara-3/features/email_steps.feature +0 -224
- data/tests/rails-4_capybara-3/features/overriding.feature +0 -5
- data/tests/rails-4_capybara-3/features/step_definitions/overriding_steps.rb +0 -3
- data/tests/rails-4_capybara-3/features/step_definitions/test_steps.rb +0 -43
- data/tests/rails-4_capybara-3/features/support/paths.rb +0 -16
- data/tests/rails-4_capybara-3/features/support/selectors.rb +0 -52
- data/tests/rails-4_capybara-3/features/table_steps.feature +0 -293
- data/tests/rails-4_capybara-3/features/web_steps.feature +0 -214
@@ -1,43 +0,0 @@
|
|
1
|
-
RSPEC_EXPECTATION_NOT_MET_ERROR = RSpec::Expectations::ExpectationNotMetError
|
2
|
-
|
3
|
-
Then /^the following steps? should (fail|succeed):$/ do |expectation, steps_table|
|
4
|
-
steps = steps_table.raw.flatten
|
5
|
-
|
6
|
-
steps.each do |step|
|
7
|
-
if expectation == 'fail'
|
8
|
-
expect { step(step) }.to raise_error(RSPEC_EXPECTATION_NOT_MET_ERROR)
|
9
|
-
|
10
|
-
else # succeed
|
11
|
-
step(step)
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
When /^I run the following steps?:$/ do |steps_table|
|
18
|
-
steps = steps_table.raw.flatten
|
19
|
-
|
20
|
-
steps.each do |step|
|
21
|
-
step(step)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
Then /^the following multiline step should (fail|succeed):$/ do |expectation, multiline_step|
|
26
|
-
multiline_step = multiline_step.gsub(%{'''}, %{"""})
|
27
|
-
if expectation == 'fail'
|
28
|
-
expect { steps(multiline_step) }.to raise_error(RSPEC_EXPECTATION_NOT_MET_ERROR)
|
29
|
-
else # succeed
|
30
|
-
steps(multiline_step)
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
34
|
-
|
35
|
-
Then(/^a hidden string with quotes should not be visible$/) do
|
36
|
-
hidden_string = %Q{hidden '" quotes}
|
37
|
-
assert_hidden(:text => hidden_string)
|
38
|
-
end
|
39
|
-
|
40
|
-
Then(/^a visible string with quotes should be visible$/) do
|
41
|
-
visible_string = %Q{visible '" quotes}
|
42
|
-
assert_visible(:text => visible_string)
|
43
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module NavigationHelpers
|
2
|
-
|
3
|
-
def path_to(page_name)
|
4
|
-
case page_name
|
5
|
-
when /^"(.*)"$/
|
6
|
-
$1
|
7
|
-
|
8
|
-
else
|
9
|
-
raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
|
10
|
-
"Now, go and add a mapping in #{__FILE__}"
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
15
|
-
|
16
|
-
World(NavigationHelpers)
|
@@ -1,52 +0,0 @@
|
|
1
|
-
module HtmlSelectorsHelpers
|
2
|
-
# Maps a name to a selector. Used primarily by the
|
3
|
-
#
|
4
|
-
# When /^(.+) within (.+)$/ do |step, scope|
|
5
|
-
#
|
6
|
-
# step definitions in web_steps.rb
|
7
|
-
#
|
8
|
-
def selector_for(locator)
|
9
|
-
case locator
|
10
|
-
|
11
|
-
when /^a panel?$/
|
12
|
-
'.panel'
|
13
|
-
|
14
|
-
when /^a panels nested contents?$/
|
15
|
-
'.panel--nested-contents'
|
16
|
-
|
17
|
-
when /^the timeline?$/
|
18
|
-
'.timeline'
|
19
|
-
|
20
|
-
when /^the table row containing "(.+?)"$/
|
21
|
-
all('tr').detect { |tr| tr.text.include? $1 } || raise("Could not find tr containing #{$1.inspect}")
|
22
|
-
|
23
|
-
when /^a table$/
|
24
|
-
'.table'
|
25
|
-
|
26
|
-
# Add more mappings here.
|
27
|
-
# Here is an example that pulls values out of the Regexp:
|
28
|
-
#
|
29
|
-
# when /^the (notice|error|info) flash$/
|
30
|
-
# ".flash.#{$1}"
|
31
|
-
|
32
|
-
# You can also return an array to use a different selector
|
33
|
-
# type, like:
|
34
|
-
#
|
35
|
-
# when /the header/
|
36
|
-
# [:xpath, "//header"]
|
37
|
-
|
38
|
-
# This allows you to provide a quoted selector as the scope
|
39
|
-
# for "within" steps as was previously the default for the
|
40
|
-
# web steps:
|
41
|
-
when /^"(.+)"$/
|
42
|
-
$1
|
43
|
-
|
44
|
-
else
|
45
|
-
raise "Can't find mapping from \"#{locator}\" to a selector.\n" +
|
46
|
-
"Now, go and add a mapping in #{__FILE__}"
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
end
|
51
|
-
|
52
|
-
World(HtmlSelectorsHelpers)
|
@@ -1,293 +0,0 @@
|
|
1
|
-
Feature: Table steps
|
2
|
-
|
3
|
-
|
4
|
-
Scenario: should see a table with the following rows
|
5
|
-
When I go to "/tables/table1"
|
6
|
-
Then the following multiline step should succeed:
|
7
|
-
"""
|
8
|
-
Then I should see a table with the following rows:
|
9
|
-
| 1-1 | 1-2 | 1-3 |
|
10
|
-
| 2-1 | 2-2 | 2-3 |
|
11
|
-
| 3-1 | 3-2 | 3-3 |
|
12
|
-
"""
|
13
|
-
And the following multiline step should succeed:
|
14
|
-
"""
|
15
|
-
Then I should see a table with the following rows:
|
16
|
-
| 1-1 | 1-3 |
|
17
|
-
| 2-1 | 2-3 |
|
18
|
-
| 3-1 | 3-3 |
|
19
|
-
"""
|
20
|
-
And the following multiline step should succeed:
|
21
|
-
"""
|
22
|
-
Then I should see a table with the following rows:
|
23
|
-
| 1-2 | 1-3 |
|
24
|
-
| 2-2 | 2-3 |
|
25
|
-
| 3-2 | 3-3 |
|
26
|
-
"""
|
27
|
-
And the following multiline step should succeed:
|
28
|
-
"""
|
29
|
-
Then I should see a table with the following rows:
|
30
|
-
| 1-1 | 1-2 | 1-3 |
|
31
|
-
| 3-1 | 3-2 | 3-3 |
|
32
|
-
"""
|
33
|
-
And the following multiline step should succeed:
|
34
|
-
"""
|
35
|
-
Then I should see a table with the following rows:
|
36
|
-
| 2-1 | 2-2 | 2-3 |
|
37
|
-
| 3-1 | 3-2 | 3-3 |
|
38
|
-
"""
|
39
|
-
And the following multiline step should succeed:
|
40
|
-
"""
|
41
|
-
Then I should see a table with the following rows:
|
42
|
-
| 1-1 | 1-2 | 1-3 |
|
43
|
-
| 2-1 | 2-2 | 2-3 |
|
44
|
-
"""
|
45
|
-
And the following multiline step should succeed:
|
46
|
-
"""
|
47
|
-
Then I should see a table with the following rows:
|
48
|
-
| 1-1 | 1-3 |
|
49
|
-
| 3-1 | 3-3 |
|
50
|
-
"""
|
51
|
-
And the following multiline step should succeed:
|
52
|
-
"""
|
53
|
-
Then I should see a table with the following rows:
|
54
|
-
| 1* | 1-3 |
|
55
|
-
| 3* | 3-3 |
|
56
|
-
"""
|
57
|
-
And the following multiline step should fail:
|
58
|
-
"""
|
59
|
-
Then I should see a table with the following rows:
|
60
|
-
| 3-1 | 3-2 | 3-3 |
|
61
|
-
| 1-1 | 1-2 | 1-3 |
|
62
|
-
| 2-1 | 2-2 | 2-3 |
|
63
|
-
"""
|
64
|
-
But the following multiline step should fail:
|
65
|
-
"""
|
66
|
-
Then I should see a table with the following rows:
|
67
|
-
| 1-1 | 1-2 | 1-3 |
|
68
|
-
| 2-1 | 2-2 | 2-3 |
|
69
|
-
| 3-1 | 3-2 | foo |
|
70
|
-
"""
|
71
|
-
And the following multiline step should fail:
|
72
|
-
"""
|
73
|
-
Then I should see a table with the following rows:
|
74
|
-
| 1-1 | 1-2 | 1-3 |
|
75
|
-
| 2-1 | foo | 2-3 |
|
76
|
-
| 3-1 | 3-2 | 3-3 |
|
77
|
-
"""
|
78
|
-
And the following multiline step should fail:
|
79
|
-
"""
|
80
|
-
Then I should see a table with the following rows:
|
81
|
-
| 1 | 1-3 |
|
82
|
-
| 3 | 3-3 |
|
83
|
-
"""
|
84
|
-
|
85
|
-
|
86
|
-
Scenario: Cell content normalization
|
87
|
-
When I go to "/tables/table_with_weird_spaces"
|
88
|
-
Then I should see a table with the following rows:
|
89
|
-
| one two | three four |
|
90
|
-
| five six | seven eight |
|
91
|
-
| nineten | eleventwelve |
|
92
|
-
|
93
|
-
|
94
|
-
Scenario: should not see a table with the following rows
|
95
|
-
When I go to "/tables/table1"
|
96
|
-
Then the following multiline step should fail:
|
97
|
-
"""
|
98
|
-
Then I should not see a table with the following rows:
|
99
|
-
| 1-1 | 1-2 | 1-3 |
|
100
|
-
| 2-1 | 2-2 | 2-3 |
|
101
|
-
| 3-1 | 3-2 | 3-3 |
|
102
|
-
"""
|
103
|
-
But the following multiline step should succeed:
|
104
|
-
"""
|
105
|
-
Then I should not see a table with the following rows:
|
106
|
-
| 3-1 | 3-2 | 3-3 |
|
107
|
-
| 1-1 | 1-2 | 1-3 |
|
108
|
-
| 2-1 | 2-2 | 2-3 |
|
109
|
-
"""
|
110
|
-
|
111
|
-
|
112
|
-
Scenario: should see a table with exactly the following rows
|
113
|
-
When I go to "/tables/table1"
|
114
|
-
Then the following multiline step should succeed:
|
115
|
-
"""
|
116
|
-
Then I should see a table with exactly the following rows:
|
117
|
-
| 1-1 | 1-2 | 1-3 |
|
118
|
-
| 2-1 | 2-2 | 2-3 |
|
119
|
-
| 3-1 | 3-2 | 3-3 |
|
120
|
-
"""
|
121
|
-
And the following multiline step should succeed:
|
122
|
-
"""
|
123
|
-
Then I should see a table with exactly the following rows:
|
124
|
-
| 1-1 | 1-3 |
|
125
|
-
| 2-1 | 2-3 |
|
126
|
-
| 3-1 | 3-3 |
|
127
|
-
"""
|
128
|
-
But the following multiline step should fail:
|
129
|
-
"""
|
130
|
-
Then I should see a table with exactly the following rows:
|
131
|
-
| 2-1 | 2-2 | 2-3 |
|
132
|
-
| 1-1 | 1-2 | 1-3 |
|
133
|
-
| 3-1 | 3-2 | 3-3 |
|
134
|
-
"""
|
135
|
-
And the following multiline step should fail:
|
136
|
-
"""
|
137
|
-
Then I should see a table with exactly the following rows:
|
138
|
-
| 1-1 | 1-2 | 1-3 |
|
139
|
-
| 3-1 | 3-2 | 3-3 |
|
140
|
-
"""
|
141
|
-
|
142
|
-
|
143
|
-
Scenario: should not see a table with exactly the following rows
|
144
|
-
When I go to "/tables/table1"
|
145
|
-
Then the following multiline step should fail:
|
146
|
-
"""
|
147
|
-
Then I should not see a table with exactly the following rows:
|
148
|
-
| 1-1 | 1-2 | 1-3 |
|
149
|
-
| 2-1 | 2-2 | 2-3 |
|
150
|
-
| 3-1 | 3-2 | 3-3 |
|
151
|
-
"""
|
152
|
-
And the following multiline step should fail:
|
153
|
-
"""
|
154
|
-
Then I should not see a table with exactly the following rows:
|
155
|
-
| 1-1 | 1-3 |
|
156
|
-
| 2-1 | 2-3 |
|
157
|
-
| 3-1 | 3-3 |
|
158
|
-
"""
|
159
|
-
But the following multiline step should succeed:
|
160
|
-
"""
|
161
|
-
Then I should not see a table with exactly the following rows:
|
162
|
-
| 2-1 | 2-2 | 2-3 |
|
163
|
-
| 1-1 | 1-2 | 1-3 |
|
164
|
-
| 3-1 | 3-2 | 3-3 |
|
165
|
-
"""
|
166
|
-
And the following multiline step should succeed:
|
167
|
-
"""
|
168
|
-
Then I should not see a table with exactly the following rows:
|
169
|
-
| 1-1 | 1-2 | 1-3 |
|
170
|
-
| 3-1 | 3-2 | 3-3 |
|
171
|
-
"""
|
172
|
-
|
173
|
-
|
174
|
-
Scenario: should see a table with the following rows in any order
|
175
|
-
When I go to "/tables/table1"
|
176
|
-
Then the following multiline step should succeed:
|
177
|
-
"""
|
178
|
-
Then I should see a table with the following rows in any order:
|
179
|
-
| 1-1 | 1-2 | 1-3 |
|
180
|
-
| 2-1 | 2-2 | 2-3 |
|
181
|
-
| 3-1 | 3-2 | 3-3 |
|
182
|
-
"""
|
183
|
-
And the following multiline step should succeed:
|
184
|
-
"""
|
185
|
-
Then I should see a table with the following rows in any order:
|
186
|
-
| 1-1 | 1-2 | 1-3 |
|
187
|
-
| 3-1 | 3-2 | 3-3 |
|
188
|
-
"""
|
189
|
-
And the following multiline step should succeed:
|
190
|
-
"""
|
191
|
-
Then I should see a table with the following rows in any order:
|
192
|
-
| 3-1 | 3-2 | 3-3 |
|
193
|
-
| 1-1 | 1-2 | 1-3 |
|
194
|
-
| 2-1 | 2-2 | 2-3 |
|
195
|
-
"""
|
196
|
-
But the following multiline step should fail:
|
197
|
-
"""
|
198
|
-
Then I should see a table with the following rows in any order:
|
199
|
-
| 1-1 | 1-2 | 1-3 |
|
200
|
-
| 2-1 | 2-2 | 2-3 |
|
201
|
-
| 3-1 | 3-2 | foo |
|
202
|
-
"""
|
203
|
-
And the following multiline step should fail:
|
204
|
-
"""
|
205
|
-
Then I should see a table with the following rows in any order:
|
206
|
-
| 1 | 1-3 |
|
207
|
-
| 3 | 3-3 |
|
208
|
-
"""
|
209
|
-
|
210
|
-
|
211
|
-
Scenario: should not see a table with the following rows in any order
|
212
|
-
When I go to "/tables/table1"
|
213
|
-
Then the following multiline step should fail:
|
214
|
-
"""
|
215
|
-
Then I should not see a table with the following rows in any order:
|
216
|
-
| 1-1 | 1-2 | 1-3 |
|
217
|
-
| 2-1 | 2-2 | 2-3 |
|
218
|
-
| 3-1 | 3-2 | 3-3 |
|
219
|
-
"""
|
220
|
-
And the following multiline step should fail:
|
221
|
-
"""
|
222
|
-
Then I should not see a table with the following rows in any order:
|
223
|
-
| 1-1 | 1-2 | 1-3 |
|
224
|
-
| 3-1 | 3-2 | 3-3 |
|
225
|
-
"""
|
226
|
-
And the following multiline step should fail:
|
227
|
-
"""
|
228
|
-
Then I should not see a table with the following rows in any order:
|
229
|
-
| 3-1 | 3-2 | 3-3 |
|
230
|
-
| 1-1 | 1-2 | 1-3 |
|
231
|
-
| 2-1 | 2-2 | 2-3 |
|
232
|
-
"""
|
233
|
-
But the following multiline step should succeed:
|
234
|
-
"""
|
235
|
-
Then I should not see a table with the following rows in any order:
|
236
|
-
| 1-1 | 1-2 | 1-3 |
|
237
|
-
| 2-1 | 2-2 | 2-3 |
|
238
|
-
| 3-1 | 3-2 | foo |
|
239
|
-
"""
|
240
|
-
And the following multiline step should succeed:
|
241
|
-
"""
|
242
|
-
Then I should not see a table with the following rows in any order:
|
243
|
-
| 1 | 1-3 |
|
244
|
-
| 3 | 3-3 |
|
245
|
-
"""
|
246
|
-
|
247
|
-
|
248
|
-
Scenario: should see a table with exactly the following rows in any order
|
249
|
-
When I go to "/tables/table1"
|
250
|
-
Then the following multiline step should succeed:
|
251
|
-
"""
|
252
|
-
Then I should see a table with exactly the following rows in any order:
|
253
|
-
| 1-1 | 1-2 | 1-3 |
|
254
|
-
| 2-1 | 2-2 | 2-3 |
|
255
|
-
| 3-1 | 3-2 | 3-3 |
|
256
|
-
"""
|
257
|
-
And the following multiline step should succeed:
|
258
|
-
"""
|
259
|
-
Then I should see a table with exactly the following rows in any order:
|
260
|
-
| 3-1 | 3-2 | 3-3 |
|
261
|
-
| 1-1 | 1-2 | 1-3 |
|
262
|
-
| 2-1 | 2-2 | 2-3 |
|
263
|
-
"""
|
264
|
-
But the following multiline step should fail:
|
265
|
-
"""
|
266
|
-
Then I should see a table with exactly the following rows in any order:
|
267
|
-
| 1-1 | 1-2 | 1-3 |
|
268
|
-
| 3-1 | 3-2 | 3-3 |
|
269
|
-
"""
|
270
|
-
|
271
|
-
|
272
|
-
Scenario: should not see a table with exactly the following rows in any order
|
273
|
-
When I go to "/tables/table1"
|
274
|
-
Then the following multiline step should fail:
|
275
|
-
"""
|
276
|
-
Then I should not see a table with exactly the following rows in any order:
|
277
|
-
| 1-1 | 1-2 | 1-3 |
|
278
|
-
| 2-1 | 2-2 | 2-3 |
|
279
|
-
| 3-1 | 3-2 | 3-3 |
|
280
|
-
"""
|
281
|
-
And the following multiline step should fail:
|
282
|
-
"""
|
283
|
-
Then I should not see a table with exactly the following rows in any order:
|
284
|
-
| 3-1 | 3-2 | 3-3 |
|
285
|
-
| 1-1 | 1-2 | 1-3 |
|
286
|
-
| 2-1 | 2-2 | 2-3 |
|
287
|
-
"""
|
288
|
-
But the following multiline step should succeed:
|
289
|
-
"""
|
290
|
-
Then I should not see a table with exactly the following rows in any order:
|
291
|
-
| 1-1 | 1-2 | 1-3 |
|
292
|
-
| 3-1 | 3-2 | 3-3 |
|
293
|
-
"""
|
@@ -1,214 +0,0 @@
|
|
1
|
-
Feature: Web steps
|
2
|
-
|
3
|
-
Scenario: /^the "([^"]*)" field should (not )?contain "([^"]*)"$/
|
4
|
-
When I go to "/forms/form1"
|
5
|
-
Then the "Text control" field should contain "Text control value"
|
6
|
-
Then the "Text control" field should not contain "false text"
|
7
|
-
Then the "Select control" field should contain "Label 2"
|
8
|
-
Then the "Select control without selection" field should contain "Label 1"
|
9
|
-
Then the "Textarea control" field should contain "Textarea control value"
|
10
|
-
Then the "Empty control" field should contain ""
|
11
|
-
|
12
|
-
|
13
|
-
Scenario: /^the "([^"]*)" field should (not )?contain:/
|
14
|
-
When I go to "/forms/form2"
|
15
|
-
Then the "Text control" field should contain:
|
16
|
-
"""
|
17
|
-
Text control value
|
18
|
-
"""
|
19
|
-
Then the "Textarea control" field should contain:
|
20
|
-
"""
|
21
|
-
Textarea control line 1
|
22
|
-
Textarea control line 2
|
23
|
-
"""
|
24
|
-
Then the "Textarea control" field should not contain:
|
25
|
-
"""
|
26
|
-
Textarea control wrong line 1
|
27
|
-
Textarea control wrong line 2
|
28
|
-
"""
|
29
|
-
Then the "Empty textarea control" field should contain:
|
30
|
-
"""
|
31
|
-
"""
|
32
|
-
|
33
|
-
|
34
|
-
Scenario: /^the "([^\"]*)" field should( not)? have an error$/
|
35
|
-
When I go to "/forms/invalid_form"
|
36
|
-
Then the "Text control" field should have an error
|
37
|
-
Then the "Textarea control" field should have an error
|
38
|
-
Then the "Textarea control" field should have an error
|
39
|
-
Then the "Empty textarea control" field should not have an error
|
40
|
-
|
41
|
-
|
42
|
-
Scenario: /^the "([^"]*)" field should have no error$/
|
43
|
-
When I go to "/forms/invalid_form"
|
44
|
-
Then the "Empty textarea control" field should have no error
|
45
|
-
|
46
|
-
|
47
|
-
Scenario: /^I should see a form with the following values:$/
|
48
|
-
When I go to "/forms/form1"
|
49
|
-
Then I should see a form with the following values:
|
50
|
-
| Text control | Text control value |
|
51
|
-
| Select control | Label 2 |
|
52
|
-
| Select control without selection | Label 1 |
|
53
|
-
| Textarea control | Textarea control value |
|
54
|
-
| Empty control | |
|
55
|
-
|
56
|
-
|
57
|
-
Scenario: /^"([^"]*)" should( not)? be selected for "([^"]*)"$/
|
58
|
-
When I go to "/forms/form1"
|
59
|
-
Then "Label 2" should be selected for "Select control"
|
60
|
-
But "Label 1" should not be selected for "Select control"
|
61
|
-
And "Label 1" should be selected for "Select control without selection"
|
62
|
-
|
63
|
-
|
64
|
-
Scenario: /^nothing should be selected for "([^"]*)"$/
|
65
|
-
When I go to "/forms/form1"
|
66
|
-
Then nothing should be selected for "Select control with blank option"
|
67
|
-
Then nothing should be selected for "Select control with blank selection"
|
68
|
-
|
69
|
-
Scenario: /^the radio button "([^"]*)" should( not)? be (?:checked|selected)$/
|
70
|
-
When I go to "/forms/form1"
|
71
|
-
Then the radio button "Radio 1" should not be selected
|
72
|
-
Then the radio button "Radio 2" should not be selected
|
73
|
-
When I choose "Radio 1"
|
74
|
-
Then the radio button "Radio 1" should be selected
|
75
|
-
Then the radio button "Radio 2" should not be selected
|
76
|
-
When I choose "Radio 2"
|
77
|
-
Then the radio button "Radio 1" should not be selected
|
78
|
-
Then the radio button "Radio 2" should be selected
|
79
|
-
|
80
|
-
|
81
|
-
Scenario: /^I go back$/
|
82
|
-
Given I go to "/static_pages/link_to_home"
|
83
|
-
And I follow "Home"
|
84
|
-
|
85
|
-
When I go back
|
86
|
-
Then I should be on "/static_pages/link_to_home"
|
87
|
-
|
88
|
-
|
89
|
-
Scenario: /^the "([^"]*)" checkbox should( not)? be checked$/
|
90
|
-
When I go to "/forms/checkbox_form"
|
91
|
-
Then the "Checked" checkbox should be checked
|
92
|
-
And the "Unchecked" checkbox should not be checked
|
93
|
-
|
94
|
-
|
95
|
-
@javascript
|
96
|
-
Scenario: /^I click on "([^\"]+)"$/
|
97
|
-
When I go to "/static_pages/click_on"
|
98
|
-
And I click on "Nested"
|
99
|
-
# See that it clicks the innermost element with that text
|
100
|
-
Then I should see "You clicked on .inner"
|
101
|
-
When I click on "Button"
|
102
|
-
Then I should see "You clicked on .button"
|
103
|
-
|
104
|
-
|
105
|
-
@javascript
|
106
|
-
Scenario: /^I click on the element "([^\"]+)"$/
|
107
|
-
When I go to "/static_pages/click_on"
|
108
|
-
And I click on the element ".inner"
|
109
|
-
Then I should see "You clicked on .inner"
|
110
|
-
When I click on the element ".button"
|
111
|
-
Then I should see "You clicked on .button"
|
112
|
-
|
113
|
-
|
114
|
-
@javascript
|
115
|
-
Scenario: /^I click on the element for .*?$/
|
116
|
-
When I go to "/static_pages/click_on"
|
117
|
-
And I click on the element for a panel
|
118
|
-
Then I should see "You clicked on .panel"
|
119
|
-
|
120
|
-
When I click on the element for the timeline
|
121
|
-
Then I should see "You clicked on .timeline"
|
122
|
-
But I should not see "You clicked on .panel"
|
123
|
-
|
124
|
-
When I click on the element for a panel within ".clickables"
|
125
|
-
Then I should see "You clicked on .panel"
|
126
|
-
|
127
|
-
|
128
|
-
Scenario: /^the "(.*?)" select should( not)? be sorted$/
|
129
|
-
When I go to "/forms/select_fields"
|
130
|
-
Then the "sorted" select should be sorted
|
131
|
-
But the "unsorted" select should not be sorted
|
132
|
-
|
133
|
-
|
134
|
-
Scenario: /^Then (the tag )?"..." should( not)? be visible$/
|
135
|
-
When I go to "/static_pages/visibility"
|
136
|
-
Then "hidden ümläüt" should be hidden
|
137
|
-
And "visible ümläüt" should be visible
|
138
|
-
And a hidden string with quotes should not be visible
|
139
|
-
And a visible string with quotes should be visible
|
140
|
-
And "hidden ümläüt" should be hidden
|
141
|
-
|
142
|
-
|
143
|
-
@javascript
|
144
|
-
Scenario: /^Then (the tag )?"..." should( not)? be visible$/ with javascript
|
145
|
-
When I go to "/static_pages/visibility"
|
146
|
-
Then "hidden ümläüt" should be hidden
|
147
|
-
And "visible ümläüt" should be visible
|
148
|
-
And a hidden string with quotes should not be visible
|
149
|
-
And a visible string with quotes should be visible
|
150
|
-
And "hidden ümläüt" should be hidden
|
151
|
-
|
152
|
-
|
153
|
-
Scenario: /^the "([^\"]*)" field should( not)? be visible$/
|
154
|
-
When I go to "/static_pages/visibility"
|
155
|
-
Then the "Visible field" field should be visible
|
156
|
-
But the "Hidden field" field should not be visible
|
157
|
-
|
158
|
-
|
159
|
-
@javascript
|
160
|
-
Scenario: /^the "([^\"]*)" field should( not)? be visible$/ with Javascript
|
161
|
-
When I go to "/static_pages/visibility"
|
162
|
-
Then the "Visible field" field should be visible
|
163
|
-
But the "Hidden field" field should not be visible
|
164
|
-
|
165
|
-
|
166
|
-
Scenario: /^I should (not )?see (?:an|the) element "([^"]+)"$/
|
167
|
-
When I go to "/static_pages/see_element"
|
168
|
-
Then I should see an element ".panel"
|
169
|
-
And I should see the element ".panel"
|
170
|
-
And I should see the element ".panel--nested-contents" within ".panel"
|
171
|
-
And I should see the element ".panel--nested-contents" within a panel
|
172
|
-
But I should not see an element ".timeline"
|
173
|
-
But I should not see the element ".timeline"
|
174
|
-
|
175
|
-
|
176
|
-
Scenario: /^I should (not )?see (?:an|the) element for (.*?)$/
|
177
|
-
When I go to "/static_pages/see_element"
|
178
|
-
Then I should see an element for a panel
|
179
|
-
And I should see the element for a panel
|
180
|
-
And I should see the element for a panels nested contents within ".panel"
|
181
|
-
And I should see the element for a panels nested contents within a panel
|
182
|
-
And I should not see an element for the timeline
|
183
|
-
And I should not see the element for the timeline
|
184
|
-
|
185
|
-
|
186
|
-
Scenario: /^((?:|I )should see "([^"]*)" within (.*[^:])$/
|
187
|
-
When I go to "/static_pages/within"
|
188
|
-
Then I should see "Role" within ".table"
|
189
|
-
And I should see "Permissions" within a table
|
190
|
-
But I should not see "Nonsense" within ".table"
|
191
|
-
And I should not see "Nonsense" within a table
|
192
|
-
|
193
|
-
|
194
|
-
Scenario: /^(.*) within (.*[^:])$/ with a Capybara::Node::Element
|
195
|
-
When I go to "/static_pages/within"
|
196
|
-
Then I should see "All" within the table row containing "Admin"
|
197
|
-
|
198
|
-
|
199
|
-
Scenario: the /^(.*) within (.*[^:])$/ step should not be invoked when the word "within" is used in an argument for another step
|
200
|
-
When I go to "/static_pages/within"
|
201
|
-
Then I should see "He lives within a few miles of Augsburg"
|
202
|
-
|
203
|
-
|
204
|
-
Scenario: /^I perform basic authentication as "([^\"]*)\/([^\"]*)" and go to (.*)$/
|
205
|
-
When I go to "/authenticated/page"
|
206
|
-
Then I should see "Access denied"
|
207
|
-
When I perform basic authentication as "user/password" and go to "/authenticated/page"
|
208
|
-
Then I should see "Action reached"
|
209
|
-
|
210
|
-
|
211
|
-
@javascript
|
212
|
-
Scenario: /^I perform basic authentication as "([^\"]*)\/([^\"]*)" and go to (.*)$/ with Javascript
|
213
|
-
When I perform basic authentication as "user/password" and go to "/authenticated/page"
|
214
|
-
Then I should see "Action reached"
|