[rspec-users] [cucumber] Features with multiple user iterations ¿?
aidy lewis
aidy.lewis at googlemail.com
Wed Jan 21 10:27:54 EST 2009
Hi David,
On 21/01/2009, David Chelimsky <dchelimsky at gmail.com> wrote:
> text on the button that is deemed to have business value, then you
> might say "And I click 'Request Service'" - but if you're referencing
> DOM IDs or HTML element names like 'submit', I'd hide those.
However we could get a lot of re-use in the user steps if we have
step definitions like these:
When /^clicks '(+)' link$/ do |text|
browser.link(:text, Regexp.new(value)).click
end
When /^clicks '(+)' button$/ do |text|
browser.button(:value, Regexp.new(value)).click
end
When clicks 'Submit' link
When clicks 'Submit' button
When clicks 'New' link
When clicks 'New' button
I personally don't think it is a crime for the tester to change the
acceptance steps as long as the 'user' can easily follow the
narrative.
A lot of the other user-steps could be wrapped-up in a more
'declarative' fashion.
Aidy
More information about the rspec-users
mailing list