diff options
author | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-03-30 09:17:03 -0500 |
---|---|---|
committer | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-03-30 12:28:57 -0500 |
commit | 51031a68f76b23b8936bf674d9bc65491b207ebe (patch) | |
tree | 348d53f7bc452e40dbe4b15b87374f2d9d992afa /features | |
parent | 673bb9ef1e9ca7c6a2fdd16bb75289181e076b08 (diff) | |
download | gitlab-ce-51031a68f76b23b8936bf674d9bc65491b207ebe.tar.gz |
Make entire todo row clickable
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 |