... @@ -7,8 +7,6 @@ describe 'User uses shortcuts', :js do
... @@ -7,8 +7,6 @@ describe 'User uses shortcuts', :js do
let ( :user ) { create ( :user ) }
let ( :user ) { create ( :user ) }
before do
before do
stub_feature_flags ( analytics_pages_under_project_analytics_sidebar: { enabled: false , thing: project })
project . add_maintainer ( user )
project . add_maintainer ( user )
sign_in ( user )
sign_in ( user )
... @@ -119,8 +117,8 @@ describe 'User uses shortcuts', :js do
... @@ -119,8 +117,8 @@ describe 'User uses shortcuts', :js do
find ( 'body' ). native . send_key ( 'g' )
find ( 'body' ). native . send_key ( 'g' )
find ( 'body' ). native . send_key ( 'd' )
find ( 'body' ). native . send_key ( 'd' )
expect ( page ). to have_active_navigation ( 'Repository ')
expect ( page ). to have_active_navigation ( _ ( 'Analytics '))
expect ( page ). to have_active_sub_navigation ( 'Charts ')
expect ( page ). to have_active_sub_navigation ( _ ( 'Repository '))
end
end
end
end
... @@ -211,18 +209,4 @@ describe 'User uses shortcuts', :js do
... @@ -211,18 +209,4 @@ describe 'User uses shortcuts', :js do
expect ( page ). to have_active_navigation ( 'Wiki' )
expect ( page ). to have_active_navigation ( 'Wiki' )
end
end
end
end
context 'when `analytics_pages_under_project_analytics_sidebar` feature flag is enabled' do
before do
stub_feature_flags ( analytics_pages_under_project_analytics_sidebar: { enabled: true , thing: project })
end
it 'redirects to the repository charts page' do
find ( 'body' ). native . send_key ( 'g' )
find ( 'body' ). native . send_key ( 'd' )
expect ( page ). to have_active_navigation ( _ ( 'Analytics' ))
expect ( page ). to have_active_sub_navigation ( _ ( 'Repository' ))
end
end
end
end