|
1 |
| -# IMPORTANT: This file was generated by Cucumber 0.4.2 |
| 1 | +# IMPORTANT: This file was generated by Cucumber 0.4.4 |
2 | 2 | # Edit at your own peril - it's recommended to regenerate this file
|
3 | 3 | # in the future when you upgrade to a newer version of Cucumber.
|
4 | 4 | # Consider adding your own code to a new file instead of editing this one.
|
|
8 | 8 | # Commonly used webrat steps
|
9 | 9 | # http://github.com/brynary/webrat
|
10 | 10 |
|
11 |
| -Given /^I am on (.+)$/ do |page_name| |
| 11 | +Given /^(?:|I )am on (.+)$/ do |page_name| |
12 | 12 | visit path_to(page_name)
|
13 | 13 | end
|
14 | 14 |
|
15 |
| -When /^I go to (.+)$/ do |page_name| |
| 15 | +When /^(?:|I )go to (.+)$/ do |page_name| |
16 | 16 | visit path_to(page_name)
|
17 | 17 | end
|
18 | 18 |
|
19 |
| -When /^I press "([^\"]*)"$/ do |button| |
| 19 | +When /^(?:|I )press "([^\"]*)"$/ do |button| |
20 | 20 | click_button(button)
|
21 | 21 | end
|
22 | 22 |
|
23 |
| -When /^I follow "([^\"]*)"$/ do |link| |
| 23 | +When /^(?:|I )follow "([^\"]*)"$/ do |link| |
24 | 24 | click_link(link)
|
25 | 25 | end
|
26 | 26 |
|
27 |
| -When /^I follow "([^\"]*)" within "([^\"]*)"$/ do |link, parent| |
| 27 | +When /^(?:|I )follow "([^\"]*)" within "([^\"]*)"$/ do |link, parent| |
28 | 28 | click_link_within(parent, link)
|
29 | 29 | end
|
30 | 30 |
|
31 |
| -When /^I fill in "([^\"]*)" with "([^\"]*)"$/ do |field, value| |
| 31 | +When /^(?:|I )fill in "([^\"]*)" with "([^\"]*)"$/ do |field, value| |
32 | 32 | fill_in(field, :with => value)
|
33 | 33 | end
|
34 | 34 |
|
35 |
| -When /^I fill in "([^\"]*)" for "([^\"]*)"$/ do |value, field| |
| 35 | +When /^(?:|I )fill in "([^\"]*)" for "([^\"]*)"$/ do |value, field| |
36 | 36 | fill_in(field, :with => value)
|
37 | 37 | end
|
38 | 38 |
|
|
47 | 47 | # TODO: Add support for checkbox, select og option
|
48 | 48 | # based on naming conventions.
|
49 | 49 | #
|
50 |
| -When /^I fill in the following:$/ do |fields| |
| 50 | +When /^(?:|I )fill in the following:$/ do |fields| |
51 | 51 | fields.rows_hash.each do |name, value|
|
52 | 52 | When %{I fill in "#{name}" with "#{value}"}
|
53 | 53 | end
|
54 | 54 | end
|
55 | 55 |
|
56 |
| -When /^I select "([^\"]*)" from "([^\"]*)"$/ do |value, field| |
| 56 | +When /^(?:|I )select "([^\"]*)" from "([^\"]*)"$/ do |value, field| |
57 | 57 | select(value, :from => field)
|
58 | 58 | end
|
59 | 59 |
|
60 | 60 | # Use this step in conjunction with Rail's datetime_select helper. For example:
|
61 | 61 | # When I select "December 25, 2008 10:00" as the date and time
|
62 |
| -When /^I select "([^\"]*)" as the date and time$/ do |time| |
| 62 | +When /^(?:|I )select "([^\"]*)" as the date and time$/ do |time| |
63 | 63 | select_datetime(time)
|
64 | 64 | end
|
65 | 65 |
|
|
72 | 72 | # The following steps would fill out the form:
|
73 | 73 | # When I select "November 23, 2004 11:20" as the "Preferred" date and time
|
74 | 74 | # And I select "November 25, 2004 10:30" as the "Alternative" date and time
|
75 |
| -When /^I select "([^\"]*)" as the "([^\"]*)" date and time$/ do |datetime, datetime_label| |
| 75 | +When /^(?:|I )select "([^\"]*)" as the "([^\"]*)" date and time$/ do |datetime, datetime_label| |
76 | 76 | select_datetime(datetime, :from => datetime_label)
|
77 | 77 | end
|
78 | 78 |
|
79 | 79 | # Use this step in conjunction with Rail's time_select helper. For example:
|
80 | 80 | # When I select "2:20PM" as the time
|
81 | 81 | # Note: Rail's default time helper provides 24-hour time-- not 12 hour time. Webrat
|
82 | 82 | # will convert the 2:20PM to 14:20 and then select it.
|
83 |
| -When /^I select "([^\"]*)" as the time$/ do |time| |
| 83 | +When /^(?:|I )select "([^\"]*)" as the time$/ do |time| |
84 | 84 | select_time(time)
|
85 | 85 | end
|
86 | 86 |
|
87 | 87 | # Use this step when using multiple time_select helpers on a page or you want to
|
88 | 88 | # specify the name of the time on the form. For example:
|
89 | 89 | # When I select "7:30AM" as the "Gym" time
|
90 |
| -When /^I select "([^\"]*)" as the "([^\"]*)" time$/ do |time, time_label| |
| 90 | +When /^(?:|I )select "([^\"]*)" as the "([^\"]*)" time$/ do |time, time_label| |
91 | 91 | select_time(time, :from => time_label)
|
92 | 92 | end
|
93 | 93 |
|
94 | 94 | # Use this step in conjunction with Rail's date_select helper. For example:
|
95 | 95 | # When I select "February 20, 1981" as the date
|
96 |
| -When /^I select "([^\"]*)" as the date$/ do |date| |
| 96 | +When /^(?:|I )select "([^\"]*)" as the date$/ do |date| |
97 | 97 | select_date(date)
|
98 | 98 | end
|
99 | 99 |
|
100 | 100 | # Use this step when using multiple date_select helpers on one page or
|
101 | 101 | # you want to specify the name of the date on the form. For example:
|
102 | 102 | # When I select "April 26, 1982" as the "Date of Birth" date
|
103 |
| -When /^I select "([^\"]*)" as the "([^\"]*)" date$/ do |date, date_label| |
| 103 | +When /^(?:|I )select "([^\"]*)" as the "([^\"]*)" date$/ do |date, date_label| |
104 | 104 | select_date(date, :from => date_label)
|
105 | 105 | end
|
106 | 106 |
|
107 |
| -When /^I check "([^\"]*)"$/ do |field| |
| 107 | +When /^(?:|I )check "([^\"]*)"$/ do |field| |
108 | 108 | check(field)
|
109 | 109 | end
|
110 | 110 |
|
111 |
| -When /^I uncheck "([^\"]*)"$/ do |field| |
| 111 | +When /^(?:|I )uncheck "([^\"]*)"$/ do |field| |
112 | 112 | uncheck(field)
|
113 | 113 | end
|
114 | 114 |
|
115 |
| -When /^I choose "([^\"]*)"$/ do |field| |
| 115 | +When /^(?:|I )choose "([^\"]*)"$/ do |field| |
116 | 116 | choose(field)
|
117 | 117 | end
|
118 | 118 |
|
119 |
| -When /^I attach the file at "([^\"]*)" to "([^\"]*)"$/ do |path, field| |
| 119 | +When /^(?:|I )attach the file at "([^\"]*)" to "([^\"]*)"$/ do |path, field| |
120 | 120 | attach_file(field, path)
|
121 | 121 | end
|
122 | 122 |
|
123 |
| -Then /^I should see "([^\"]*)"$/ do |text| |
| 123 | +Then /^(?:|I )should see "([^\"]*)"$/ do |text| |
124 | 124 | response.should contain(text)
|
125 | 125 | end
|
126 | 126 |
|
127 |
| -Then /^I should see "([^\"]*)" within "([^\"]*)"$/ do |text, selector| |
| 127 | +Then /^(?:|I )should see "([^\"]*)" within "([^\"]*)"$/ do |text, selector| |
128 | 128 | within(selector) do |content|
|
129 | 129 | content.should contain(text)
|
130 | 130 | end
|
131 | 131 | end
|
132 | 132 |
|
133 |
| -Then /^I should see \/([^\/]*)\/$/ do |regexp| |
| 133 | +Then /^(?:|I )should see \/([^\/]*)\/$/ do |regexp| |
134 | 134 | regexp = Regexp.new(regexp)
|
135 | 135 | response.should contain(regexp)
|
136 | 136 | end
|
137 | 137 |
|
138 |
| -Then /^I should see \/([^\/]*)\/ within "([^\"]*)"$/ do |regexp, selector| |
| 138 | +Then /^(?:|I )should see \/([^\/]*)\/ within "([^\"]*)"$/ do |regexp, selector| |
139 | 139 | within(selector) do |content|
|
140 | 140 | regexp = Regexp.new(regexp)
|
141 | 141 | content.should contain(regexp)
|
142 | 142 | end
|
143 | 143 | end
|
144 | 144 |
|
145 |
| -Then /^I should not see "([^\"]*)"$/ do |text| |
| 145 | +Then /^(?:|I )should not see "([^\"]*)"$/ do |text| |
146 | 146 | response.should_not contain(text)
|
147 | 147 | end
|
148 | 148 |
|
149 |
| -Then /^I should not see "([^\"]*)" within "([^\"]*)"$/ do |text, selector| |
| 149 | +Then /^(?:|I )should not see "([^\"]*)" within "([^\"]*)"$/ do |text, selector| |
150 | 150 | within(selector) do |content|
|
151 | 151 | content.should_not contain(text)
|
152 | 152 | end
|
153 | 153 | end
|
154 | 154 |
|
155 |
| -Then /^I should not see \/([^\/]*)\/$/ do |regexp| |
| 155 | +Then /^(?:|I )should not see \/([^\/]*)\/$/ do |regexp| |
156 | 156 | regexp = Regexp.new(regexp)
|
157 | 157 | response.should_not contain(regexp)
|
158 | 158 | end
|
159 | 159 |
|
160 |
| -Then /^I should not see \/([^\/]*)\/ within "([^\"]*)"$/ do |regexp, selector| |
| 160 | +Then /^(?:|I )should not see \/([^\/]*)\/ within "([^\"]*)"$/ do |regexp, selector| |
161 | 161 | within(selector) do |content|
|
162 | 162 | regexp = Regexp.new(regexp)
|
163 | 163 | content.should_not contain(regexp)
|
|
180 | 180 | field_labeled(label).should_not be_checked
|
181 | 181 | end
|
182 | 182 |
|
183 |
| -Then /^I should be on (.+)$/ do |page_name| |
| 183 | +Then /^(?:|I )should be on (.+)$/ do |page_name| |
184 | 184 | URI.parse(current_url).path.should == path_to(page_name)
|
185 | 185 | end
|
186 | 186 |
|
|
0 commit comments