diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-12 17:14:58 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-18 15:03:36 -0500 |
commit | b9af0305c371b557be42ce831330bc2787dfcf85 (patch) | |
tree | f32e62c5023995d0d59926ab9109a911a4ead18e | |
parent | 29734516e1558812204973865b0ee848c92f0f7c (diff) | |
download | gitlab-ce-b9af0305c371b557be42ce831330bc2787dfcf85.tar.gz |
Add tests for the "i" shortcut
-rw-r--r-- | features/project/shortcuts.feature | 5 | ||||
-rw-r--r-- | features/steps/project/project_shortcuts.rb | 4 | ||||
-rw-r--r-- | features/steps/shared/project.rb | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/features/project/shortcuts.feature b/features/project/shortcuts.feature index 10e7c234610..d5c9c0d0b6e 100644 --- a/features/project/shortcuts.feature +++ b/features/project/shortcuts.feature @@ -56,3 +56,8 @@ Feature: Project Shortcuts Scenario: Navigate to project feed Given I press "g" and "e" Then the active main tab should be Activity + + @javascript @focus + Scenario: Navigate to new Issue page + Given I press "i" + Then I should see the new issue page diff --git a/features/steps/project/project_shortcuts.rb b/features/steps/project/project_shortcuts.rb index 49e9c5520bb..c42623e81cc 100644 --- a/features/steps/project/project_shortcuts.rb +++ b/features/steps/project/project_shortcuts.rb @@ -38,4 +38,8 @@ class Spinach::Features::ProjectShortcuts < Spinach::FeatureSteps find('body').native.send_key('g') find('body').native.send_key('e') end + + step 'I press "i"' do + find('body').native.send_key('i') + end end diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb index b13e82f276b..a8c64646391 100644 --- a/features/steps/shared/project.rb +++ b/features/steps/shared/project.rb @@ -102,6 +102,10 @@ module SharedProject @project ||= Project.first end + step 'I should see the new issue page' do + expect(page).to have_content('New Issue') + end + # ---------------------------------------- # Project permissions # ---------------------------------------- |