mattscilipoti-cucumber-rails 0.2.4
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/.gitignore +3 -0
- data/History.txt +84 -0
- data/README.rdoc +38 -0
- data/Rakefile +19 -0
- data/VERSION +1 -0
- data/cucumber-rails.gemspec +84 -0
- data/generators/cucumber/USAGE +14 -0
- data/generators/cucumber/cucumber_generator.rb +196 -0
- data/generators/cucumber/templates/config/cucumber.yml.erb +7 -0
- data/generators/cucumber/templates/environments/cucumber.rb.erb +37 -0
- data/generators/cucumber/templates/script/cucumber +10 -0
- data/generators/cucumber/templates/step_definitions/capybara_steps.rb.erb +187 -0
- data/generators/cucumber/templates/step_definitions/web_steps_cs.rb.erb +136 -0
- data/generators/cucumber/templates/step_definitions/web_steps_de.rb.erb +136 -0
- data/generators/cucumber/templates/step_definitions/web_steps_es.rb.erb +136 -0
- data/generators/cucumber/templates/step_definitions/web_steps_no.rb.erb +114 -0
- data/generators/cucumber/templates/step_definitions/web_steps_pt-BR.rb.erb +140 -0
- data/generators/cucumber/templates/step_definitions/webrat_steps.rb.erb +258 -0
- data/generators/cucumber/templates/support/_rails_each_run.rb +29 -0
- data/generators/cucumber/templates/support/_rails_prefork.rb.erb +10 -0
- data/generators/cucumber/templates/support/capybara.rb +9 -0
- data/generators/cucumber/templates/support/edit_warning.txt +5 -0
- data/generators/cucumber/templates/support/paths.rb +27 -0
- data/generators/cucumber/templates/support/rails.rb.erb +4 -0
- data/generators/cucumber/templates/support/rails_spork.rb.erb +13 -0
- data/generators/cucumber/templates/support/webrat.rb +8 -0
- data/generators/cucumber/templates/tasks/cucumber.rake.erb +42 -0
- data/generators/feature/USAGE +12 -0
- data/generators/feature/feature_generator.rb +41 -0
- data/generators/feature/templates/feature.erb +59 -0
- data/generators/feature/templates/steps.erb +14 -0
- data/lib/cucumber/rails/action_controller.rb +65 -0
- data/lib/cucumber/rails/active_record.rb +36 -0
- data/lib/cucumber/rails/capybara_javascript_emulation.rb +61 -0
- data/lib/cucumber/rails/rspec.rb +10 -0
- data/lib/cucumber/rails/test_unit.rb +9 -0
- data/lib/cucumber/rails/world.rb +47 -0
- data/lib/cucumber/web/tableish.rb +75 -0
- data/spec/cucumber/web/tableish_spec.rb +160 -0
- data/spec/spec_helper.rb +6 -0
- data/tasks/rspec.rake +13 -0
- metadata +107 -0
@@ -0,0 +1,7 @@
|
|
1
|
+
<%%
|
2
|
+
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
|
3
|
+
rerun_opts = rerun.to_s.strip.empty? ? "--format progress features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
|
4
|
+
std_opts = "#{rerun_opts} --format rerun --out rerun.txt --strict --tags ~@wip"
|
5
|
+
%>
|
6
|
+
default: <%= spork? ? '--drb ' : '' %><%%= std_opts %>
|
7
|
+
wip: <%= spork? ? '--drb ' : '' %>--tags @wip:3 --wip features
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Edit at your own peril - it's recommended to regenerate this file
|
2
|
+
# in the future when you upgrade to a newer version of Cucumber.
|
3
|
+
|
4
|
+
# IMPORTANT: Setting config.cache_classes to false is known to
|
5
|
+
# break Cucumber's use_transactional_fixtures method.
|
6
|
+
# For more information see https://rspec.lighthouseapp.com/projects/16211/tickets/165
|
7
|
+
config.cache_classes = true
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.action_controller.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Disable request forgery protection in test environment
|
17
|
+
config.action_controller.allow_forgery_protection = false
|
18
|
+
|
19
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
20
|
+
# The :test delivery method accumulates sent emails in the
|
21
|
+
# ActionMailer::Base.deliveries array.
|
22
|
+
config.action_mailer.delivery_method = :test
|
23
|
+
|
24
|
+
config.gem 'cucumber-rails', :lib => false, :version => '>=<%= version %>' unless File.directory?(File.join(Rails.root, 'vendor/plugins/cucumber-rails'))
|
25
|
+
config.gem 'database_cleaner', :lib => false, :version => '>=0.4.3' unless File.directory?(File.join(Rails.root, 'vendor/plugins/database_cleaner'))
|
26
|
+
<% if driver == :capybara -%>
|
27
|
+
config.gem 'capybara', :lib => false, :version => '>=0.3.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/capybara'))
|
28
|
+
<% else -%>
|
29
|
+
config.gem 'webrat', :lib => false, :version => '>=0.6.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/webrat'))
|
30
|
+
<% end -%>
|
31
|
+
<% if framework == :rspec -%>
|
32
|
+
config.gem 'rspec', :lib => false, :version => '>=1.3.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec'))
|
33
|
+
config.gem 'rspec-rails', :lib => false, :version => '>=1.3.2' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec-rails'))
|
34
|
+
<% end %>
|
35
|
+
<% if spork? -%>
|
36
|
+
config.gem 'spork', :lib => false, :version => '>=0.7.5' unless File.directory?(File.join(Rails.root, 'vendor/plugins/spork'))
|
37
|
+
<% end %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
vendored_cucumber_bin = Dir["#{File.dirname(__FILE__)}/../vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
|
4
|
+
if vendored_cucumber_bin
|
5
|
+
load File.expand_path(vendored_cucumber_bin)
|
6
|
+
else
|
7
|
+
require 'rubygems' unless ENV['NO_RUBYGEMS']
|
8
|
+
require 'cucumber'
|
9
|
+
load Cucumber::BINARY
|
10
|
+
end
|
@@ -0,0 +1,187 @@
|
|
1
|
+
<%= embed_file('support/edit_warning.txt') %>
|
2
|
+
|
3
|
+
require 'uri'
|
4
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
|
5
|
+
|
6
|
+
module WithinHelpers
|
7
|
+
def with_scope(locator)
|
8
|
+
locator ? within(locator) { yield } : yield
|
9
|
+
end
|
10
|
+
end
|
11
|
+
World(WithinHelpers)
|
12
|
+
|
13
|
+
Given /^(?:|I )am on (.+)$/ do |page_name|
|
14
|
+
visit path_to(page_name)
|
15
|
+
end
|
16
|
+
|
17
|
+
When /^(?:|I )go to (.+)$/ do |page_name|
|
18
|
+
visit path_to(page_name)
|
19
|
+
end
|
20
|
+
|
21
|
+
When /^(?:|I )press "([^\"]*)"(?: within "([^\"]*)")?$/ do |button, selector|
|
22
|
+
with_scope(selector) do
|
23
|
+
click_button(button)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
When /^(?:|I )follow "([^\"]*)"(?: within "([^\"]*)")?$/ do |link, selector|
|
28
|
+
with_scope(selector) do
|
29
|
+
click_link(link)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
When /^(?:|I )fill in "([^\"]*)" with "([^\"]*)"(?: within "([^\"]*)")?$/ do |field, value, selector|
|
34
|
+
with_scope(selector) do
|
35
|
+
fill_in(field, :with => value)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
When /^(?:|I )fill in "([^\"]*)" for "([^\"]*)"(?: within "([^\"]*)")?$/ do |value, field, selector|
|
40
|
+
with_scope(selector) do
|
41
|
+
fill_in(field, :with => value)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# Use this to fill in an entire form with data from a table. Example:
|
46
|
+
#
|
47
|
+
# When I fill in the following:
|
48
|
+
# | Account Number | 5002 |
|
49
|
+
# | Expiry date | 2009-11-01 |
|
50
|
+
# | Note | Nice guy |
|
51
|
+
# | Wants Email? | |
|
52
|
+
#
|
53
|
+
# TODO: Add support for checkbox, select og option
|
54
|
+
# based on naming conventions.
|
55
|
+
#
|
56
|
+
When /^(?:|I )fill in the following(?: within "([^\"]*)")?:$/ do |selector, fields|
|
57
|
+
with_scope(selector) do
|
58
|
+
fields.rows_hash.each do |name, value|
|
59
|
+
When %{I fill in "#{name}" with "#{value}"}
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
When /^(?:|I )select "([^\"]*)" from "([^\"]*)"(?: within "([^\"]*)")?$/ do |value, field, selector|
|
65
|
+
with_scope(selector) do
|
66
|
+
select(value, :from => field)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
When /^(?:|I )check "([^\"]*)"(?: within "([^\"]*)")?$/ do |field, selector|
|
71
|
+
with_scope(selector) do
|
72
|
+
check(field)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
When /^(?:|I )uncheck "([^\"]*)"(?: within "([^\"]*)")?$/ do |field, selector|
|
77
|
+
with_scope(selector) do
|
78
|
+
uncheck(field)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
When /^(?:|I )choose "([^\"]*)"(?: within "([^\"]*)")?$/ do |field, selector|
|
83
|
+
with_scope(selector) do
|
84
|
+
choose(field)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
When /^(?:|I )attach the file "([^\"]*)" to "([^\"]*)"(?: within "([^\"]*)")?$/ do |path, field, selector|
|
89
|
+
with_scope(selector) do
|
90
|
+
attach_file(field, path)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
Then /^(?:|I )should see "([^\"]*)"(?: within "([^\"]*)")?$/ do |text, selector|
|
95
|
+
with_scope(selector) do
|
96
|
+
if defined?(Spec::Rails::Matchers)
|
97
|
+
page.should have_content(text)
|
98
|
+
else
|
99
|
+
assert page.has_content?(text)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
Then /^(?:|I )should see \/([^\/]*)\/(?: within "([^\"]*)")?$/ do |regexp, selector|
|
105
|
+
regexp = Regexp.new(regexp)
|
106
|
+
with_scope(selector) do
|
107
|
+
if defined?(Spec::Rails::Matchers)
|
108
|
+
page.should have_xpath('//*', :text => regexp)
|
109
|
+
else
|
110
|
+
assert page.has_xpath?('//*', :text => regexp)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
Then /^(?:|I )should not see "([^\"]*)"(?: within "([^\"]*)")?$/ do |text, selector|
|
116
|
+
with_scope(selector) do
|
117
|
+
if defined?(Spec::Rails::Matchers)
|
118
|
+
page.should have_no_content(text)
|
119
|
+
else
|
120
|
+
assert page.has_no_content?(text)
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
Then /^(?:|I )should not see \/([^\/]*)\/(?: within "([^\"]*)")?$/ do |regexp, selector|
|
126
|
+
regexp = Regexp.new(regexp)
|
127
|
+
with_scope(selector) do
|
128
|
+
if defined?(Spec::Rails::Matchers)
|
129
|
+
page.should have_no_xpath('//*', :text => regexp)
|
130
|
+
else
|
131
|
+
assert page.has_no_xpath?('//*', :text => regexp)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
Then /^the "([^\"]*)" field(?: within "([^\"]*)")? should contain "([^\"]*)"$/ do |field, selector, value|
|
137
|
+
with_scope(selector) do
|
138
|
+
if defined?(Spec::Rails::Matchers)
|
139
|
+
find_field(field).value.should =~ /#{value}/
|
140
|
+
else
|
141
|
+
assert_match(/#{value}/, field_labeled(field).value)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
Then /^the "([^\"]*)" field(?: within "([^\"]*)")? should not contain "([^\"]*)"$/ do |field, selector, value|
|
147
|
+
with_scope(selector) do
|
148
|
+
if defined?(Spec::Rails::Matchers)
|
149
|
+
find_field(field).value.should_not =~ /#{value}/
|
150
|
+
else
|
151
|
+
assert_no_match(/#{value}/, find_field(field).value)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
Then /^the "([^\"]*)" checkbox(?: within "([^\"]*)")? should be checked$/ do |label, selector|
|
157
|
+
with_scope(selector) do
|
158
|
+
if defined?(Spec::Rails::Matchers)
|
159
|
+
find_field(label)['checked'].should == 'checked'
|
160
|
+
else
|
161
|
+
assert field_labeled(label)['checked'] == 'checked'
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
Then /^the "([^\"]*)" checkbox(?: within "([^\"]*)")? should not be checked$/ do |label, selector|
|
167
|
+
with_scope(selector) do
|
168
|
+
if defined?(Spec::Rails::Matchers)
|
169
|
+
find_field(label)['checked'].should_not == 'checked'
|
170
|
+
else
|
171
|
+
assert field_labeled(label)['checked'] != 'checked'
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
Then /^(?:|I )should be on (.+)$/ do |page_name|
|
177
|
+
current_path = URI.parse(current_url).select(:path, :query).compact.join('?')
|
178
|
+
if defined?(Spec::Rails::Matchers)
|
179
|
+
current_path.should == path_to(page_name)
|
180
|
+
else
|
181
|
+
assert_equal path_to(page_name), current_path
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
Then /^show me the page$/ do
|
186
|
+
save_and_open_page
|
187
|
+
end
|
@@ -0,0 +1,136 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
<%= embed_file('support/edit_warning.txt') %>
|
3
|
+
|
4
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
|
5
|
+
|
6
|
+
Given /^jsem na (.+)$/ do |page_name|
|
7
|
+
Given %{I am on #{page_name}}
|
8
|
+
end
|
9
|
+
|
10
|
+
When /^jdu na (.+)$/ do |page_name|
|
11
|
+
When %{I go to #{page_name}}
|
12
|
+
end
|
13
|
+
|
14
|
+
When /^stisknu tlačítko "([^\"]*)"$/ do |button|
|
15
|
+
When %{I press "#{button}"}
|
16
|
+
end
|
17
|
+
|
18
|
+
When /^kliknu na "([^\"]*)"$/ do |link|
|
19
|
+
When %{I follow "#{link}"}
|
20
|
+
end
|
21
|
+
|
22
|
+
When /^kliknu na "([^\"]*)" uvnitř "([^\"]*)"$/ do |link, parent|
|
23
|
+
When %{I follow "#{link}" within "#{parent}"}
|
24
|
+
end
|
25
|
+
|
26
|
+
When /^vyplním pole "([^\"]*)" hodnotou "([^\"]*)"$/ do |field, value|
|
27
|
+
When %{I fill in "#{field}" with "#{value}"}
|
28
|
+
end
|
29
|
+
|
30
|
+
When /^vyplním "([^\"]*)" do pole "([^\"]*)"$/ do |value, field|
|
31
|
+
When %{I fill in "#{value}" for "#{field}"}
|
32
|
+
end
|
33
|
+
|
34
|
+
When /^vyplním následující:$/ do |fields|
|
35
|
+
When %{I fill in the following:}, fields
|
36
|
+
end
|
37
|
+
|
38
|
+
When /^vyberu "([^\"]*)" z "([^\"]*)"$/ do |value, field|
|
39
|
+
When %{I select "#{value}" from "#{field}"}
|
40
|
+
end
|
41
|
+
|
42
|
+
When /^vyberu "([^\"]*)" jako datum a čas$/ do |time|
|
43
|
+
When %{I select "#{time}" as the date and time}
|
44
|
+
end
|
45
|
+
|
46
|
+
When /^vyberu "([^\"]*)" jako "([^\"]*)" datum a čas$/ do |datetime, datetime_label|
|
47
|
+
When %{I select "#{datetime}" as the "#{datetime_label}" date and time}
|
48
|
+
end
|
49
|
+
|
50
|
+
When /^vyberu "([^\"]*)" jako čas$/ do |time|
|
51
|
+
When %{I select "#{time}" as the time}
|
52
|
+
end
|
53
|
+
|
54
|
+
When /^vyberu "([^\"]*)" jako "([^\"]*)" čas$/ do |time, time_label|
|
55
|
+
When %{I select "#{time}" as the "#{time_label}" time}
|
56
|
+
end
|
57
|
+
|
58
|
+
When /^vyberu cd jako datum$/ do |date|
|
59
|
+
When %{I select "#{date}" as the date}
|
60
|
+
end
|
61
|
+
|
62
|
+
When /^vyberu "([^\"]*)" jako "([^\"]*)" datum$/ do |date, date_label|
|
63
|
+
When %{I select "#{date}" as the "#{date_label}" date}
|
64
|
+
end
|
65
|
+
|
66
|
+
When /^zaškrtnu "([^\"]*)"$/ do |field|
|
67
|
+
When %{I check "#{field}"}
|
68
|
+
end
|
69
|
+
|
70
|
+
When /^vyškrtnu "([^\"]*)"$/ do |field|
|
71
|
+
When %{I uncheck "#{field}"}
|
72
|
+
end
|
73
|
+
|
74
|
+
When /^vyberu "([^\"]*)"$/ do |field|
|
75
|
+
When %{I choose "#{field}"}
|
76
|
+
end
|
77
|
+
|
78
|
+
When /^připojím soubor "([^\"]*)" do pole "([^\"]*)"$/ do |path, field|
|
79
|
+
When %{I attach the file "#{path}" to "#{field}"}
|
80
|
+
end
|
81
|
+
|
82
|
+
Then /^(?:|také )bych měl vidět "([^\"]*)"$/ do |text|
|
83
|
+
Then %{I should see "#{text}"}
|
84
|
+
end
|
85
|
+
|
86
|
+
Then /^(?:|také )bych měl vidět "([^\"]*)" uvnitř "([^\"]*)"$/ do |text, selector|
|
87
|
+
Then %{I should see "#{text}" within "#{selector}"}
|
88
|
+
end
|
89
|
+
|
90
|
+
Then /^(?:|také )bych měl vidět \/([^\/]*)\/$/ do |regexp|
|
91
|
+
Then %{I should see /#{regexp}/}
|
92
|
+
end
|
93
|
+
|
94
|
+
Then /^(?:|také )bych měl vidět \/([^\/]*)\/ uvnitř "([^\"]*)"$/ do |regexp, selector|
|
95
|
+
Then %{I should see /#{regexp}/ within "#{selector}"}
|
96
|
+
end
|
97
|
+
|
98
|
+
Then /^(?:|také )bych neměl vidět "([^\"]*)"$/ do |text|
|
99
|
+
Then %{I should not see "#{text}"}
|
100
|
+
end
|
101
|
+
|
102
|
+
Then /^(?:|také )bych neměl vidět "([^\"]*)" uvnitř "([^\"]*)"$/ do |text, selector|
|
103
|
+
Then %{I should not see "#{text}" within "#{selector}"}
|
104
|
+
end
|
105
|
+
|
106
|
+
Then /^(?:|také )bych neměl vidět \/([^\/]*)\/$/ do |regexp|
|
107
|
+
Then %{I should not see /#{regexp}/}
|
108
|
+
end
|
109
|
+
|
110
|
+
Then /^(?:|také )bych neměl vidět \/([^\/]*)\/ uvnitř "([^\"]*)"$/ do |regexp, selector|
|
111
|
+
Then %{I should not see /#{regexp}/ within "#{selector}"}
|
112
|
+
end
|
113
|
+
|
114
|
+
Then /^pole "([^\"]*)" by mělo obsahovat "([^\"]*)"$/ do |field, value|
|
115
|
+
Then %{the "#{field}" field should contain "#{value}"}
|
116
|
+
end
|
117
|
+
|
118
|
+
Then /^pole "([^\"]*)" by nemělo obsahovat "([^\"]*)"$/ do |field, value|
|
119
|
+
Then %{the "#{field}" field should not contain "#{value}"}
|
120
|
+
end
|
121
|
+
|
122
|
+
Then /^pole "([^\"]*)" by mělo být zaškrtnuté$/ do |label|
|
123
|
+
Then %{the "#{label}" checkbox should be checked}
|
124
|
+
end
|
125
|
+
|
126
|
+
Then /^pole "([^\"]*)" by nemělo být zaškrtnuté$/ do |label|
|
127
|
+
Then %{the "#{label}" checkbox should not be checked}
|
128
|
+
end
|
129
|
+
|
130
|
+
Then /^(?:|také )bych měl být na (.+)$/ do |page_name|
|
131
|
+
Then %{I should be on #{page_name}}
|
132
|
+
end
|
133
|
+
|
134
|
+
Then /^(?:|také )mi ukaž stránku$/ do
|
135
|
+
Then %{show me the page}
|
136
|
+
end
|
@@ -0,0 +1,136 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
<%= embed_file('support/edit_warning.txt') %>
|
3
|
+
|
4
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
|
5
|
+
|
6
|
+
Given /^(?:|ich )bin auf (.+)$/ do |page_name|
|
7
|
+
Given %{I am on #{page_name}}
|
8
|
+
end
|
9
|
+
|
10
|
+
When /^(?:|ich )auf (.+) gehe$/ do |page_name|
|
11
|
+
When %{I go to #{page_name}}
|
12
|
+
end
|
13
|
+
|
14
|
+
When /^(?:|ich )auf "([^\"]*)" drücke$/ do |button|
|
15
|
+
When %{I press "#{button}"}
|
16
|
+
end
|
17
|
+
|
18
|
+
When /^(?:|ich )auf "([^\"]*)" klicke$/ do |link|
|
19
|
+
When %{I follow "#{link}"}
|
20
|
+
end
|
21
|
+
|
22
|
+
When /^(?:|ich )auf "([^\"]*)" innerhalb "([^\"]*)" klicke$/ do |link, parent|
|
23
|
+
When %{I follow "#{link}" within "#{parent}"}
|
24
|
+
end
|
25
|
+
|
26
|
+
When /^(?:|ich )"([^\"]*)" mit "([^\"]*)" ausfülle$/ do |field, value|
|
27
|
+
When %{I fill in "#{field}" with "#{value}"}
|
28
|
+
end
|
29
|
+
|
30
|
+
When /^(?:|ich )"([^\"]*)" in "([^\"]*)" eingebe$/ do |value, field|
|
31
|
+
When %{I fill in "#{value}" for "#{field}"}
|
32
|
+
end
|
33
|
+
|
34
|
+
When /^(?:|ich )folgendes eingebe:$/ do |fields|
|
35
|
+
When %{I fill in the following:}, fields
|
36
|
+
end
|
37
|
+
|
38
|
+
When /^(?:|ich )"([^\"]*)" in "([^\"]*)" auswähle$/ do |value, field|
|
39
|
+
When %{I select "#{value}" from "#{field}"}
|
40
|
+
end
|
41
|
+
|
42
|
+
When /^(?:|ich )"([^\"]*)" als Datum und Uhrzeit auswähle$/ do |time|
|
43
|
+
When %{I select "#{time}" as the date and time}
|
44
|
+
end
|
45
|
+
|
46
|
+
When /^(?:|ich )"([^\"]*)" als "([^\"]*)" Datum und Uhrzeit auswähle$/ do |datetime, datetime_label|
|
47
|
+
When %{I select "#{datetime}" as the "#{datetime_label}" date and time}
|
48
|
+
end
|
49
|
+
|
50
|
+
When /^(?:|ich )"([^\"]*)" als Uhrzeit auswähle$/ do |time|
|
51
|
+
When %{I select "#{time}" as the time}
|
52
|
+
end
|
53
|
+
|
54
|
+
When /^(?:|ich )"([^\"]*)" als "([^\"]*)" Uhrzeit auswähle$/ do |time, time_label|
|
55
|
+
When %{I select "#{time}" as the "#{time_label}" time}
|
56
|
+
end
|
57
|
+
|
58
|
+
When /^(?:|ich )"([^\"]*)" als Datum auswähle$/ do |date|
|
59
|
+
When %{I select "#{date}" as the date}
|
60
|
+
end
|
61
|
+
|
62
|
+
When /^(?:|ich )"([^\"]*)" als "([^\"]*)" Datum auswähle$/ do |date, date_label|
|
63
|
+
When %{I select "#{date}" as the "#{date_label}" date}
|
64
|
+
end
|
65
|
+
|
66
|
+
When /^(?:|ich )"([^\"]*)" anhake$/ do |field|
|
67
|
+
When %{I check "#{field}"}
|
68
|
+
end
|
69
|
+
|
70
|
+
When /^(?:|ich )"([^\"]*)" abhake$/ do |field|
|
71
|
+
When %{I uncheck "#{field}"}
|
72
|
+
end
|
73
|
+
|
74
|
+
When /^(?:|ich )"([^\"]*)" auswähle$/ do |field|
|
75
|
+
When %{I choose "#{field}"}
|
76
|
+
end
|
77
|
+
|
78
|
+
When /^(?:|ich )die Datei "([^\"]*)" als "([^\"]*)" anhänge$/ do |path, field|
|
79
|
+
When %{I attach the file "#{path}" to "#{field}"}
|
80
|
+
end
|
81
|
+
|
82
|
+
Then /^(?:|ich sollte |sollte (?:|ich )?)"([^\"]*)" sehen$/ do |text|
|
83
|
+
Then %{I should see "#{text}"}
|
84
|
+
end
|
85
|
+
|
86
|
+
Then /^(?:|ich sollte |sollte (?:|ich )?)"([^\"]*)" innerhalb "([^\"]*)" sehen$/ do |text, selector|
|
87
|
+
Then %{I should see "#{text}" within "#{selector}"}
|
88
|
+
end
|
89
|
+
|
90
|
+
Then /^(?:|ich sollte |sollte (?:|ich )?)\/([^\/]*)\/ sehen$/ do |regexp|
|
91
|
+
Then %{I should see /#{regexp}/}
|
92
|
+
end
|
93
|
+
|
94
|
+
Then /^(?:|ich sollte |sollte (?:|ich )?)\/([^\/]*)\/ innerhalb "([^\"]*)" sehen$/ do |regexp, selector|
|
95
|
+
Then %{I should see /#{regexp}/ within "#{selector}"}
|
96
|
+
end
|
97
|
+
|
98
|
+
Then /^(?:|ich sollte |sollte (?:|ich )?)nicht "([^\"]*)" sehen$/ do |text|
|
99
|
+
Then %{I should not see "#{text}"}
|
100
|
+
end
|
101
|
+
|
102
|
+
Then /^(?:|ich sollte |sollte (?:|ich )?)nicht "([^\"]*)" innerhalb "([^\"]*)" sehen$/ do |text, selector|
|
103
|
+
Then %{I should not see "#{text}" within "#{selector}"}
|
104
|
+
end
|
105
|
+
|
106
|
+
Then /^(?:|ich sollte |sollte (?:|ich )?)nicht \/([^\/]*)\/ sehen$/ do |regexp|
|
107
|
+
Then %{I should not see /#{regexp}/}
|
108
|
+
end
|
109
|
+
|
110
|
+
Then /^(?:|ich sollte |sollte (?:|ich )?)nicht \/([^\/]*)\/ innerhalb "([^\"]*)" sehen$/ do |regexp, selector|
|
111
|
+
Then %{I should not see /#{regexp}/ within "#{selector}"}
|
112
|
+
end
|
113
|
+
|
114
|
+
Then /^sollte das "([^\"]*)" Feld "([^\"]*)" enthalten$/ do |field, value|
|
115
|
+
Then %{the "#{field}" field should contain "#{value}"}
|
116
|
+
end
|
117
|
+
|
118
|
+
Then /^sollte das "([^\"]*)" Feld nicht "([^\"]*)" enthalten$/ do |field, value|
|
119
|
+
Then %{the "#{field}" field should not contain "#{value}"}
|
120
|
+
end
|
121
|
+
|
122
|
+
Then /^sollte die "([^\"]*)" Checkbox angehakt sein$/ do |label|
|
123
|
+
Then %{the "#{label}" checkbox should be checked}
|
124
|
+
end
|
125
|
+
|
126
|
+
Then /^sollte die "([^\"]*)" Checkbox nicht angehakt sein$/ do |label|
|
127
|
+
Then %{the "#{label}" checkbox should not be checked}
|
128
|
+
end
|
129
|
+
|
130
|
+
Then /^(?:|ich sollte |sollte (?:|ich )?)auf (.+) sein$/ do |page_name|
|
131
|
+
Then %{I should be on #{page_name}}
|
132
|
+
end
|
133
|
+
|
134
|
+
Then /^zeig mir die Seite$/ do
|
135
|
+
Then %{show me the page}
|
136
|
+
end
|