BigW Consortium Gitlab

Move Dashboard shortcuts specs from Spinah to RSpec

Signed-off-by: 's avatarRémy Coutable <remy@rymai.me>
parent c9203e25
@dashboard
Feature: Dashboard Shortcuts
Background:
Given I sign in as a user
And I visit dashboard page
@javascript
Scenario: Navigate to projects tab
Given I press "g" and "p"
Then the active main tab should be Projects
@javascript
Scenario: Navigate to issue tab
Given I press "g" and "i"
Then the active main tab should be Issues
@javascript
Scenario: Navigate to merge requests tab
Given I press "g" and "m"
Then the active main tab should be Merge Requests
class Spinach::Features::DashboardShortcuts < Spinach::FeatureSteps
include SharedAuthentication
include SharedPaths
include SharedProject
include SharedSidebarActiveTab
include SharedShortcuts
end
require 'spec_helper'
feature 'Dashboard shortcuts', feature: true, js: true do
before do
login_as :user
visit dashboard_projects_path
end
scenario 'Navigate to tabs' do
find('body').native.send_key('g')
find('body').native.send_key('p')
ensure_active_main_tab('Projects')
find('body').native.send_key('g')
find('body').native.send_key('i')
ensure_active_main_tab('Issues')
find('body').native.send_key('g')
find('body').native.send_key('m')
ensure_active_main_tab('Merge Requests')
end
def ensure_active_main_tab(content)
expect(find('.nav-sidebar li.active')).to have_content(content)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment