Commit 8770d20bffd953a25c0342e42e0c773fcf3ec7be
1 parent
70cba036
Exists in
master
and in
29 other branches
step-definitions: add should not see within any step
Showing
1 changed file
with
8 additions
and
0 deletions
Show diff stats
features/step_definitions/web_steps.rb
... | ... | @@ -163,6 +163,14 @@ Then /^(?:|I )should not see \/([^\/]*)\/(?: within "([^"]*)")?$/ do |regexp, se |
163 | 163 | end |
164 | 164 | end |
165 | 165 | |
166 | +Then /^(?:|I )should not see "([^"]*)" within any "([^"]*)"?$/ do |text, selector| | |
167 | + if page.respond_to? :should | |
168 | + page.should have_no_css(selector, :text => text) | |
169 | + else | |
170 | + assert page.has_no_css?(selector, :text => text) | |
171 | + end | |
172 | +end | |
173 | + | |
166 | 174 | Then /^the "([^"]*)" field(?: within "([^"]*)")? should contain "([^"]*)"$/ do |field, selector, value| |
167 | 175 | with_scope(selector) do |
168 | 176 | field = find_field(field) | ... | ... |