mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-09 02:38:51 +01:00
migrate project creation
This commit is contained in:
parent
36e63a4ad9
commit
4413cabbba
12 changed files with 152 additions and 94 deletions
|
|
@ -56,7 +56,7 @@ Feature: Manage the list of projects
|
|||
When I drag the project "manage me" below "upgrade jquery"
|
||||
Then the project "upgrade jquery" should be above the project "manage me"
|
||||
|
||||
@selenium, @wip
|
||||
@selenium
|
||||
Scenario: Hiding and unhiding the new project form
|
||||
When I go to the projects page
|
||||
Then the new project form should be visible
|
||||
|
|
@ -65,7 +65,14 @@ Feature: Manage the list of projects
|
|||
When I follow "Create a new project »"
|
||||
Then the new project form should be visible
|
||||
|
||||
@selenium, @wip
|
||||
Scenario: Adding a new project
|
||||
When I go to the projects page
|
||||
And I submit a new project with name "finish cucumber tests for project"
|
||||
Then I should see "finish cucumber tests for project"
|
||||
And the badge should show 4
|
||||
And the project list badge for "active" projects should show 4
|
||||
|
||||
Scenario: Adding a new project and take me to the project page
|
||||
Scenario: Sorting the project alphabetically
|
||||
Scenario: Sorting the project by number of task
|
||||
|
|
@ -26,6 +26,11 @@ When /^I drag the project "([^"]*)" below "([^"]*)"$/ do |project_drag, project_
|
|||
selenium.mouse_up_at(drop_project_container_xpath,coord_string)
|
||||
end
|
||||
|
||||
When /^I submit a new project with name "([^"]*)"$/ do |project_name|
|
||||
fill_in "project[name]", :with => project_name
|
||||
submit_new_project_form
|
||||
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
|
||||
|
|
|
|||
|
|
@ -2,11 +2,18 @@ if ENV["RAILS_ENV"] == "selenium"
|
|||
puts "Configuring to use Selenium with Webrat for Cucumber stories"
|
||||
Webrat.configure do |config|
|
||||
config.mode = :selenium
|
||||
|
||||
config.application_environment = :selenium
|
||||
# use only if you run a separate rails test server instance and do not
|
||||
# want webrat to start one for you
|
||||
# config.application_port = 3001
|
||||
|
||||
config.selenium_browser_startup_timeout = 30
|
||||
# use only if you run a separate selenium server instance and do not
|
||||
# want webrat to start one for you
|
||||
#config.selenium_server_address = "localhost"
|
||||
# config.selenium_server_address = "localhost"
|
||||
# config.selenium_server_port = "4444"
|
||||
|
||||
end
|
||||
|
||||
Cucumber::Rails::World.use_transactional_fixtures = false
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ module TracksStepHelper
|
|||
selenium.click("xpath=//form[@id='context-form']//button[@id='context_new_submit']", :wait_for => :ajax, :javascript_framework => :jquery)
|
||||
end
|
||||
|
||||
def submit_new_project_form
|
||||
selenium.click("xpath=//form[@id='project_form']//button[@id='project_new_project_submit']", :wait_for => :ajax, :javascript_framework => :jquery)
|
||||
end
|
||||
end
|
||||
|
||||
World(TracksStepHelper)
|
||||
Loading…
Add table
Add a link
Reference in a new issue