rename repeating -> recurring, repeat -> recurrence

This commit is contained in:
Carsten Otto 2015-02-10 16:25:27 +01:00
parent ab02d09830
commit dfe8735c0d
35 changed files with 125 additions and 125 deletions

View file

@ -111,27 +111,27 @@ Then /^I should see "([^"]*)" in the due next month container$/ do |todo_descrip
end
end
####### Repeat patterns #######
####### Recurrence patterns #######
Then /^I should (see|not see) "([^"]*)" in the active recurring todos container$/ do |visibility, repeat_pattern|
repeat = @current_user.recurring_todos.where(:description => repeat_pattern).first
Then /^I should (see|not see) "([^"]*)" in the active recurring todos container$/ do |visibility, recurrence_pattern|
recurrence = @current_user.recurring_todos.where(:description => recurrence_pattern).first
unless repeat.nil?
xpath = "//div[@id='active_recurring_todos_container']//div[@id='recurring_todo_#{repeat.id}']"
unless recurrence.nil?
xpath = "//div[@id='active_recurring_todos_container']//div[@id='recurring_todo_#{recurrence.id}']"
check_xpath_visibility(visibility, xpath)
else
step "I should #{visibility} \"#{repeat_pattern}\""
step "I should #{visibility} \"#{recurrence_pattern}\""
end
end
Then /^I should (see|not see) "([^"]*)" in the completed recurring todos container$/ do |visible, repeat_pattern|
repeat = @current_user.todos.where(:description => repeat_pattern).first
Then /^I should (see|not see) "([^"]*)" in the completed recurring todos container$/ do |visible, recurrence_pattern|
recurrence = @current_user.todos.where(:description => recurrence_pattern).first
unless repeat.nil?
xpath = "//div[@id='completed_recurring_todos_container']//div[@id='recurring_todo_#{repeat.id}']"
unless recurrence.nil?
xpath = "//div[@id='completed_recurring_todos_container']//div[@id='recurring_todo_#{recurrence.id}']"
check_xpath_visibility(visible, xpath)
else
step "I should #{visible} \"#{repeat_pattern}\""
step "I should #{visible} \"#{recurrence_pattern}\""
end
end

View file

@ -4,7 +4,7 @@ When /^I delete the context "([^\"]*)"$/ do |context_name|
handle_js_confirm do
click_link "delete_context_#{context.id}"
end
expect(get_confirm_text).to eq("Are you sure that you want to delete the context '#{context_name}'? Be aware that this will also delete all (repeating) actions in this context!")
expect(get_confirm_text).to eq("Are you sure that you want to delete the context '#{context_name}'? Be aware that this will also delete all (recurring) actions in this context!")
# wait until the context is removed
expect(page).to_not have_css("a#delete_context_#{context.id}")

View file

@ -1,4 +1,4 @@
Given /^I have a repeat pattern called "([^"]*)"$/ do |pattern_name|
Given /^I have a recurrence pattern called "([^"]*)"$/ do |pattern_name|
context = @current_user.contexts.first
@recurring_todo = @current_user.recurring_todos.create!(
@ -21,15 +21,15 @@ Given /^I have a repeat pattern called "([^"]*)"$/ do |pattern_name|
:recurring_todo_id => @recurring_todo.id)
end
Given /^I have a completed repeat pattern "([^"]*)"$/ do |pattern_name|
step "I have a repeat pattern called \"#{pattern_name}\""
Given /^I have a completed recurrence pattern "([^"]*)"$/ do |pattern_name|
step "I have a recurrence pattern called \"#{pattern_name}\""
@recurring_todo.toggle_completion!
expect(@recurring_todo.completed?).to be true
end
Given /^I have (\d+) completed repeat patterns$/ do |number_of_patterns|
Given /^I have (\d+) completed recurrence patterns$/ do |number_of_patterns|
1.upto number_of_patterns.to_i do |i|
step "I have a completed repeat pattern \"Repeating Todo #{i}\""
step "I have a completed recurrence pattern \"Recurring Todo #{i}\""
end
end