Displaying 13 results from an estimated 13 matches for "click_button".
Did you mean:
clicks_button
2013 May 12
10
Capybara with redirect
I am having an issue where a feature works fine but the corresponding
test fails, and I can''t understand why.
I created a mock application to demonstrate the problem.
https://github.com/assafshomer/clear_button
All it does is show an input form with a clear button. The clearing
happens by redirecting back to the same form. It does clear it when you
run the app, but the test for it
2007 Jan 26
0
Problems with assert_select in integration tests
...irst step, my assert_selects fail on the attempts to
find the form on the next page. However if I print out the response
object, it has the exact text of what I''m trying to match.
Here is the complete integration test. The failure occures on the
first assert_select in the second call to click_button.
require "#{File.dirname(__FILE__)}/../test_helper"
class AccountCreationTest < ActionController::IntegrationTest
def test_personal_account_creation
goto_home_page
click_link "Create Account", "/account/new_account_step_one"
click_button "Next...
2013 May 02
1
trouble-with-capybara-and-rspec-on-a-new-model-spec
...n after watching Michael Hartl''s tutorial and
when i fill data manually and submit it nothing happens and nothing records
in the Mailers table and I am facing the following error:
Failures:
1) Mailer pages mail us with valid information should send a mail
Failure/Error: expect { click_button submit}.to change(Mailer, :count).by(1)
count should have been changed by 1, but was changed by 0
# ./spec/requests/mailer_pages_spec.rb:31:in `block (4 levels) in <top (required)>''
Finished in 0.89134 seconds2 examples, 1 failure
Failed examples:
rspec ./spec/requests/m...
2011 Mar 21
1
Getting user session object in cucumber
...ven /^user on (.+)$/ do |page_name|
visit path_to(page_name)
end
When /^user login with valid credentials$/ do
fill_in(''Email'', :with=>"john_rennie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org")
fill_in(''Password'', :with=>"neova123")
click_button("Login")
end
Then /^user should be on project (.+)$/ do |page_name|
current_path = URI.parse(current_url).path
if current_path.respond_to? :should
current_path.should == path_to(page_name)
else
assert_equal path_to(page_name), current_path
end
end
When /^user create a pr...
2009 Feb 02
5
[Cucumber] Cucumber and acts_as_xapian
...ind" fluff
that has been indexed..
In a scenario, I''m adding a bunch of articles, and in the actual
search step, I run:
When "I search for \"$query\"" do |query|
%x[rake RAILS_ENV=test xapian:update_index]
fill_in "Search", :with => query
click_button ''Search''
end
At this point in the scenario, I can see there are articles in the
database. But if I try to query the articles using xapian after the
update_index rake task has run, I don''t see any results.
Could this have to do with transactional fixtures or something...
2008 Dec 02
4
Using Cucumber with latest Webrat
...on:0x7f3d871693d0> (NoMethodError)
So I had to change the require in env.rb to
require ''webrat/rails''
It worked but I got the following deprecation errors:
visits is deprecated. Use visit instead.
fills_in is deprecated. Use fill_in instead.
clicks_button is deprecated. Use click_button instead.
I changed these in my steps file, and it worked fine.
The problem with requiring webrat from webrat_steps, is that when this
line is executed, the $LOAD_PATHS has not been modified to include the
plugin lib directories. That is done by support/env.rb. The rake task
"features"...
2010 Dec 20
1
Check whether link present nor not using cucumber
...ink should be shown
My Step definition code is like as follows:-
When /^I login with user "([^"]*)" with password "([^"]*)"$/ do |login,
password|
visit "/"
fill_in "login", :with=>login
fill_in "password", :with=>password
click_button "Log in"
# File.open("response.html", ''w'') {|f| f.write( response.body) }
# response.should contain("Logged in successfully")
end
Then /^"([^"]*)" link should be shown$/ do |arg1|
clicks_link user_list_path
#pending # express the...
2011 Mar 27
2
LinkedIn still not working?
...cessive memory usage
agent.user_agent_alias = ''Mac Safari''
page = agent.get(https://www.linkedin.com/secure/login?trk=hb_signin)
form = page.form(''login'')
form.session_key = USERNAME
form.session_password = PASSWORD
new_page = form.click_button
Any help would be appreciated.
Lonny Eachus
============
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/mechanize-users/attachments/20110327/f3233d73/attachment.html>
2006 Nov 07
0
Wiki -> RSpec -> Watir
...tate, with its
intermediate data.
To drive that test, in the right panel I put RSpec and Watir. So the code to
log into a website would look like this:
input_text ''login'', ''quentin''
input_text ''password'', ''test''
click_button ''commit''
@browser.should_contain(''Logged in successfully'')
@browser.should_contain(''greetings quentin'')
The point of RSpec is syntactic sugar, and I have not yet learned how much
sweeter I can make that. So far, I have learned how to u...
2012 Feb 16
0
Upgrading from 3.2.0 to 3.2.1: Wrong Number of Arguments
...deleted successfully")
Album.count.should eq 2
end
But fails in 3.2.1 with:
1) Albums destroys an album
Failure/Error: login_admin
ArgumentError:
wrong number of arguments (0 for 1)
# ./app/controllers/sessions_controller.rb:8:in `create''
# (eval):2:in `click_button''
# ./spec/requests/albums_spec.rb:7:in `block (2 levels) in <top
(required)>''
Line 8 in sessions_controller is:
user = User.find_by_email(params[:email])
What''s going on here? Here''s the diff in the Gemfile.lock after making
the upgrade:
- act...
2009 Apr 09
1
undefined method ''text'' ...
...39;') do |page|
# Click the login link
login_page = a.click(page.links.text(/Log In/))
# Submit the login form
my_page = login_page.form_with(:action => ''/account/login.php'') do |f|
f.form_loginname = ARGV[0]
f.form_pw = ARGV[1]
end.click_button
my_page.links.each do |link|
text = link.text.strip
next unless text.length > 0
puts text
end
end
*****
with command
/opt/local/bin/ruby rubyforge.rb
but getting
rubyforge.rb:7: undefined method `text'' for #<Array:0x16d2940>
(NoMethodError)...
2008 Sep 30
4
Using the response object in stories
I have this statement in the layout of my application (using haml)
- if request.env["HTTP_USER_AGENT"].include?("MSIE")
= stylesheet_link_tag ''blueprint/ie.css''
= stylesheet_link_tag ''confirm_ie.css''
The problem is that request.env["HTTP_USER_AGENT"] is nil when I go to
some page in the features I write with cucumber and webrat
2008 Dec 16
20
step definitons to check login
I am working with the authlogic gem and trying to create a simple login
test from cucumber features. The feature statement is:
Given the user is not logged in
The step definition for this is confounding me. In the
application_controller the authlogic tutorial recommends the following:
private
def require_user
unless current_user
store_location
flash[:notice] =