mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-09 00:54:21 +01:00
add cucumber tests for switching single and multiple actions forms
This commit is contained in:
parent
26cd345cbe
commit
c9ce82d533
7 changed files with 118 additions and 7 deletions
|
|
@ -20,7 +20,7 @@ Given /^I have a context "([^\"]*)" with (.*) actions$/ do |context_name, number
|
|||
end
|
||||
end
|
||||
|
||||
When /^I visits the context page for "([^\"]*)"$/ do |context_name|
|
||||
When /^I visit the context page for "([^\"]*)"$/ do |context_name|
|
||||
context = @current_user.contexts.find_by_name(context_name)
|
||||
context.should_not be_nil
|
||||
visit "/contexts/#{context.id}"
|
||||
|
|
|
|||
|
|
@ -21,6 +21,11 @@ When /^I visit the "([^\"]*)" project$/ do |project_name|
|
|||
visit project_path(@project)
|
||||
end
|
||||
|
||||
When /^I visit the project page for "([^"]*)"$/ do |project_name|
|
||||
When "I visit the \"#{project_name}\" project"
|
||||
end
|
||||
|
||||
|
||||
When /^I edit the project description to "([^\"]*)"$/ do |new_description|
|
||||
click_link "link_edit_project_#{@project.id}"
|
||||
fill_in "project[description]", :with => new_description
|
||||
|
|
|
|||
16
features/step_definitions/shared_new_todo_steps.rb
Normal file
16
features/step_definitions/shared_new_todo_steps.rb
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
Then /^the single action form should be visible$/ do
|
||||
selenium.is_visible("todo_new_action").should == true
|
||||
end
|
||||
|
||||
Then /^the single action form should not be visible$/ do
|
||||
selenium.is_visible("todo_new_action").should == false
|
||||
end
|
||||
|
||||
Then /^the multiple action form should be visible$/ do
|
||||
selenium.is_visible("todo_multi_add").should == true
|
||||
end
|
||||
|
||||
Then /^the multiple action form should not be visible$/ do
|
||||
selenium.is_visible("todo_multi_add").should == false
|
||||
end
|
||||
|
||||
3
features/step_definitions/todo_tag_steps.rb.rb
Normal file
3
features/step_definitions/todo_tag_steps.rb.rb
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
When /^I visit the tag page for "([^"]*)"$/ do |tag_name|
|
||||
visit "/todos/tag/#{tag_name}"
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue