summaryrefslogtreecommitdiff
path: root/features/steps/dashboard
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-20 11:59:59 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-20 12:39:27 -0200
commit3d52e139b13ad077286f2f9f46b7e98f43ad9564 (patch)
tree22c70561b0f64851d938e44661aafeed3a2c80b2 /features/steps/dashboard
parent408e010d65e7e2e2b64a694e12d44636d7d81dec (diff)
downloadgitlab-ce-3d52e139b13ad077286f2f9f46b7e98f43ad9564.tar.gz
Rename Tasks to Todos
Diffstat (limited to 'features/steps/dashboard')
-rw-r--r--features/steps/dashboard/todos.rb (renamed from features/steps/dashboard/tasks.rb)64
1 files changed, 32 insertions, 32 deletions
diff --git a/features/steps/dashboard/tasks.rb b/features/steps/dashboard/todos.rb
index 556aa41bad9..207d997f8a0 100644
--- a/features/steps/dashboard/tasks.rb
+++ b/features/steps/dashboard/todos.rb
@@ -1,4 +1,4 @@
-class Spinach::Features::DashboardTasks < Spinach::FeatureSteps
+class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
include SharedAuthentication
include SharedPaths
include SharedProject
@@ -17,43 +17,43 @@ class Spinach::Features::DashboardTasks < Spinach::FeatureSteps
project.team << [john_doe, :developer]
end
- step 'I have pending tasks' do
- create(:task, user: current_user, project: project, author: mary_jane, target: issue, action: Task::MENTIONED)
- create(:task, user: current_user, project: project, author: john_doe, target: issue, action: Task::ASSIGNED)
+ step 'I have todos' do
+ create(:todo, user: current_user, project: project, author: mary_jane, target: issue, action: Todo::MENTIONED)
+ create(:todo, user: current_user, project: project, author: john_doe, target: issue, action: Todo::ASSIGNED)
note = create(:note, author: john_doe, noteable: issue, note: "#{current_user.to_reference} Wdyt?")
- create(:task, user: current_user, project: project, author: john_doe, target: issue, action: Task::MENTIONED, note: note)
- create(:task, user: current_user, project: project, author: john_doe, target: merge_request, action: Task::ASSIGNED)
+ create(:todo, user: current_user, project: project, author: john_doe, target: issue, action: Todo::MENTIONED, note: note)
+ create(:todo, user: current_user, project: project, author: john_doe, target: merge_request, action: Todo::ASSIGNED)
end
- step 'I should see pending tasks assigned to me' do
- expect(page).to have_content 'Tasks 4'
+ step 'I should see todos assigned to me' do
+ expect(page).to have_content 'Todos 4'
expect(page).to have_content 'Done 0'
expect(page).to have_link project.name_with_namespace
- should_see_task(1, "John Doe assigned merge request ##{merge_request.iid}", merge_request.title)
- should_see_task(2, "John Doe mentioned you on issue ##{issue.iid}", "#{current_user.to_reference} Wdyt?")
- should_see_task(3, "John Doe assigned issue ##{issue.iid}", issue.title)
- should_see_task(4, "Mary Jane mentioned you on issue ##{issue.iid}", issue.title)
+ should_see_todo(1, "John Doe assigned merge request ##{merge_request.iid}", merge_request.title)
+ should_see_todo(2, "John Doe mentioned you on issue ##{issue.iid}", "#{current_user.to_reference} Wdyt?")
+ should_see_todo(3, "John Doe assigned issue ##{issue.iid}", issue.title)
+ should_see_todo(4, "Mary Jane mentioned you on issue ##{issue.iid}", issue.title)
end
- step 'I mark the pending task as done' do
- page.within('.task:nth-child(1)') do
+ step 'I mark the todo as done' do
+ page.within('.todo:nth-child(1)') do
click_link 'Done'
end
- expect(page).to have_content 'Task was successfully marked as done.'
- expect(page).to have_content 'Tasks 3'
+ expect(page).to have_content 'Todo was successfully marked as done.'
+ expect(page).to have_content 'Todos 3'
expect(page).to have_content 'Done 1'
- should_not_see_task "John Doe assigned merge request ##{merge_request.iid}"
+ should_not_see_todo "John Doe assigned merge request ##{merge_request.iid}"
end
step 'I click on the "Done" tab' do
click_link 'Done 1'
end
- step 'I should see all tasks marked as done' do
+ step 'I should see all todos marked as done' do
expect(page).to have_link project.name_with_namespace
- should_see_task(1, "John Doe assigned merge request ##{merge_request.iid}", merge_request.title, false)
+ should_see_todo(1, "John Doe assigned merge request ##{merge_request.iid}", merge_request.title, false)
end
step 'I filter by "Enterprise"' do
@@ -69,28 +69,28 @@ class Spinach::Features::DashboardTasks < Spinach::FeatureSteps
end
step 'I filter by "Mentioned"' do
- select2("#{Task::MENTIONED}", from: '#action_id')
+ select2("#{Todo::MENTIONED}", from: '#action_id')
end
- step 'I should not see tasks' do
- expect(page).to have_content 'No tasks to show'
+ step 'I should not see todos' do
+ expect(page).to have_content 'No todos to show'
end
- step 'I should not see tasks related to "Mary Jane" in the list' do
- should_not_see_task "Mary Jane mentioned you on issue ##{issue.iid}"
+ step 'I should not see todos related to "Mary Jane" in the list' do
+ should_not_see_todo "Mary Jane mentioned you on issue ##{issue.iid}"
end
- step 'I should not see tasks related to "Merge Requests" in the list' do
- should_not_see_task "John Doe assigned merge request ##{merge_request.iid}"
+ step 'I should not see todos related to "Merge Requests" in the list' do
+ should_not_see_todo "John Doe assigned merge request ##{merge_request.iid}"
end
- step 'I should not see tasks related to "Assignments" in the list' do
- should_not_see_task "John Doe assigned merge request ##{merge_request.iid}"
- should_not_see_task "John Doe assigned issue ##{issue.iid}"
+ step 'I should not see todos related to "Assignments" in the list' do
+ should_not_see_todo "John Doe assigned merge request ##{merge_request.iid}"
+ should_not_see_todo "John Doe assigned issue ##{issue.iid}"
end
- def should_see_task(position, title, body, pending = true)
- page.within(".task:nth-child(#{position})") do
+ def should_see_todo(position, title, body, pending = true)
+ page.within(".todo:nth-child(#{position})") do
expect(page).to have_content title
expect(page).to have_content body
@@ -102,7 +102,7 @@ class Spinach::Features::DashboardTasks < Spinach::FeatureSteps
end
end
- def should_not_see_task(title)
+ def should_not_see_todo(title)
expect(page).not_to have_content title
end