fix dependency features

This commit is contained in:
Reinier Balt 2012-12-25 15:46:26 +01:00
parent fbe69a9a55
commit 2acfbd8f00
5 changed files with 14 additions and 6 deletions

View file

@ -9,7 +9,7 @@
remove_successor_from_page();
replace_updated_predecessor();
regenerate_predecessor_family();
<%= "show_in_tickler_box();" if source_view_is_one_of :project, :tag, :context %>
<%= "show_in_tickler_box();".html_safe if source_view_is_one_of :project, :tag, :context %>
TracksPages.page_notify('notice', "<%= @status_message %>", 5);
function remove_successor_from_page() {

View file

@ -80,7 +80,7 @@ function activate_pending_todos() {
$('#<%= dom_id(t) %>').fadeOut(400, function() {
$('#<%= dom_id(t) %>').remove();
$('#<%= item_container_id(t) %>').append("<%= html %>");
<%= "$('#tickler-empty-nd').show();" if @remaining_deferred_or_pending_count==0 -%>
<%= "$('#tickler-empty-nd').show();".html_safe if @remaining_deferred_or_pending_count==0 -%>
});
<% else -%>
$('#<%= item_container_id(t) %>').append("<%= html%>");

View file

@ -130,7 +130,7 @@ function activate_pending_todos(next_steps) {
$('#<%= dom_id(t) %>').fadeOut(400, function() {
$('#<%= dom_id(t) %>').remove();
$('#<%= item_container_id(t) %>').append("<%= html %>");
<%= "$('#tickler-empty-nd').show();" if @remaining_deferred_or_pending_count==0 -%>
<%= "$('#tickler-empty-nd').show();".html_safe if @remaining_deferred_or_pending_count==0 -%>
});
<% else -%>
$('#<%= item_container_id(t) %>').append("<%= html%>");

View file

@ -43,10 +43,10 @@ When /^I edit the dependency of "([^"]*)" to add "([^"]*)" as predecessor$/ do |
page.execute_script %Q{$("#{form_css}").find('input[id$="predecessor_input"]').autocomplete('search')} if Capybara.javascript_driver == :webkit
# wait for auto complete
page.should have_css("a#ui-active-menuitem")
page.should have_css("a.ui-state-focus")
# click first line
page.find(:xpath, "//ul/li[1]/a[@id='ui-active-menuitem']").click
page.find(:css, "ul li a.ui-state-focus").click
# wait for the new dependency to be added to the list
page.should have_css("li#pred_#{predecessor.id}")
@ -97,6 +97,13 @@ Then /^I should see "([^\"]*)" within the dependencies of "([^\"]*)"$/ do |succe
todo = @current_user.todos.find_by_description(todo_description)
todo.should_not be_nil
# open successors
within "div#line_todo_#{todo.id}" do
if !find(:css, "div#successors_todo_#{todo.id}").visible?
find(:css, "a.show_successors").click
end
end
step "I should see \"#{successor_description}\" within \"div#line_todo_#{todo.id}\""
end

View file

@ -15,7 +15,8 @@ When /^I delete the action "([^"]*)"$/ do |action_description|
get_confirm_text.should == "Are you sure that you want to delete the action '#{todo.description}'?"
wait_for_ajax
wait_for_animations_to_end
# commented out: the notice is gone if you want to check for it
# wait_for_animations_to_end
end
When /^I delete the todo "([^"]*)"$/ do |action_description|