Displaying 10 results from an estimated 10 matches for "fill_in".
Did you mean:
file_in
2013 May 02
1
trouble-with-capybara-and-rspec-on-a-new-model-spec
...e { visit mailers_path }
describe "with invalid information" do
it "should not send a mail" do
expect { click_button submit }.not_to change(Mailer, :count)
end
end
describe "with valid information" do
before do
fill_in "Company name", with: "Mailer Company"
fill_in "Contact name", with: "Mailer Contact"
fill_in "Address", with: "Mailer Address"
fill_in "Telephone", with: "123-456-789"
fill_i...
2010 Jan 29
0
Cucumber: fill_in does not take label
In a Cucumber step, the following line will fill in the screen_name
text box:
fill_in "user[screen_name]", :with => user.screen_name
but the following line will not
fill_in "Screen name:", :with => user.screen_name
Here is the text of the form:
<div class="form_row">
<label for="screen_name">Screen name:</label>...
2011 Mar 21
1
Getting user session object in cucumber
...page
Scenario: Create New Project
When user create a project with name "Test"
Then user should see "Test" on project list page"
My Steps are as follows:-
Given /^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(curr...
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
2009 Feb 02
5
[Cucumber] Cucumber and acts_as_xapian
...ting xapian''s index, to actually "find" 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 th...
2010 Dec 20
1
Check whether link present nor not using cucumber
...I login with user "username" with password "123456"
Then "Users" link 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 /^"([^&...
2008 Dec 02
4
Using Cucumber with latest Webrat
...#39; for
#<ActionController::Integration::Session: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 don...
2010 Jan 29
3
testing controllers using cucumber
Hello,
Is there any way to test controllers using cucumber.
I was doing it with rspec but since cucumber''s description is good how
can i proceed testing it with cucumber?
For e.g.
I have a scenario of user creation like
Feature: User Scenarios
Scenario: Successfull creation of user
Given a new user
When the user fill all the mandatory details
Then that user should get
2008 Dec 13
4
Reuse of Cucumber Features
What''s the best way to handle a requirement that shows up as a
sub-requirement requirement in other features? For example let''s say users
can enter dates in various forms throughout my application. There is one
set of global rules specifying the formats in which dates may be entered,
and how they are interpreted. I put that in one feature. In various other
features, like
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] =