Hello Satyajit/clemens,
Thanks for your reply.
On the controller side once the request is completed
I am doing
render :update do |page|
flash[:notice] = "Invitation sent successfully to #[email protected]}"
page.replace_html "something", :partial => "some_partial"
end
*So this works fine when I am testing it on a browser. but it get failed
when I do the same thing with cucumber.
something.feature* -->
Scenario: something
Given blah blah blah
And I fill in "name" with "abhis"
And I fill in "email" with "[email protected]"
And I press "Add"
Then a invitation message should be sent to "[email protected]"
*something_steps.rb
*Then /^a invitation message should be sent to "([^\"]*)"$/ do |email|
And "I should see \"Invitation sent successfully to #{email}\""
end*
*
Thanks for any help.
Thanks
Abhis
On Tue, Dec 1, 2009 at 12:40 PM, Clemens <[email protected]> wrote:
> Are you using Webrat::Selenium, watir or selenium?
> Plain webrat won't suffice as you can't emulate javascript (including
> the ajax callback)...
>
> On 30 Nov., 13:55, Abhishek shukla <[email protected]> wrote:
> > Hello Friends,
> >
> > The following error I am getting when Testing the app
> >
> > Then a invitation message should be sent to "[email protected]"
> #
> > features/step_definitions/office_staff_steps.rb:5
> > expected the following element's content to include "Invitation sent
> > successfully":
> > window.location.href = "/office_staffs";
> > (Spec::Expectations::ExpectationNotMetError)
> >
> > Then /^a invitation message should be sent to "([^\"]*)"$/ do |arg1|
> > And "I should see \"Invitation sent successfully\""
> > end
> >
> > And the same is working fine on the browser.
> >
> > Let me know if someone has the same problem.
> >
> > Thanks
> > Abhis
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
>
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.