mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-11 01:44:23 +01:00
Merge branch '2.3_branch'
This brings the master branch up to date with the 2.3 release branch
This commit is contained in:
commit
f393afb69f
27 changed files with 111 additions and 84 deletions
|
|
@ -21,6 +21,21 @@ Feature: Edit a context
|
|||
Then I should see that a context named "Errands" is not present
|
||||
And I should see that a context named "OutAndAbout" is present
|
||||
|
||||
# Ticket #1796
|
||||
@javascript
|
||||
Scenario: I can change the name of the context and it should update the new todo form
|
||||
When I go to the context page for "@pc"
|
||||
And I edit the context name in place to be "OutAndAbout"
|
||||
Then the context field of the new todo form should contain "OutAndAbout"
|
||||
|
||||
# Ticket #1789
|
||||
@javascript
|
||||
Scenario: I can change the name of the context and it should still allow me to add new actions
|
||||
When I go to the context page for "@pc"
|
||||
And I edit the context name in place to be "OutAndAbout"
|
||||
And I submit a new action with description "a new next action"
|
||||
Then I should see the todo "a new next action"
|
||||
|
||||
@javascript
|
||||
Scenario: Editing the context of a todo will remove the todo
|
||||
When I go to the the context page for "@pc"
|
||||
|
|
@ -102,4 +117,4 @@ Feature: Edit a context
|
|||
When I go to the "test" context
|
||||
And I mark "deferred todo 1" as complete
|
||||
Then I should see empty message for todos of context
|
||||
And I should see empty message for deferred todos of context
|
||||
And I should see empty message for deferred todos of context
|
||||
|
|
|
|||
|
|
@ -58,6 +58,16 @@ Feature: Edit a project
|
|||
Then the project title should be "cherries"
|
||||
And the project field of the new todo form should contain "cherries"
|
||||
|
||||
# Ticket #1789
|
||||
@javascript
|
||||
Scenario: I can change the name of the project and it should still allow me to add new actions
|
||||
Given I have a project "bananas"
|
||||
When I go to the "bananas" project
|
||||
And I edit the project name to "cherries"
|
||||
And I edit the default context to "@pc"
|
||||
And I submit a new action with description "a new next action"
|
||||
Then I should see the todo "a new next action"
|
||||
|
||||
@javascript
|
||||
Scenario: I can change the default context of the project and it should update the new todo form
|
||||
Given I have a project "bananas" with 1 todos
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ When /^I edit the context name in place to be "([^\"]*)"$/ do |new_context_name|
|
|||
page.find("span#context_name").click
|
||||
fill_in "value", :with => new_context_name
|
||||
click_button "Ok"
|
||||
wait_for_ajax
|
||||
end
|
||||
|
||||
Then /^I should see the context name is "([^\"]*)"$/ do |context_name|
|
||||
|
|
|
|||
|
|
@ -123,13 +123,13 @@ end
|
|||
Then /^the project "([^"]*)" should have (\d+) actions listed$/ do |project_name, count|
|
||||
project = @current_user.projects.where(:name => project_name).first
|
||||
expect(project).to_not be_nil
|
||||
xpath = "//div[@id='list-active-projects-container']//div[@id='project_#{project.id}']//span[@class='needsreview']"
|
||||
xpath = "//div[@id='list-active-projects-container']//div[@id='project_#{project.id}']"
|
||||
expect(page.find(:xpath, xpath).text).to eq("#{project.name} (#{count} actions)")
|
||||
end
|
||||
|
||||
Then /^the project "([^"]*)" should have (\d+) deferred actions listed$/ do |project_name, deferred|
|
||||
project = @current_user.projects.where(:name => project_name).first
|
||||
expect(project).to_not be_nil
|
||||
xpath = "//div[@id='list-active-projects-container']//div[@id='project_#{project.id}']//span[@class='needsreview']"
|
||||
xpath = "//div[@id='list-active-projects-container']//div[@id='project_#{project.id}']"
|
||||
expect(page.find(:xpath, xpath).text).to eq("#{project.name} (#{deferred} deferred actions)")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -119,6 +119,11 @@ Then /^the project field of the new todo form should contain "([^"]*)"$/ do |pro
|
|||
expect(page.find(:xpath, xpath).value).to eq(project_name)
|
||||
end
|
||||
|
||||
Then /^the context field of the new todo form should contain "([^"]*)"$/ do |context_name|
|
||||
xpath= "//form[@id='todo-form-new-action']/input[@id='todo_context_name']"
|
||||
expect(page.find(:xpath, xpath).value).to eq(context_name)
|
||||
end
|
||||
|
||||
Then /^the default context of the new todo form should be "([^"]*)"$/ do |context_name|
|
||||
xpath= "//form[@id='todo-form-new-action']/input[@id='todo_context_name']"
|
||||
expect(context_name).to eq(page.find(:xpath, xpath).value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue