mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
Default project should be empty
This commit is contained in:
parent
8a378aa2c4
commit
336f19c4fe
3 changed files with 13 additions and 1 deletions
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<div class="project_input">
|
||||
<label for="<%= dom_id(@todo, 'project_name') %>"><%= t('common.project') %></label>
|
||||
<input id="<%= dom_id(@todo, 'project_name') %>" name="project_name" autocomplete="off" size="30" type="text" value="<%= @todo.project.nil? ? 'None' : h(@todo.project.name) %>" />
|
||||
<input id="<%= dom_id(@todo, 'project_name') %>" name="project_name" autocomplete="off" size="30" type="text" value="<%= @todo.project.nil? ? '' : h(@todo.project.name) %>" />
|
||||
</div>
|
||||
|
||||
<div class="context_input">
|
||||
|
|
|
|||
|
|
@ -243,6 +243,13 @@ Feature: Edit a next action from every page
|
|||
And I edit the project of "todo 1" to ""
|
||||
Then I should see the todo "todo 1"
|
||||
|
||||
@javascript
|
||||
Scenario: I can edit a todo without a project and the project remains blank
|
||||
Given I have a todo "todo 1"
|
||||
When I go to the home page
|
||||
And I change the todo[description] field of "todo 1" to "todo 1 edit"
|
||||
Then I should see the todo "todo 1 edit" with project name ""
|
||||
|
||||
@javascript
|
||||
Scenario: I can edit a todo to move it to the tickler
|
||||
When I go to the home page
|
||||
|
|
|
|||
|
|
@ -162,3 +162,8 @@ Then /^I should (see|not see) the empty tickler message$/ do |see|
|
|||
elem = find("div#no_todos_in_view")
|
||||
expect(elem).send(see=="see" ? :to : :to_not, be_visible)
|
||||
end
|
||||
|
||||
Then /^I should see the todo "([^"]*)" with project name "([^"]*)"$/ do |todo_description, project_name|
|
||||
todo = @current_user.todos.where(:description => todo_description).first
|
||||
expect(todo.project.name).to eq(project_name)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue