2019-09-04 21:01:54 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-23 00:09:42 +05:30
|
|
|
RSpec.describe 'Contextual sidebar', :js do
|
2019-09-04 21:01:54 +05:30
|
|
|
let(:user) { create(:user) }
|
|
|
|
let(:project) { create(:project) }
|
|
|
|
|
|
|
|
before do
|
|
|
|
project.add_maintainer(user)
|
|
|
|
sign_in(user)
|
|
|
|
|
|
|
|
visit project_path(project)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'shows flyout navs when collapsed or expanded apart from on the active item when expanded' do
|
|
|
|
expect(page).not_to have_selector('.js-sidebar-collapsed')
|
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
find('.rspec-link-pipelines').hover
|
2019-09-04 21:01:54 +05:30
|
|
|
|
|
|
|
expect(page).to have_selector('.is-showing-fly-out')
|
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
find('.rspec-project-link').hover
|
2019-09-04 21:01:54 +05:30
|
|
|
|
|
|
|
expect(page).not_to have_selector('.is-showing-fly-out')
|
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
find('.rspec-toggle-sidebar').click
|
2019-09-04 21:01:54 +05:30
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
find('.rspec-link-pipelines').hover
|
2019-09-04 21:01:54 +05:30
|
|
|
|
|
|
|
expect(page).to have_selector('.is-showing-fly-out')
|
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
find('.rspec-project-link').hover
|
2019-09-04 21:01:54 +05:30
|
|
|
|
|
|
|
expect(page).to have_selector('.is-showing-fly-out')
|
|
|
|
end
|
|
|
|
end
|