mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-10 11:18:51 +01:00
support rake cucumber:selenium_wip to run wip for selenium. rake cucumber:wip will only ron non-selnium wip stories. Furthermore some selenium script migration to cucumber
This commit is contained in:
parent
8697fd2035
commit
0f525436ff
12 changed files with 56 additions and 70 deletions
|
|
@ -5,5 +5,6 @@ std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --strict --tags ~@w
|
|||
%>
|
||||
default: <%= std_opts %> features --tags ~@selenium
|
||||
selenium: <%= std_opts %> features --tags @selenium
|
||||
wip: --tags @wip:10 --wip features
|
||||
selenium_wip: features --wip --tags @wip:10 --tags @selenium
|
||||
wip: --wip --tags @wip:10 --tags ~@selenium features
|
||||
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Feature: dependencies
|
|||
When I expand the dependencies of "Todo 2"
|
||||
Then I should see "Todo 3" within the dependencies of "Todo 2"
|
||||
|
||||
@selenium, @wip
|
||||
@selenium @wip
|
||||
Scenario: Adding dependency with comma to todo # for #975
|
||||
Given I have a context called "@pc"
|
||||
And I have a project "dependencies" that has the following todos
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Feature: Edit a project
|
|||
And I should see the bold text "done" in the project description
|
||||
|
||||
# Ticket #1043
|
||||
@selenium, @wip
|
||||
@selenium @wip
|
||||
Scenario: I can move a todo out of the current project
|
||||
Given I have a project "foo" with 2 todos
|
||||
When I visit the "foo" project
|
||||
|
|
@ -27,6 +27,16 @@ Feature: Edit a project
|
|||
Then I should not see the todo "Todo 1"
|
||||
And I should see the todo "Todo 2"
|
||||
|
||||
@selenium
|
||||
Scenario: I can edit the project name in place
|
||||
Given I have a project "release tracks 1.8" with 1 todos
|
||||
When I visit the project page for "release tracks 1.8"
|
||||
And I edit the project name in place to be "release tracks 2.0"
|
||||
Then I should see the project name is "release tracks 2.0"
|
||||
When I go to the projects page
|
||||
Then I should see that a project named "release tracks 1.8" is not present
|
||||
And I should see that a project named "release tracks 2.0" is present
|
||||
|
||||
# Ticket #1041
|
||||
@selenium
|
||||
Scenario: I can change the name of the project using the Edit Project Settings form
|
||||
|
|
@ -52,4 +62,7 @@ Feature: Edit a project
|
|||
When I go to the projects page
|
||||
Then the badge should show 2 # "manage me" and "test"
|
||||
When I edit the project name of "manage me" to "test"
|
||||
Then I should see "Name already exists"
|
||||
Then I should see "Name already exists"
|
||||
|
||||
# No scenario is needed for adding a todo to the project. This is covered in
|
||||
# shared_add_new_todo.feature "I can add a todo from several pages"
|
||||
|
|
@ -38,6 +38,19 @@ Feature: Manage the list of projects
|
|||
And the badge should show 2
|
||||
And the project list badge for "active" projects should show 2
|
||||
|
||||
@selenium
|
||||
Scenario: Deleting a project after a edit will remove it from the list
|
||||
# make sure the js is enabled after an edit and another edit
|
||||
When I go to the projects page
|
||||
And I edit the project name of "manage me" to "manage him"
|
||||
Then I should see "manage him"
|
||||
When I edit the project name of "manage him" to "manage her"
|
||||
Then I should see "manage her"
|
||||
When I delete project "manage her"
|
||||
Then I should not see "manage her"
|
||||
And the badge should show 2
|
||||
And the project list badge for "active" projects should show 2
|
||||
|
||||
@selenium
|
||||
Scenario: Changing project state will move project to other state list
|
||||
When I go to the projects page
|
||||
|
|
@ -94,3 +107,4 @@ Feature: Manage the list of projects
|
|||
Then the project "test" should be above the project "very busy"
|
||||
When I sort the list by number of tasks
|
||||
Then the project "very busy" should be above the project "test"
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,14 @@ When /^I sort the list by number of tasks$/ do
|
|||
selenium.get_confirmation.should == "Are you sure that you want to sort these projects by the number of tasks? This will replace the existing sort order."
|
||||
end
|
||||
|
||||
Then /^I should see that a project named "([^"]*)" is not present$/ do |project_name|
|
||||
Then "I should not see \"#{project_name}\""
|
||||
end
|
||||
|
||||
Then /^I should see that a project named "([^"]*)" is present$/ do |project_name|
|
||||
Then "I should see \"#{project_name}\""
|
||||
end
|
||||
|
||||
Then /^the project "([^"]*)" should be above the project "([^"]*)"$/ do |project_high, project_low|
|
||||
high_id = @current_user.projects.find_by_name(project_high).id
|
||||
low_id = @current_user.projects.find_by_name(project_low).id
|
||||
|
|
|
|||
|
|
@ -61,6 +61,11 @@ When /^I edit the project name of "([^"]*)" to "([^"]*)"$/ do |project_current_n
|
|||
When "I edit the project name to \"#{project_new_name}\""
|
||||
end
|
||||
|
||||
When /^I edit the project name in place to be "([^"]*)"$/ do |new_project_name|
|
||||
selenium.click "project_name"
|
||||
fill_in "value", :with => new_project_name
|
||||
click_button "OK"
|
||||
end
|
||||
|
||||
When /^I edit the project state of "([^"]*)" to "([^"]*)"$/ do |project_name, state_name|
|
||||
project = @current_user.projects.find_by_name(project_name)
|
||||
|
|
@ -104,4 +109,8 @@ end
|
|||
|
||||
Then /^the project title should be "(.*)"$/ do |title|
|
||||
selenium.get_text("css=h2#project_name").should == title
|
||||
end
|
||||
|
||||
Then /^I should see the project name is "([^"]*)"$/ do |project_name|
|
||||
Then "the project title should be \"#{project_name}\""
|
||||
end
|
||||
|
|
@ -17,12 +17,18 @@ begin
|
|||
t.profile = 'selenium'
|
||||
end
|
||||
|
||||
Cucumber::Rake::Task.new({:selenium_wip => :env_to_selenium}, 'Run unfinished features that require selenium') do |t|
|
||||
t.binary = vendored_cucumber_bin
|
||||
t.fork = true # You may get faster startup if you set this to false
|
||||
t.profile = 'selenium_wip'
|
||||
end
|
||||
|
||||
task :env_to_selenium => 'db:test:prepare' do
|
||||
ENV['RAILS_ENV'] = 'selenium'
|
||||
end
|
||||
|
||||
desc 'Run all features'
|
||||
task :all => [:ok, :wip, :selenium]
|
||||
task :all => [:ok, :wip, :selenium, :selenium_wip]
|
||||
end
|
||||
rescue LoadError
|
||||
desc 'cucumber rake task not available (cucumber not installed)'
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
setup :fixtures => :all
|
||||
login :as => 'admin'
|
||||
open "/projects/1"
|
||||
|
||||
# add new todo
|
||||
type "todo_description", "a brand new todo"
|
||||
click "css=#todo-form-new-action .submit_box button"
|
||||
wait_for_element_present "css=div#p1items div.item-container"
|
||||
|
||||
# wait for flash to mention that todo was added and verify existence of new todo
|
||||
wait_for_visible "flash"
|
||||
verify_text_present 'a brand new todo'
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
setup :fixtures => :all
|
||||
login :as => 'admin'
|
||||
open "/projects/1"
|
||||
|
||||
click "project_name"
|
||||
wait_for_element_present "css=#project_name form input"
|
||||
type "css=#project_name form input", "Test Foo"
|
||||
click "css=#project_name form button"
|
||||
wait_for_text "project_name", "Test Foo"
|
||||
|
||||
|
||||
open "/projects/1"
|
||||
wait_for_text "project_name", "Test Foo"
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
setup :fixtures => :all
|
||||
login :as => 'admin'
|
||||
open "/projects"
|
||||
click "css=#project_2 .buttons img.delete_item"
|
||||
assert_confirmation "Are you sure that you want to delete the project 'Make more money than Billy Gates'?"
|
||||
wait_for_element_not_present "project_2"
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
setup :fixtures => :all
|
||||
login :as => 'admin'
|
||||
open "/projects"
|
||||
click "css=#project_2 .buttons img.edit_item"
|
||||
wait_for_visible "edit_project_2"
|
||||
wait_for_not_visible "project_2"
|
||||
type "//div[@id='edit_project_2'] //input[@name='project[name]']", "become a billionaire"
|
||||
click "//div[@id='edit_project_2'] //button"
|
||||
wait_for_not_visible "edit_project_2"
|
||||
wait_for_visible "project_2"
|
||||
wait_for_visible "flash"
|
||||
click "css=#project_2 .buttons img.delete_item"
|
||||
assert_confirmation "Are you sure that you want to delete the project 'become a billionaire'?"
|
||||
wait_for_text "flash", "Deleted project 'become a billionaire'"
|
||||
wait_for_element_not_present "project_2"
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
setup :fixtures => :all
|
||||
login :as => 'admin'
|
||||
open "/projects"
|
||||
click "css=#project_2 .buttons img.edit_item"
|
||||
wait_for_visible "edit_project_2"
|
||||
wait_for_not_visible "project_2"
|
||||
type "//div[@id='edit_project_2'] //input[@name='project[name]']", "become a billionaire"
|
||||
click "//div[@id='edit_project_2'] //button"
|
||||
wait_for_not_visible "edit_project_2"
|
||||
wait_for_visible "project_2"
|
||||
assert_text 'css=#project_2 .data a', 'become a billionaire'
|
||||
click "css=#project_2 .buttons img.edit_item"
|
||||
wait_for_visible "edit_project_2"
|
||||
wait_for_not_visible "project_2"
|
||||
type "//div[@id='edit_project_2'] //input[@name='project[name]']", "become a multi-millionaire"
|
||||
click "//div[@id='edit_project_2'] //button"
|
||||
wait_for_not_visible "edit_project_2"
|
||||
wait_for_visible "project_2"
|
||||
assert_text 'css=#project_2 .data a', 'become a multi-millionaire'
|
||||
Loading…
Add table
Add a link
Reference in a new issue