mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-22 16:56:10 +01:00
handle and test the redirect when the goto-project checkbox is checked
This commit is contained in:
parent
4413cabbba
commit
f284617513
4 changed files with 20 additions and 7 deletions
|
|
@ -65,14 +65,19 @@ Feature: Manage the list of projects
|
|||
When I follow "Create a new project »"
|
||||
Then the new project form should be visible
|
||||
|
||||
@selenium, @wip
|
||||
@selenium
|
||||
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 I submit a new project with name "finish cucumber tests"
|
||||
Then I should see "finish cucumber tests"
|
||||
And the badge should show 4
|
||||
And the project list badge for "active" projects should show 4
|
||||
|
||||
@selenium
|
||||
Scenario: Adding a new project and take me to the project page
|
||||
When I go to the projects page
|
||||
And I submit a new project with name "finish cucumber tests" and select take me to the project
|
||||
Then I should be on the "finish cucumber tests" project page
|
||||
|
||||
Scenario: Sorting the project alphabetically
|
||||
Scenario: Sorting the project by number of task
|
||||
|
|
@ -31,6 +31,13 @@ When /^I submit a new project with name "([^"]*)"$/ do |project_name|
|
|||
submit_new_project_form
|
||||
end
|
||||
|
||||
When /^I submit a new project with name "([^"]*)" and select take me to the project$/ do |project_name|
|
||||
fill_in "project[name]", :with => project_name
|
||||
check "go_to_project"
|
||||
submit_new_project_form
|
||||
selenium.wait_for_page_to_load(5000) # follow the redirect
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue