diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/dashboard/todos.feature | 5 | ||||
-rw-r--r-- | features/steps/dashboard/todos.rb | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/features/dashboard/todos.feature b/features/dashboard/todos.feature index 1e7b1b50d64..8677b450813 100644 --- a/features/dashboard/todos.feature +++ b/features/dashboard/todos.feature @@ -36,3 +36,8 @@ Feature: Dashboard Todos Scenario: I filter by action Given I filter by "Mentioned" Then I should not see todos related to "Assignments" in the list + + @javascript + Scenario: I click on a todo row + Given I click on the todo + Then I should be directed to the corresponding page diff --git a/features/steps/dashboard/todos.rb b/features/steps/dashboard/todos.rb index 963e4f21365..5c30d8e0c72 100644 --- a/features/steps/dashboard/todos.rb +++ b/features/steps/dashboard/todos.rb @@ -88,6 +88,14 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps should_not_see_todo "John Doe assigned you issue ##{issue.iid}" end + step 'I click on the todo' do + execute_script("$('.todo:nth-child(1)').click()") + end + + step 'I should be directed to the corresponding page' do + page.should have_css('.identifier', text: 'Merge Request !1') + end + def should_see_todo(position, title, body, pending = true) page.within(".todo:nth-child(#{position})") do expect(page).to have_content title |