fix and test toggling of new-project-form

This commit is contained in:
Reinier Balt 2010-10-15 12:39:29 +02:00
parent 9028a00767
commit 36e63a4ad9
3 changed files with 20 additions and 4 deletions

View file

@ -12,8 +12,8 @@
<div id="project_new_project_filler">
<div id="project_new_project_container">
<div id="toggle_project_new" class="hide_form">
<a title="<%= t('projects.hide_new_project_form') %>" accesskey="n">&laquo; <%= t('projects.hide_form') %></a>
<div id="toggle_project_link" class="hide_form">
<a id="toggle_project_new" href="#" title="<%= t('projects.hide_new_project_form') %>" accesskey="n">&laquo; <%= t('projects.hide_form') %></a>
</div>
<div id="project_new" class="project_new" style="display:block">

View file

@ -56,8 +56,16 @@ 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
Scenario: Hiding and unhiding the new project form
When I go to the projects page
Then the new project form should be visible
When I follow "« Hide form"
Then the new project form should not be visible
When I follow "Create a new project »"
Then the new project form should be visible
Scenario: Adding a new project
Scenario: Adding a new project and take me to the project page
Scenario: Hiding and unhiding the new project form
Scenario: Sorting the project alphabetically
Scenario: Sorting the project by number of task

View file

@ -50,4 +50,12 @@ end
Then /^the project list badge for "([^"]*)" projects should show (\d+)$/ do |state_name, count|
selenium.get_text("xpath=//span[@id='#{state_name}-projects-count']").should == count
end
end
Then /^the new project form should be visible$/ do
selenium.is_visible("project_new").should == true
end
Then /^the new project form should not be visible$/ do
selenium.is_visible("project_new").should == false
end