fix failing scenarios

This commit is contained in:
Reinier Balt 2013-04-14 11:50:21 +02:00
parent 67247980ad
commit a4e0860aa4
4 changed files with 7 additions and 6 deletions

View file

@ -480,7 +480,8 @@ var TodoItems = {
$('.drop_target').hide(); // IE8 doesn't call stop() in this situation
ajax_options = default_ajax_options_for_scripts('POST', relative_to_root('todos/add_predecessor'), $(this));
ajax_options.data << {predecessor: dropped_todo, successor: dragged_todo}
ajax_options.data["predecessor"]=dropped_todo;
ajax_options.data["successor"]=dragged_todo;
$.ajax(ajax_options);
},
drop_todo_on_context: function(evt, ui) {
@ -492,7 +493,7 @@ var TodoItems = {
$('.drop_target').hide();
ajax_options = default_ajax_options_for_scripts('POST', relative_to_root('todos/'+dragged_todo + '/change_context'), target);
ajax_options.data << {"todo[context_id]": context_id}
ajax_options.data["todo[context_id]"]=context_id;
$.ajax(ajax_options);
},
setup_drag_and_drop: function() {

View file

@ -42,7 +42,7 @@ function remove_todo(next_steps) {
}
function add_to_existing_container(next_steps) {
$('#<%= item_container_id(@todo) %>').append(html_for_todo());
$('#<%= item_container_id(@todo) %>_items').append(html_for_todo());
<% if source_view_is_one_of(:project,:calendar) -%>
next_steps.go();
<% if (@target_context_count==1) || ( (@todo.deferred? || @todo.pending?) && @remaining_deferred_or_pending_count == 1) -%>

View file

@ -122,7 +122,7 @@ Feature: dependencies
When I go to the "dependencies" project
And I drag "test 1" to "test 3"
Then I should see an error flash message saying "Cannot add this action as a dependency to a completed action!"
And I should see "test 1" in project container for "dependencies"
And I should see "test 1" in the project container of "dependencies"
@javascript
Scenario Outline: Marking a successor as complete will update predecessor
@ -146,7 +146,7 @@ Feature: dependencies
| "dependencies" project |
| tag page for "bla" |
@javascript
@javascript
Scenario Outline: Marking a successor as active will update predecessor
Given I have a context called "@pc"
And I have a project "dependencies" that has the following todos

View file

@ -269,7 +269,7 @@ Feature: Add new next action from every page
Then I should not see "a new todo" in the project container of "another project"
And I should not see empty message for deferred todos of project
@javascript @wip
@javascript
Scenario Outline: I can add multiple todos in a new project and a new context
Given I have selected the view for group by <grouping>
When I go to the home page